Skip to content

Improve dropdown filter UX and fix tag selection#1887

Merged
hmpf merged 2 commits into
mainfrom
feat/improve-typeahead-filters
Apr 29, 2026
Merged

Improve dropdown filter UX and fix tag selection#1887
hmpf merged 2 commits into
mainfrom
feat/improve-typeahead-filters

Conversation

@Simrayz

@Simrayz Simrayz commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Scope and purpose

Fixes #1887.

Replaces Choices.js type-ahead filters with dropdown-based search widgets and fixes several UX issues with the new implementation.

Screen recording

type-ahead-redesign-compressed.mp4

Changes

  • Fix tag filter not applying: Checked search results were removed from the DOM before htmx could include them in the request. Now checked items are preserved in the persistent options container before search results are cleared.
  • Fix dropdown flicker during updates: The outerHTML swap of .show-selected-box caused DaisyUI's .dropdown-content opacity transition to briefly fire. Fixed by adding dropdown-open class during htmx request/settle cycle.
  • Keep search results visible for multi-select: Search results no longer clear on each selection, allowing users to check multiple items from a single search query. Checked results are moved to persistent storage only when a new search replaces them.
  • Improve checkbox contrast: Changed checkbox border from border to border-base-content/20 for better visibility on white dropdown backgrounds.

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after

@Simrayz Simrayz force-pushed the feat/improve-typeahead-filters branch from a32abdc to 2d4b7ac Compare April 21, 2026 07:19
@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown

Test naming convention

All new test names follow the convention. 👍

@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown

Test results

    8 files  1 712 suites   3m 6s ⏱️
  933 tests   932 ✅ 1 💤 0 ❌
7 464 runs  7 456 ✅ 8 💤 0 ❌

Results for commit db0c9f2.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.60%. Comparing base (4c8f688) to head (db0c9f2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1887   +/-   ##
=======================================
  Coverage   88.60%   88.60%           
=======================================
  Files         146      146           
  Lines        7089     7093    +4     
=======================================
+ Hits         6281     6285    +4     
  Misses        808      808           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Simrayz Simrayz self-assigned this Apr 21, 2026
@Simrayz Simrayz added frontend Affects frontend UX UX design help needed/Improves user experience design filter Affects the Filter-model, incident list query parameters or both labels Apr 21, 2026
@Simrayz Simrayz requested a review from a team April 21, 2026 07:52
@Simrayz Simrayz force-pushed the feat/improve-typeahead-filters branch 4 times, most recently from ebbb4f2 to 4a39142 Compare April 21, 2026 09:16
@Simrayz Simrayz marked this pull request as ready for review April 21, 2026 09:21

@johannaengland johannaengland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I find it quite strange that the searching is not happening directly in the field that I am clicking like how it currently is, but that a second field appears in the dropdown that looks like the other one

Image

Comment thread src/argus/htmx/plannedmaintenance/views.py Outdated
@hmpf

hmpf commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

I find it quite strange that the searching is not happening directly in the field that I am clicking like how it currently is, but that a second field appears in the dropdown that looks like the other one
Image

I think HTMx could be used to fix this: swap in the new form for the old form then show old, filled in on Enter/save?

@Simrayz Simrayz force-pushed the feat/improve-typeahead-filters branch from 0bd9a21 to d59dc8b Compare April 27, 2026 08:53
@Simrayz

Simrayz commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

I find it quite strange that the searching is not happening directly in the field that I am clicking like how it currently is, but that a second field appears in the dropdown that looks like the other one

Image

@johannaengland
I have modified the inputs to use "Select sources" with a dropdown chevron icon instead of duplicating the text. This should make it more clear that the input is in fact a dropdown select. What do you think? Remember to rebuild css.

@Simrayz Simrayz requested a review from johannaengland April 27, 2026 09:16

@johannaengland johannaengland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I really like the look! But my comment about changing the two views from class based views back to function based views is still open - you said it was a rebase mistake, but it has not been changed back

@Simrayz Simrayz requested a review from johannaengland April 27, 2026 12:38
@Simrayz

Simrayz commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

I really like the look! But my comment about changing the two views from class based views back to function based views is still open - you said it was a rebase mistake, but it has not been changed back

It has been reverted now though 🙈

@hmpf hmpf force-pushed the feat/improve-typeahead-filters branch from 1bd9586 to 727a9f6 Compare April 29, 2026 08:18
@Simrayz Simrayz force-pushed the feat/improve-typeahead-filters branch from 727a9f6 to db0c9f2 Compare April 29, 2026 08:56
@sonarqubecloud

Copy link
Copy Markdown

@hmpf hmpf merged commit ae83a5b into main Apr 29, 2026
18 checks passed
@hmpf hmpf deleted the feat/improve-typeahead-filters branch April 29, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design filter Affects the Filter-model, incident list query parameters or both frontend Affects frontend UX UX design help needed/Improves user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants