Commit Graph

173 Commits

Author SHA1 Message Date
schroda
050094c991 Update styling of "manga open source" button 2025-02-08 16:16:32 +01:00
schroda
f633059083 Rename "CustomIconButton" to "CustomButton" 2025-02-08 16:03:37 +01:00
schroda
cae52fd782 Add "blend mode" to "custom color filter" 2025-02-08 01:49:37 +01:00
schroda
9d3aeafe0e Use "BasePager" for infinite scroll chapter change detection
There can be cases where when scrolling backward/forward the first/last page never gets visible in the viewport due to a large width/height of another page.
In that case the intersection observer would never trigger and thus, the chapter wouldn't get changed.

By using the Pager, which always takes up the full width/height, this problem will not be possible, since the start/end of the Pager always enters or leaves the viewport.
2025-02-05 22:25:35 +01:00
schroda
187693ce5a Properly handle not skipping duplicate chapters
The filtered chapter list of the reader state always incorrectly filtered out duplicated chapters even while the setting was disabled
2025-02-05 20:05:36 +01:00
schroda
a32c88a549 Reset "ReaderChapterViewer" min width/height on "ReadingMode" change 2025-02-05 15:48:55 +01:00
schroda
19f2d99345 Center "ReaderChapterViewers"
The viewers can have different sizes which caused theme to not be properly centered.

E.g. for the "vertical mode" in case "chapter 1" is greater in width than "chapter 2", the pages of "chapter 2" were not correctly centered due to the "viewers" having different widths.
2025-02-05 00:34:44 +01:00
schroda
636f48107f Prevent "ReaderChapterViewer" from overlapping each other
Seems like not all browsers handle

width/height: 100%
min-width/min-height: fit-content

correctly.
the "min" setting just never applies and the size is stuck at 100%.
2025-02-04 23:11:34 +01:00
schroda
2ec42d962a Remove context usage from ReaderPage
In case many chapters are rendered, even just the HOC wrapper component re-render due to the context change increases the render time.

Thus, getting rid of these HOC wrapper re-renders by moving the context usage up to the ReaderViewer decreases the render time.
2025-02-03 17:17:35 +01:00
schroda
b01b23b069 Remove context usage from ReaderChapterViewer
In case many chapters are rendered, even just the HOC wrapper component re-render due to the context change increases the render time.

Thus, getting rid of these HOC wrapper re-renders by moving the context usage up to the ReaderViewer decreases the render time.
2025-02-03 17:17:35 +01:00
schroda
4a9d2903b8 Add infinite scroll to reader 2025-02-03 17:17:35 +01:00
schroda
45b4874348 Remove unnecessary keys 2025-02-03 17:17:35 +01:00
schroda
c79ccf3523 Improve memoization of "ReaderTransitionPage"
- use chapter properties instead of chapter object
- only pass "handleBack" in case the transition page is for the first or last chapter
2025-02-03 17:17:35 +01:00
schroda
8ddb259c82 Prevent tooltip on disabled button warning 2025-02-02 00:54:03 +01:00
schroda
b7fc1ae6ff Extract theme context logic into its own provider 2025-01-25 19:22:24 +01:00
schroda
b67c9c4e44 Fix reader chapter transition page positioning in double page mode
Regression 649a17c2ae
2025-01-23 20:36:19 +01:00
schroda
649a17c2ae Move "ReaderTransitionPage" to "ReaderViewer" 2025-01-21 19:19:27 +01:00
schroda
db7aad58ec Convert reader image placeholder styling to vw/vh 2025-01-21 19:19:25 +01:00
schroda
7fad96dab7 Convert reader image styling to vw/vh
Preparation for infinite scroll, since there will be a wrapper which fits its content in width and height, thus, percentage based dimension won't work anymore
2025-01-21 19:19:22 +01:00
schroda
da600bcdec Extract reader pages wrapper styling 2025-01-21 19:19:21 +01:00
schroda
ca1c95cdfe Show chapter transition warning for mobile progress bar open chapter buttons 2025-01-21 19:19:20 +01:00
schroda
b7cb245abc Rename "getImageWidthStyling" to "getReaderImageStyling" 2025-01-18 23:13:56 +01:00
schroda
19f83d5237 Extract hooks from utils file 2025-01-18 22:07:59 +01:00
schroda
8e1d9b3106 Change reader non-static nav bar icon 2025-01-17 01:38:19 +01:00
schroda
d95396ecb0 Consider reader nav bar width and scrollbars for auto scrollbar position 2025-01-17 01:26:09 +01:00
schroda
9ac1009e22 Properly update reader desktop nav bar download button
Did not update according to download updates due to not subscribing to the fragment changes

Regression 257c0c8e10
2025-01-17 01:26:07 +01:00
schroda
97dba923b4 Improve "chapter list" render performance
affected components:
- ChapterList
- ReaderChapterList
2025-01-12 20:28:22 +01:00
schroda
257c0c8e10 Move download status subscription to "ChapterCard"
Only re-render chapters whose download status has changed instead of the whole list everytime a download status change was received
2025-01-12 20:28:18 +01:00
schroda
57f73636a0 Read chapter download status from cache
Instead of getting the whole download status, which contains all queued/active downloads, the download status should be read from the cache for only the required chapters
2025-01-12 14:09:10 +01:00
schroda
7901961821 Add "auto" progress bar position
Automatically choose the progress bar position based on the available space.
Previously it was only possible to automatically switch from a horizontal to a vertical position but not the other way around
2025-01-11 03:09:10 +01:00
schroda
757cf599d6 Enable mouse drag scrolling for all reading modes 2025-01-10 02:07:24 +01:00
schroda
afc3a23ae0 Always scroll to start of page on page change
By the time the scroll area got scrolled to the start of the visible pages, the previous/next page wasn't yet shown and thus, the scrollable area wasn't updated yet.
Thus, in case the scrollable area grew in width due to the page change, the start never got scrolled into view due to triggering the logic too early.
2025-01-10 02:03:31 +01:00
schroda
a423d11442 Prevent reader pages from getting cut off on small screens
In case the pages were larger in width then the screen, they got cut off and were not fully viewable.
2025-01-09 21:41:38 +01:00
schroda
62155005ab Apply auto vertical progress bar for BOTTOM position only
In case "auto vertical position" is not "OFF" but the main position is not "BOTTOM", the auto mode still should be considered to be "OFF"
2025-01-02 22:22:31 +01:00
schroda
52f5415c9f Memoize mobile progress bar position related styling
Only really relevant for the "progress bar slot" prop to prevent the slots from unnecessary re-rendering, since depending on the total pages, this can impact the render performance on page changes heavily
2025-01-02 22:22:30 +01:00
schroda
b5a0ec7371 Ignore reading direction for vertical progress bar
The page change handling of the progress bar was inverted while RTL was the set readers reading direction.
However, this is only relevant for the horizontal progress bar
2025-01-02 21:48:23 +01:00
schroda
f90e4597f8 Make mobile progress bar position changeable 2025-01-02 21:48:02 +01:00
schroda
92892e6604 Optionally adjust progress bar position based on available size 2025-01-02 21:26:19 +01:00
schroda
4aa144cb25 Make minimized standard progress bar gaps transparent 2025-01-02 14:43:01 +01:00
schroda
2944252d91 Make chapter transition warnings optional 2025-01-01 17:24:36 +01:00
schroda
17cf8ec9d0 Update "pagesToSpreadState" during render
Gets rid of an unnecessary rendering
2024-12-31 13:25:37 +01:00
schroda
3bab657c52 Update "actualPages" immediately
Instead of immediately updating the value once the page count changed, it got updated after "pagesToSpreadState" changed, which was after the rendering finished.

This was the actual root cause of what was tried to be fixed with 9ab6ec89c7
2024-12-31 13:24:29 +01:00
schroda
8594a7b178 Increase reserved "current page" text for double pager
For the double pager the current page text needs more reserved space since two pages are displayed at once which changes the current page text to "<page1>-<page2>" instead of just "<page1>"
2024-12-31 04:38:11 +01:00
schroda
a0df80f60a Fix opening previous/next page via user action
Regression 55dc9471d9
2024-12-31 04:24:47 +01:00
schroda
f808614e6c Prevent layout shifts in continuous pagers
I was unable to find a fix for this problem, thus, the only solution I see is disabling this functionality for the continuous readers.

Due to preloading leading pages, the layout got shifted once the pages got loaded.
This messed with the scroll position which caused the top of the scrolled into views pages to not be at the top of the viewport anymore.
2024-12-31 02:51:20 +01:00
schroda
740acf63fc Show default "reading mode" setting
Regression 6ca6864035
2024-12-31 01:08:13 +01:00
schroda
95f95e770f Prevent TypeError and incorrect state updates for "pagesSpreadState"
Page spread state updates of an already closed chapter caused TypeErrors or incorrect state updates.
2024-12-30 21:03:13 +01:00
schroda
7c98bab43b Prevent TypeError and incorrect state updates for "pageLoadStates"
Page load state updates of an already closed chapter caused TypeErrors or incorrect state updates.
2024-12-30 21:03:10 +01:00
schroda
45f46a05d0 Optionally show preview or "reading mode" and "tap zone overlay"
Shows a preview when opening the reader or when the values change
2024-12-30 16:51:39 +01:00
schroda
f3962646e6 Hide "tap zone overlay" on user action 2024-12-30 16:50:54 +01:00