feat(history): add prev/next year buttons#164
Merged
MarshallOfSound merged 5 commits intomainfrom Sep 2, 2025
Merged
Conversation
dsanders11
approved these changes
May 2, 2025
MarshallOfSound
requested changes
May 2, 2025
1c19c74 to
e41974f
Compare
Member
Author
|
e41974f switches the implementation to add buttons on either side of the Select and keeps it on the top right of the page. |
app/routes/history.tsx
Outdated
| <button | ||
| className="bg-white dark:bg-gray-800 hover:enabled:bg-gray-100 dark:hover:enabled:bg-gray-700 rounded-lg shadow-sm outline outline-1 outline-gray-200 dark:outline-gray-700 p-1 flex items-center gap-2 disabled:text-gray-400 disabled:cursor-not-allowed transition-colors" | ||
| disabled={year >= new Date().getFullYear()} | ||
| onClick={() => setYear(`${year + 1}`)} |
Member
There was a problem hiding this comment.
useCallback ify this please
app/routes/history.tsx
Outdated
| <div className="flex gap-2"> | ||
| <button | ||
| className="bg-white dark:bg-gray-800 hover:enabled:bg-gray-100 dark:hover:enabled:bg-gray-700 rounded-lg shadow-sm outline outline-1 outline-gray-200 dark:outline-gray-700 p-1 flex items-center gap-2 disabled:text-gray-400 disabled:cursor-not-allowed transition-colors" | ||
| onClick={() => setYear(`${year - 1}`)} |
Member
There was a problem hiding this comment.
useCallback ify this please
Co-authored-by: Samuel Attard <sam@electronjs.org>
MarshallOfSound
approved these changes
Sep 2, 2025
MarshallOfSound
approved these changes
Sep 2, 2025
This file contains hidden or 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
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.


One fewer click to go between consecutive years in the
/historyview.Screen.Recording.2025-05-02.at.10.16.04.mov