feature: Add color marking for read/last-read chapters in library#492
Open
suryaatevellore wants to merge 1 commit into
Open
feature: Add color marking for read/last-read chapters in library#492suryaatevellore wants to merge 1 commit into
suryaatevellore wants to merge 1 commit into
Conversation
Add visual indicators in the chapter list so users can see which chapters have been read and which one was most recently read. Changes: - Backend: Expose updated_at in chapter list endpoints (ChapterService.php) so the frontend can determine the last-read chapter by timestamp. - Library chapter list (BookChapters.vue): Add item-class callback that applies 'chapter-read' or 'chapter-last-read' CSS class to table rows. Add a check-circle icon next to chapter names for read chapters (green for last-read, grey for others). Add lastReadChapterId computed property that finds the chapter with the highest updated_at among read chapters. - Reader chapter list (TextReaderChapterList.vue): Apply matching visual indicators in the in-reader chapter list dialog. - Styling (BookChapters.scss, TextReaderChapterList.scss): Add chapter-read class (4px muted green left border) and chapter-last-read class (4px green left border + tinted background). - Theme colors (themes.js): Add chapterReadBorder and chapterLastReadBackground color variables for light, dark, and eink themes. - Testing: Add BookFactory, ChapterFactory, and ChapterReadTrackingTest with 4 feature tests covering read_count and updated_at in API responses, read count increment on finish, and timestamp update on finish. Enable SQLite in-memory DB in phpunit.xml for fast isolated tests.
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.
Add visual indicators in the chapter list so users can see which chapters have been read and which one was most recently read.
Changes:
Backend: Expose updated_at in chapter list endpoints (ChapterService.php) so the frontend can determine the last-read chapter by timestamp.
Library chapter list (BookChapters.vue): Add item-class callback that applies 'chapter-read' or 'chapter-last-read' CSS class to table rows. Add a check-circle icon next to chapter names for read chapters (green for last-read, grey for others). Add lastReadChapterId computed property that finds the chapter with the highest updated_at among read chapters.
Reader chapter list (TextReaderChapterList.vue): Apply matching visual indicators in the in-reader chapter list dialog.
Styling (BookChapters.scss, TextReaderChapterList.scss): Add chapter-read class (4px muted green left border) and chapter-last-read class (4px green left border + tinted background).
Theme colors (themes.js): Add chapterReadBorder and chapterLastReadBackground color variables for light, dark, and eink themes.
Testing: Add BookFactory, ChapterFactory, and ChapterReadTrackingTest with 4 feature tests covering read_count and updated_at in API responses, read count increment on finish, and timestamp update on finish. Enable SQLite in-memory DB in phpunit.xml for fast isolated tests.