-
Notifications
You must be signed in to change notification settings - Fork 32
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
[DH/Editor] : Sort by changeDate by default #1022
Conversation
Affected libs:
|
📷 Screenshots are here! |
6ccc90e
to
4dad7d3
Compare
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.
Thanks! I think there might be a better way to do this. This PR will immediately put a _sort
parameter in the URL if none is present. The previous behavior (when using the router) was to fall back to relevancy because of this code:
https://github.com/geonetwork/geonetwork-ui/blob/main/libs/feature/router/src/lib/default/state/router.effects.ts#L64
I think we can change that to CHANGE_DATE, so we can have the datahub or editor load without a _sort
parameter showing up.
Also the sort-by component should offer CHANGE_DATE alongside CREATE_DATE I guess:
https://github.com/geonetwork/geonetwork-ui/blob/main/libs/feature/search/src/lib/sort-by/sort-by.component.ts
(the create date criteria can be kept under the name "Newest" and change date can be "Last modification")
4dad7d3
to
42302f0
Compare
42302f0
to
983f165
Compare
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.
Thank you! two minor comments to address and it's good to merge :)
Description
This PR ensures that both editor and datahub search/landing pages sort their results by changeDate and not by relevancy.
It also makes sure to revert back to a sorting by relevancy when a full text search is done.
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label