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

Adding all available values should maintain order #36

Open
allanaaa opened this issue Nov 15, 2023 · 1 comment
Open

Adding all available values should maintain order #36

allanaaa opened this issue Nov 15, 2023 · 1 comment

Comments

@allanaaa
Copy link

I'd like to see facets ordered from most to least frequency, when using the "Add all" button. Currently it seems to order them by some internal ID or creation date, which is counter-intuitive to the interface.

Screenshot 2023-11-15 at 12 40 19 Screenshot 2023-11-15 at 12 34 23
@jimsafley
Copy link
Contributor

I agree that clicking the "Add all" button should maintain order. Unfortunately, the use of a multi-select (modified by Chosen) makes that impossible because it always maintains the original order of the select options, regardless of how it's populated. It may be possible to change how we populate the select, but that would require a non-negligible change to the core; and it may not be advisable anyway because the query that fetches item count is intensive and could reach some memory or time limit. We get away with it here because "Show all available..." is optional.

The same goes for #38: there's no way to rearrange select options on a multi-select. Chosen improves UI and adds some features but it doesn't allow rearranging. I think the way forward here is to explore alternatives to the native multi-select. I haven't looked into it much, but possibilities are Selectize and Choices. Of course we could develop a custom solution that circumvents the use of a multi-select, but that's considerably more ambitious and probably not worth our time.

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

No branches or pull requests

2 participants