Skip to content

Multiple search boxes with OR logic in GUI#3323

Merged
DasSkelett merged 7 commits into
KSP-CKAN:masterfrom
HebaruSan:feature/multi-search
Apr 24, 2021
Merged

Multiple search boxes with OR logic in GUI#3323
DasSkelett merged 7 commits into
KSP-CKAN:masterfrom
HebaruSan:feature/multi-search

Conversation

@HebaruSan

Copy link
Copy Markdown
Member

Motivations

  • The built in filters (Compatible, Installed, Cached, Newly Compatible, Upgradeable, Replaceable) cannot be combined with one another, via either AND- or OR-logic
  • You can only filter by one tag or label at a time, via the filter dropdown
  • The search box only supports AND-based searches
  • You can only search for one author, language, depends, recommends, suggests, or conflicts at a time (within each field, not across them)
  • The install-all checkbox covers some of the Inst column header, which looks worse on Windows, and its function is not fully clear

Changes

image

  • Now multiple values are supported for Author, Language, and the relationship searches
  • Now the search dropdown supports searching by tags and labels
  • A new tri-state toggle control is added for each of the previously built in filters: Compatible, Installed, Cached, Newly Compatible, Upgradeable, Replaceable
  • Now if you choose a filter from the filter dropdown, the corresponding search will populate into the search fields
  • Now the filter dropdown's caption always says "Filters" instead of changing based on the current filter, because you can see the currently active filter in the search boxes, and because many of the filters you can now construct are too complex to fit into the caption of the button
  • A new "+" button next to the search dropdown can be clicked to add a new blank search box, the results of which are OR'd with any other searches, so we are finally able to combine Installed with Compatible (or anything else). Clearing a non-empty search deletes it.
  • Your current searches are saved when you close the GUI and restored when you restart it, falling back to the active filter from previous versions the first time you open this version
  • Now the install-all checkbox has a tooltip and is moved from the Inst header cell to directly above it, moving with the grid as searches are added and removed, and the header caption is restored to Installed to fill the newly restored space.

Addresses post-close comments in #2736 about wanting to search both name and description with OR-logic.
Fixes #3071.
Fixes #3301.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Pull request Relationships Issues affecting depends, recommends, etc. labels Mar 10, 2021
@HebaruSan HebaruSan requested a review from DasSkelett March 10, 2021 16:25
@HebaruSan HebaruSan changed the title Feature/multi search Multiple search boxes with OR logic in GUI Mar 10, 2021
@Olympic1

Copy link
Copy Markdown
Member

I'm expecting questions about what ✓ , ✓✗ and ✗ mean. Can you make the options more descriptive, or (if possible) make a legend.

@HebaruSan

This comment has been minimized.

@Olympic1

Copy link
Copy Markdown
Member

Really? Huh, I thought they were pretty obvious.

Just thinking ahead.

How about tooltips? They say "Yes", "Yes or No", and "No".

I like this idea.

@HebaruSan

This comment has been minimized.

@HebaruSan HebaruSan added the i18n Issues regarding the internationalization of CKAN and PRs that need translating label Mar 13, 2021
@HebaruSan

Copy link
Copy Markdown
Member Author

Gonna hold off on merging so @DasSkelett can check out the i18n changes.

@DasSkelett

Copy link
Copy Markdown
Member

Hm, the symbols aren't rendered on my system:
image
Is this a font thing?

Should we put an "OR" to the left of all additional search boxes, so people now they're chained with OR? Even the tooltip only says "combine" and doesn't give a hint how they are combined.

Once you remove the first text box (ESC or the cross), CTRL+F to focus the new highest box doesn't work anymore.

@HebaruSan HebaruSan added the In progress We're still working on this label Mar 13, 2021
@HebaruSan

HebaruSan commented Mar 14, 2021

Copy link
Copy Markdown
Member Author

Hm, the symbols aren't rendered on my system:
image
Is this a font thing?

Ouch, yes, it's a font thing. Not sure why I thought I could get away with using Unicode this time. I guess I'll need to make icons.

Should we put an "OR" to the left of all additional search boxes, so people now they're chained with OR? Even the tooltip only says "combine" and doesn't give a hint how they are combined.

I thought about that, but in casual usage people sometimes swap the meanings of "and" and "or", because rather than evaluating a Boolean expression they're thinking of manipulating sets (which is just as valid, really): "I want to see compatible mods AND installed mods."

I thought that users would have to learn it by experimentation anyway, so better to say something vague like "combine" rather than give them a possibly confusing/false starting point.

Once you remove the first text box (ESC or the cross), CTRL+F to focus the new highest box doesn't work anymore.

Good catch, we need to set ActiveControl on remove...

@DasSkelett

Copy link
Copy Markdown
Member

Ouch, yes, it's a font thing. Not sure why I thought I could get away with using Unicode this time. I guess I'll need to make icons.

I'm surprised that my font has problems displaying Unicode though, I can't remember any problems anywhere else. I'm going to play around a bit and see if/how I can fix it on my system.
But if I already have problems, there's a decent chance it affects other Mono users as well.

I thought about that, but in casual usage people sometimes swap the meanings of "and" and "or", because rather than evaluating a Boolean expression they're thinking of manipulating sets (which is just as valid, really): "I want to see compatible mods AND installed mods."
I thought that users would have to learn it by experimentation anyway, so better to say something vague like "combine" rather than give them a possibly confusing/false starting point.

I can see your point there. But I'm not really happy leaving our users on their own having to find out how the software works through experimentation. Maybe I can think of another way to make it clear how the searches interact with each other.

@HebaruSan HebaruSan force-pushed the feature/multi-search branch from 512fa7b to 1be95c5 Compare March 14, 2021 19:57
@HebaruSan

HebaruSan commented Mar 14, 2021

Copy link
Copy Markdown
Member Author

screenshot

But if I already have problems, there's a decent chance it affects other Mono users as well.

And who knows about Windows. Force pushed some new icons and updated button backcolor behavior.

Once you remove the first text box (ESC or the cross), CTRL+F to focus the new highest box doesn't work anymore.

Is this better for you now? Now updating ActiveControl on remove.

@HebaruSan

Copy link
Copy Markdown
Member Author

Need a few more pixels of space for the labels on Windows...

image

@HebaruSan HebaruSan force-pushed the feature/multi-search branch from f4322ed to f69d117 Compare March 27, 2021 23:50
@HebaruSan

Copy link
Copy Markdown
Member Author

I can see your point there. But I'm not really happy leaving our users on their own having to find out how the software works through experimentation. Maybe I can think of another way to make it clear how the searches interact with each other.

OK, it's a bit more visually busy, but if it helps users to understand how it works, then that's fine:

image

@HebaruSan HebaruSan removed the In progress We're still working on this label Mar 29, 2021
@DasSkelett

Copy link
Copy Markdown
Member

Working on some fixes, need some time navigating through all those SetSearches(), Filter(), ApplySearches()...

@DasSkelett

DasSkelett commented Apr 20, 2021

Copy link
Copy Markdown
Member

Force-pushing a simple rebase without any code changes so I can do a PR to your branch which also includes some adjustments to the pt-BR localization.

Edit: well this did include the commits with changes, let me retry...
Edit 2: This looks better.

@DasSkelett DasSkelett force-pushed the feature/multi-search branch 2 times, most recently from 84f0d97 to 195f9bc Compare April 20, 2021 19:24

@DasSkelett DasSkelett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, appears to be stable now in my testing. Let's hope people appreciate all the new search combination possibilities!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New features or functionality GUI Issues affecting the interactive GUI i18n Issues regarding the internationalization of CKAN and PRs that need translating Relationships Issues affecting depends, recommends, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox to (de)select all mods covers column header [Feature] Filter Compatible & Installed

3 participants