Skip to content

Enable filtering Already Read by year read #10599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented Mar 19, 2025

The dropper was never actually displaying, since I think the header_title has been changed to include a count. This fixes it to use the key, and also switched it to use BookshelvesEvents, since people can log year read without necessarily using the yearly reading goals feature.

Technical

Testing

Tested the query on prod and no Seq Scans:

 Sort  (cost=17.87..17.87 rows=1 width=9) (actual time=0.130..0.132 rows=5 loops=1)
   Sort Key: ("substring"(event_date, 1, 4))
   Sort Method: quicksort  Memory: 25kB
   ->  HashAggregate  (cost=17.84..17.86 rows=1 width=9) (actual time=0.106..0.109 rows=5 loops=1)
         ->  Index Only Scan using bookshelves_events_user_checkins_idx on bookshelves_events  (cost=0.42..17.76 rows=16 width=9) (actual time=0.032..0.089 rows=19 loops=1)
               Index Cond: ((username = 'ScarTissue'::text) AND (event_type = 3))
               Heap Fetches: 19
 Total runtime: 0.176 ms

Screenshot

image

Stakeholders

@cdrini cdrini force-pushed the feature/use-bookshelf-events-for-year-selector branch from afc264d to 0152ad1 Compare March 19, 2025 14:58
@cdrini cdrini changed the title Use BookshelvesEvents for year dropper Fix Already Read year dropper + use BookshelvesEvents Mar 19, 2025
@cdrini cdrini marked this pull request as ready for review March 19, 2025 16:23
@cdrini cdrini changed the title Fix Already Read year dropper + use BookshelvesEvents Enable Already Read year read drop-down Mar 19, 2025
@mekarpeles mekarpeles merged commit 3602cea into internetarchive:master Mar 21, 2025
4 checks passed
@mekarpeles mekarpeles self-assigned this Mar 21, 2025
@cdrini cdrini deleted the feature/use-bookshelf-events-for-year-selector branch March 22, 2025 00:06
@cdrini cdrini changed the title Enable Already Read year read drop-down Enable filtering Already Read by year read Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants