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

EES-5220: Retain selected sorting method when applying search term, and default to 'Newest' #5078

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

tomjonesdev
Copy link
Collaborator

Reduces confusion for end users who are currently seeing less relevant results and reduces frustration for internal users who are looking for recent publications and are finding the search doesn’t really help them.

Copy link
Collaborator

@amyb-hiveit amyb-hiveit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a ui test, statistics_page.robot, that checks that relevance is selected when you search, so that will need to be updated.

@@ -130,7 +130,7 @@ const FindStatisticsPage: NextPage = () => {
: {
...omit(router.query, 'page'),
[filterType]: nextValue,
sortBy: filterType === 'search' ? 'relevance' : sortBy,
sortBy: filterType === 'search' ? sortBy : 'newest',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only keeping the user's previous sort order when you search, if you change another filter it resets to 'newest'.

… find-statistics, and default to 'Newest'.
@amyb-hiveit amyb-hiveit merged commit 6ac1a22 into dev Jul 22, 2024
7 checks passed
@amyb-hiveit amyb-hiveit deleted the EES-5220 branch July 22, 2024 10:13
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