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

feat: sort non keyword search results a-z #854

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

LavMatt
Copy link
Contributor

@LavMatt LavMatt commented Sep 19, 2024

This PR addresses #798 and now search results when browsing by subject area or filtering will be sorted ascending rather than the default relevant ordering.

or in other words any results shown that are not the result of a keyword search query entered via the search input text box

I've also had to change the field name passed to the graphql searchAcrossEntities query's sort arg. If name is used it errors if no results are returned, but using _entityName is handled by the query and is consistent with how the datahub UI uses the query to sort search results

@LavMatt LavMatt marked this pull request as ready for review September 19, 2024 07:50
@LavMatt LavMatt requested a review from a team as a code owner September 19, 2024 07:50
@murdo-moj
Copy link
Contributor

A lot of this code looks left over from when we had more customisability on the sorting of results. Is there a bit of a tidy up of that code we can do since the sort option on the form doesn't do anything now?

@LavMatt
Copy link
Contributor Author

LavMatt commented Sep 19, 2024

A lot of this code looks left over from when we had more customisability on the sorting of results. Is there a bit of a tidy up of that code we can do since the sort option on the form doesn't do anything now?

I think we retain that because we have a waffle switch to enable us to turn sort radio buttons back on

@LavMatt LavMatt merged commit 7ca6732 into main Sep 19, 2024
21 checks passed
@LavMatt LavMatt deleted the fmd-798-sort-a-z-when-no-search-query branch September 19, 2024 09:18
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