Skip to content
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

Accessing Specific Years of Your Already-Read Shelf #8572

Conversation

benbdeitch
Copy link
Collaborator

@benbdeitch benbdeitch commented Nov 29, 2023

Closes #8557

This PR adds the ability to selectively view your read books by the year that you read them in. It also displays the goal for the reading log of that year, by means of an additional dropper. The dropper will not show if no books have been read for that year.

Technical

The MyBooksTemplate has a new 'events' argument, that carries with it an array of the years in question, in string form. This may not be the most efficient method to perform the task, but I could not think of a better approach. Given the fact that duplicate years are not counted, I'm not concerned by the sort performed of the array, when the page is loaded.

BookshelfEvents has a new function added, that was needed in order to search the table for events by username and type, without specifying the work_id.

Switching between the pages might not be the best solution for performance, but it's hard for me to test that. If the performance does prove to be a problem, it may be worth looking into what can be done, to prevent the page from reloading every time you swap years.

Testing

Simply mark books as read, and head to the page for the 'already-read' bookshelf on your account. It should load properly, and allow you to swap between the pages.

Screenshot

image

Stakeholders

@jimchamp @mekarpeles

@jimchamp jimchamp self-assigned this Nov 29, 2023
@jimchamp jimchamp changed the title #8557 Accessing Specific Years of Your Already-Read Shelf Accessing Specific Years of Your Already-Read Shelf Dec 5, 2023
@jimchamp
Copy link
Collaborator

Closed in favor of #8639

@jimchamp jimchamp closed this Dec 19, 2023
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.

Yearly Reading Goals: Ability to jump to specific year
2 participants