GenSpectrum / dashboard-components

https://genspectrum.github.io/dashboard-components/
GNU Affero General Public License v3.0
2 stars 0 forks source link

feat(components): Use a dropdown for selecting valid mutations and allow a comma separated list as input for mutation filter #500

Closed anna-parker closed 1 week ago

anna-parker commented 2 weeks ago

resolves https://github.com/GenSpectrum/dashboard-components/issues/481, https://github.com/GenSpectrum/dashboard-components/issues/482

Summary

  1. Instead of having to press the + button after typing in a mutation we parse the user's input and check if it is a valid mutation. If the input is valid we show that option in a dropdown. It can be selected from the dropdown (via a click or hitting the enter button), adding it to the list of selected mutation filters. This is more intuitive for users.

Covspectrum uses the same approach.

The code is similar to asyncSelect from react-select, but has been implemented in preact and is specific for the mutation filter case.

  1. Allow users to paste a ',' or ';' separated list of mutations into the search bar - accept all valid mutations and leave the remaining invalid mutations on the input line.

Screenshot

image image

PR Checklist

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 1:45pm
github-actions[bot] commented 2 weeks ago

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.8.0 (2024-11-19)

⚠ BREAKING CHANGES

Features