Commit Graph

31 Commits

Author SHA1 Message Date
schroda
19d27fdf26 Feature/virtualize manga grid (#363)
* Disable ssr by default for "useMediaQuery"

SSR would cause the hook to run once with default values and only after the first render with real values.
This can cause issue on rendering when depending on useMediaQuery results like in 8c129f2e08

* Virtualize manga grids

* Remove SourceMangas load more guard

Was required due to the previous load more trigger logic from the MangaGrid.
Due to using Virtuoso now, load more will be triggered only once when the bottom of the grid was reached and thus won't trigger multiple load more requests

* Remove old Library pagination

Pagination is handled by virtuoso, thus, the previous pagination can be removed

* Increase initial loaded pages to make infinite load work

virtuoso requires enough initial items to be rendered, so that actual virtualization takes effect, for it to fire "endReached"

* Prevent virtuoso grid scrollbar from jumping around

In case the items have a big height difference there is a bug where the scrollbar starts jumping around the moment these new items are rendered

* Restore scroll position

For some reason the UI jumps around when accessing "document.documentElement" during loading more items.
After the items are rendered the loading placeholder gets removed and the previous items jump to the bottom of the viewport.

* Limit manga grid titles to two lines

* Remove "last page" info from MangaGrid

Info is not needed. The only thing the MangaGrid has to do is to trigger a request to load more data
2023-06-17 16:50:17 +02:00
schroda
5187d4c842 Fix "hasNextPage" calculation for Library grid (#366)
"totalPages" could have decimal places which then would lead to incorrectly disabling the "hasNextPage" flag
2023-06-16 00:15:00 +02:00
schroda
4b83ccc889 Feature/use alias for imports (#352)
* Use alias "@" for imports

* Use alias "@" for imports - Fix imports

* Use alias "@" for imports - Prevent faulty "import/extensions" linting issue

For some reason the rule throws an error for alias imports

* Use alias "@" for imports - Update "no-relative-imports" eslint rule
2023-06-05 01:42:39 +02:00
schroda
f86c7ea08a Prevent showing "empty library" message on first load (#302)
Due to using "useEffect" the grid always rendered once with stale data, causing the error message to be shown.
With "useMemo" the latest data is always getting rendered immediately.
2023-05-18 13:24:34 +02:00
schroda
bd91510227 Remove eslint rule deactivations (#290) 2023-05-11 18:00:37 +02:00
schroda
d58bd6cd92 add translation keys (#246)
* Fix i18n tsc issue

"t" can return null by default.
This was already disabled in the config, but it had no effect on tsc.

* Fix translation in "DefaultNavBar"

key was missing and since this is a constant the translation wouldn't update in case the language got changed after first load.

* Enable typing for i18n translation keys

* Add translation keys
2023-03-23 16:29:32 +03:30
schroda
8c129f2e08 Disable "SSR" option in "useMediaQuery" (#263)
"useMediaQuery" renders once with default values and only on the second render with the resolved values.

Thus, "lastPageNum" can potentially get initialized with the value for small/medium screens instead for large screens.
2023-03-16 20:30:02 +03:30
schroda
8cd1afd2c7 Ignore filters only while searching (#256)
In case the "ignoreFilters" flag was set to true and the search string was empty/undefined all mangas of the category were visible, ignoring the set filters.
2023-03-11 21:42:43 +03:30
akabhirav
91e7bd2b27 Added sort by last read (#254) 2023-03-05 10:26:50 +03:30
akabhirav
e32078917d Replace Sort by ID with Date Added (#253) 2023-03-04 20:21:39 +03:30
akabhirav
a67370be62 Introduce override filters while searching setting (#242)
* Introduced override filters while searching setting

* update branch; change strings and method names

* fix eslint issue

* code review changes

* moved search setting types into its own type

---------

Co-authored-by: akxer <>
2023-03-04 20:21:24 +03:30
schroda
c6257acdf1 Show empty library in case search doesn't match anything (#251)
* Show empty library in case search doesn't match anything

In case the search didn't match anything all mangas where shown instead of an empty library.

* Rename filter manga function parameter and variable

Makes it easier to read
2023-03-01 22:08:12 +03:30
Daniel
96fd1cf73b remove manually created typing d ts file (#249)
* Rename file

".d.ts" files are files that are automatically generated during compilation (in case option is set) and shouldn't be created manually.

* Export types and interfaces

* Add missing imports
2023-02-24 19:10:37 +03:30
akabhirav
5473d14eae Adds search by genre to WebUI (#238)
* add pagination to library and fix some prettier issues

* add genre search support like tachiyomi android app

* Search by genre like you do in tachiyomi mobile app

---------

Co-authored-by: akxer <>
2023-02-16 09:26:09 +03:30
akabhirav
aaedbb7be9 add pagination to library and fix some prettier issues (#237)
Co-authored-by: akxer <>
2023-02-12 18:43:41 +03:30
Daniel
2c11708c92 increase prettier line length to 120 (#233)
* [Prettier] Increase max line length to 120

100 is quite low, especially on modern monitors.
The length is also reached quite quickly with 4 spaces per tab depending on the indentation depth

* [Prettier] Increase max line length to 120 - Fix formatting
2023-02-08 20:49:26 +03:30
Daniel
4e0a860dfd add prettier for auto formatting (#231)
* [Prettier] Add "prettier"

Makes the formatting of the code consistent.
By using the eslint-plugin-prettier formatting issues will be highlighted as a lint error.
These errors will be auto fixed by running "lint --fix" (which can be done automatically on file save)

* [Prettier] Add "prettier" - Fix formatting
2023-02-06 12:36:33 +03:30
Daniel
144b4cdb49 Ignore filters while searching (#226)
Search was only searching in the filtered manga, thus, it was not possible to find a manga that was not included in the set filters
2023-02-05 18:44:05 +03:30
Daniel
7642b5808c [#211] Refresh Library after a update (#212)
Library had to be refreshed manually to see the latest manga updates.
2023-01-06 20:05:26 +03:30
Valter Martinek
62816338f3 Refactor and fix sorting in library (#197) 2022-11-24 23:34:30 +03:30
Valter Martinek
154b357c40 Options panels refactoring (#196)
* Refactor library options to match chapter options using shared component

* Disable some eslint rules

* Cleanup SourceOptions layout to use same components as other panels
2022-11-24 12:11:03 +03:30
amr
13e6456190 unified library options (#168)
* Unified the way options are being handled. now everything uses the LibraryOptionsContext, removed the no-longer used useLibraryOptions hook

* removed query from library options. since it doesn't make sense for this to be cached

* fixed a bug in the useLocalStorage implementation
2022-04-07 15:23:14 +04:30
robo
841b945ca5 in library badge to manga in sources (#156)
* add the in library badge to manga in sources

* other layouts done
2022-03-11 19:24:45 +03:30
robo
0a63d60880 add comfortable grid option (#152)
* move sorts to copy tachiyomi

is now in a tab along with filter ad display same as tachiyomi

* add comfortable grid

and all the stuff needed to make it easy to add more

* Revert "Merge remote-tracking branch 'upstream/master' into grid-types-(comfortable/list)"

This reverts commit 33eed92e8f7259ddce0e34ab59f721553bbb7e93, reversing
changes made to d699955345e253d2b2c2d837e76509a39b3bef00.
2022-03-06 20:15:25 +03:30
robo
d4221044cc sorting (#136)
* sorting

add menu
add sort by left to Read
add sort alphabetical
add sort by ID
add Asc/Desc

* woops

* woops

* Camel case
2022-02-24 09:46:21 +03:30
Aria Moradi
7eedce62cd handle search shortcuts (#116)
* code cleanup

* fix some issues

* handle search keyboard shortcuts
2021-12-19 18:06:27 +03:30
Sascha Hahne
1b0c277188 Fix Bad messages in Library Appbar search (#70) 2021-11-10 12:14:27 +03:30
abhijeetChawla
42c5c3042d add filter and badge for downloadCount (#62)
* Added the Download filter and download badge

* Update src/components/library/LibraryMangaGrid.tsx

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>

* - corrected some spelling mistakes

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>
2021-11-07 13:59:48 +03:30
Sascha Hahne
9e65870fae add Search to Library (#55)
* Implement bare bones library search

* Add nice interactions
2021-10-31 15:15:34 +03:30
Aria Moradi
091d97c914 refactor 2021-10-30 16:10:34 +03:30
Sascha Hahne
e9bdc95060 Implement Unread Filter for Library (#54) 2021-10-29 21:41:23 +03:30