-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Closed
benbdeitch
wants to merge
18
commits into
internetarchive:master
from
benbdeitch:#8557-Yearly-Reading-Goals-Specific-Year-Jump
Closed
Accessing Specific Years of Your Already-Read Shelf #8572
benbdeitch
wants to merge
18
commits into
internetarchive:master
from
benbdeitch:#8557-Yearly-Reading-Goals-Specific-Year-Jump
Conversation
This file contains 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
for more information, see https://pre-commit.ci
…every year in which the user has a reading goal set.
… which the user has finished at least one book.
for more information, see https://pre-commit.ci
jimchamp
changed the title
#8557 Accessing Specific Years of Your Already-Read Shelf
Accessing Specific Years of Your Already-Read Shelf
Dec 5, 2023
Closed in favor of #8639 |
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.
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
Stakeholders
@jimchamp @mekarpeles