-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add sort by date in history page #7157
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
base: development
Are you sure you want to change the base?
Add sort by date in history page #7157
Conversation
Hi @anurag2787 nice to see a pr from you again. Did you already take a look at #6214 and the feedback we left on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/renderer/views/History/History.css: Language not supported
Comments suppressed due to low confidence (1)
static/locales/en-US.yaml:53
- There is a trailing whitespace at the end of the 'Latest First' text which should be removed for consistency.
DateNewestHistory: Latest First
:value="sortOrder" | ||
:select-names="sortByNames" | ||
:select-values="sortByValues" | ||
:icon="getIconForSortPreference(setHistorySortOrder)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getIconForSortPreference function is receiving setHistorySortOrder as its argument; it likely should receive the current sort order (e.g., the value from sortOrder) to determine the correct icon.
:icon="getIconForSortPreference(setHistorySortOrder)" | |
:icon="getIconForSortPreference(sortOrder)" |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested how copilot would work on this PR. Please disregard if this is a non issue.
Head branch was pushed to by a user without write access
In getIconForSortPreference function instead of passing setHistorySortOrder i have passed the value of it sortOrder so that it can determine the correct icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Icon doesnt change like on other pages.
VirtualBoxVM_4KNwAlFBhV.mp4
static/locales/en-US.yaml
Outdated
@@ -49,6 +49,8 @@ Global: | |||
Live: Live | |||
Community: Community | |||
Sort By: Sort By | |||
DateOldestHistory: Oldest First |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateOldestHistory: Oldest First | |
DateOldestHistory: Earliest Watched First |
static/locales/en-US.yaml
Outdated
@@ -49,6 +49,8 @@ Global: | |||
Live: Live | |||
Community: Community | |||
Sort By: Sort By | |||
DateOldestHistory: Oldest First | |||
DateNewestHistory: Latest First |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateNewestHistory: Latest First | |
DateNewestHistory: Latest Watched First |
Head branch was pushed to by a user without write access
Fixed Icon change like on other pages 12.04.2025_12.46.03_REC.mp4Also Updated history sort labels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Head branch was pushed to by a user without write access
I have fixed it, the new translation keys now been added to the History instead of Global |
Not quite done reviewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (blocking): When setting order to Earliest Watched First
and then new history entries are added, they're shown at the start instead of the end, despite them being the latest entries watched. I believe this is because upsertToHistoryCache
is not updated to handle non-default sort methods.
|
||
const state = { | ||
historyCacheSorted: [], | ||
useAscendingOrder: HISTORY_SORT_BY_VALUES.DateAddedNewest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useAscendingOrder: HISTORY_SORT_BY_VALUES.DateAddedNewest, | |
sortOrder: HISTORY_SORT_BY_VALUES.DateAddedNewest, |
suggestion: Update variable name and concomitant uses to better reflect its type (sort type, not boolean).
Head branch was pushed to by a user without write access
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
c82969d
to
e16d423
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
I have accidentally pushed yarn.lock file in my commit and am now facing some difficulties reverting it back to the original state could you please help me to resolve this |
Reversed |
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Type
Related issue
closes #5595
Description
In this PR i have added sort button in the history page where allowing user can organize their watch history either by Latest First or Oldest First where it will shows the watch history in ascending or descending order
Testing
Icon should change
Earliest first should not show latest when new entry added
Sorting doesn't change when user uses keywords to filter
Sort order change affects all other windows and new windows and future app instances
General regression
Demo
Sort By Oldest First
Sort By Latest First
Desktop