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

Smart search: Cannot select number in "at least" option in tags filter #1930

Open
ziggabyte opened this issue Apr 24, 2024 · 2 comments · May be fixed by #1948
Open

Smart search: Cannot select number in "at least" option in tags filter #1930

ziggabyte opened this issue Apr 24, 2024 · 2 comments · May be fixed by #1948
Labels
🐜 bug Something isn't working

Comments

@ziggabyte
Copy link
Contributor

ziggabyte commented Apr 24, 2024

Description

I can't seem to select a number in the number selector in the tags filter, when selecting "at least" version of the filter.

Steps to reproduce

  1. Go to somewhere with a smart search dialog
  2. Select to add/remove people, and select "Based on tags"
  3. Select "at least" from the dropdown
  4. Attempt to edit the number

Expected Behaviour

I can edit the number either from clicking the field and then using the keyboard for deleting the existing number and typing in a new one, or by using the little up/down arrow buttons to increase or decrease the number

Actual Behaviour

I cannot use the up/down arrow buttons, and when I attempt to delete the existing number to type in a new one, the filter changes and I cannot change back to the "at least" version.

Screenshots (if you have any)

tags.bug.mp4
@ziggabyte ziggabyte added the 🐜 bug Something isn't working label Apr 24, 2024
@awarn
Copy link
Collaborator

awarn commented May 12, 2024

Jumping on this

@awarn
Copy link
Collaborator

awarn commented May 12, 2024

Two different problems, with a third bigger one underneath:

  1. Not being able to increase the number is just because there have been no tags selected yet, and the number field has a maximum attribute bounded by that. So mostly a UX issue. Simple solution is to just allow any number to be entered here, not sure we need the upper bound. Or you can max out at the maximum selectable amount of tags, maybe.
  2. Deleting the number causing a reset to any is caused by a definition loop where having a value in the number field is seen as the setting keeping the form in the min_matching state. Looks like we're trying to not mess with the CONDITION_OPERATOR enum, because that touches on a handful of unrelated uses. But, of course, when you then delete the min_matching number value, the form reverts to the default any state. I'll do a fix this in the current mold, but there should maybe be an expansion of the CONDITION_OPERATOR enum considered.
  3. The promised third, bigger, problem is that I am not sure this filter even works correctly. Regardless of the min_matching value, the filter still seems to just work like the any condition.

@awarn awarn linked a pull request May 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants