Repository navigation
Improve UI layout responsiveness and fix selection state management - #11
Merged
Merged
Conversation
On Android the cover image was held in produceState, which restarts its loader when the cover path changes but keeps the old value. When another book became the current one, the hero card (and a shelf's thumbnail) kept the previous book's picture, and never loaded the new one. The image state is now keyed on the path, so it resets in the same pass. On the desktop the card only followed a book once it had progress, so opening a new book didn't move it until a page was turned. It now follows the book opened last, as on Android. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
Selecting a book showed a close button and up to six 48dp icon buttons beside the "N selected" title, leaving it a few dp on a phone, so it wrapped letter by letter. The title now stays on one line, and below 560dp the bar keeps select all and add to shelf, with details, favorite, mark as and remove in the menu. Wide bars still show every action. Books that a filter or a rescan takes off the screen are also dropped from the selection, so the count and "Remove" can't reach them unseen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
At the smallest window the Library title was printed over by the search and sort controls, the filter chips and selection buttons were cut off (so Favorite, Remove and Clear selection couldn't be reached), Notes overprinted its search box in German, and the Cover size setting lost its title. Screens now use a ScreenHeader that drops the tools under the title when they don't fit, chip and selection rows wrap, and a setting whose control is too wide moves it under the title. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
Removing a library folder together with its books deleted the rows but left every cover image behind, on Android and on the desktop. They are now deleted with their books. On Android each new cover also listed the whole covers folder to find the old one, which is quadratic on a large library; it now removes the old cover by its recorded path, as the desktop already did. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
- The splash screen waited on the "reopen the last book" lookup; if it failed, the app stayed on the splash. It now falls back to the library. - Home rows are keyed, so a row keeps its scroll position when the scan bar or "Also reading" appears above it. - The six accent swatches wrap instead of being cut off on a narrow screen or a large display size. - The stats heatmap opens on the latest weeks rather than the oldest. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
The README now covers what a visitor needs: what ReadArea is, how to install it, getting started, features, privacy and a few questions. The layout, build, test and release notes moved to docs/DEVELOPING.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
Covers the desktop SettingRow: a small control stays beside its title, a control too wide to leave the title 150px goes under it, the boundary between the two, and the mirrored layout for right-to-left languages. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the responsiveness of UI layouts across both Android and desktop platforms, fixes selection state management in the library, and adds comprehensive test coverage for layout and UI behavior.
Key Changes
Android Library Screen
LaunchedEffectto automatically deselect books that are filtered out or removed from view, preventing orphaned selections that would remain counted in the selection barSelectionBarcomposable that intelligently adapts to screen width:BookCoverfromproduceStatetomutableStatekeyed on path, ensuring covers update immediately when a card's book changes (e.g., "Continue reading" card switching books)Desktop UI Layout Components
ScreenHeaderlayout: Intelligently arranges title, tools, and action button:SettingRowlayout: Stacks setting title/hint and control vertically when space is constrained, preventing text cutoff in narrow windowsScreenHeaderfor consistent, responsive header layoutData Management
continueReadingBook()andalsoReading()functions to desktop for consistent book selection logic across platformsDocumentation & Tests
BookCoverTest: Verifies covers update correctly when book changes on same cardScreenHeaderTest: Tests responsive layout behavior in LTR and RTL modesSettingRowTest: Validates stacking behavior at different widthsLibraryFoldersTest: Ensures cover cleanup when removing foldersHomeRulesTest: Validates home screen book selection logicLibraryBehaviourTest: Updated to use new menu-based actions on narrow screensUI Polish
https://claude.ai/code/session_01FjEn8xjjwh6yk6MZwhSD2V