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

remove relevance in sort order when no query string is present #770

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

alee
Copy link
Member

@alee alee commented Oct 24, 2024

cherry-picked anton's commit 376bc27 from #769 and laid over main instead of the defunct squashed + merged branch

asuworks and others added 2 commits October 24, 2024 09:48
Desired behavior:

```
| ordering | qs    | default_ordering    | criteria['ordering']   |
|----------|-------|--------------------|------------------------|
| True     | True  | "relevance"        | ordering               |
| True     | False | "-first_published_at" | ordering               |
| False    | True  | "relevance"        | "relevance"            |
| False    | False | "-first_published_at" | "-first_published_at"  |
```
@alee alee force-pushed the sort_order_relevance_patch branch from 65bfae2 to 8bf3f5d Compare October 24, 2024 17:31
instead of passing strings around and interpreting them downstream, set
order_by_relevance directly in the search_backend ES call
Copy link
Member Author

@alee alee left a comment

Choose a reason for hiding this comment

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

thanks Anton! Is the entire clearAllFilters machinery used? I don't think it gets called by anything live in ListSidebar.vue or elsewhere.

Setting isFilterChanged to true appears to enable Apply Filters always instead of only when there are filters to apply though...

@alee alee requested review from sgfost and asuworks October 25, 2024 22:16
@alee alee merged commit ff5c42d into comses:main Oct 25, 2024
7 checks passed
@alee alee deleted the sort_order_relevance_patch branch December 12, 2024 22:57
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