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

Authors as clickable filter links, combine search links w/ ctrl or shift #3672

Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Oct 6, 2022

Motivation

Continuing recent efforts to improve mod info (see #3670), and remembering my quest to find FruitGoose's mods (see KSP-CKAN/NetKAN#9351), influenced by the "sticky" checkbox on the Relationships tab (see #3638), I thought it would be nice to be able to click author names in mod info to set the filter, like the tab/label links. And if we're going to have both tag/label links and author links, that raises the possibility of wanting to use them together somehow.

Changes

  • The authors field in mod info is now an autosized wrapping flow layout collection of links that can be clicked to search by that author, similar to the tag/label links
    • Since authors can contain characters that aren't allowed or don't work in searches, non-alphanumeric characters are removed before searching
    • Can be Ctrl- or Shift-clicked to merge with existing search instead of replacing
  • Mod tag/label links are no longer oddly offset to the right by 2px
    • Can be Ctrl- or Shift-clicked to merge with existing search instead of replacing
  • Filter dropdown menu options can be Ctrl- or Shift-clicked to merge with existing search instead of replacing
  • The [+] button to add a filter moves up and down to align with the bottommost search, since you'd want to use it after populating that field

Merging two searches produces their intersection (AND logic). I think this makes sense because the user's typical goal is to narrow down the list of mods more and more until the desired mod is found, and using OR logic would expand the list instead. Similarly, if you already have multiple OR searches and choose to merge a new filter into it, the new filter is merged into all of those existing ones, to make sure mods not matching the new filter drop off.

Since Ctrl- and Shift-clicking are not discoverable, a tooltip calls it out in each place where it's available.

image

image

image

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Pull request labels Oct 6, 2022
@HebaruSan HebaruSan force-pushed the feature/click-authors-combine-searches branch from 7c12810 to e5991c7 Compare October 6, 2022 20:26
Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

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

That looks like a neat enhancement!

@HebaruSan HebaruSan merged commit 15206e2 into KSP-CKAN:master Oct 13, 2022
@HebaruSan HebaruSan deleted the feature/click-authors-combine-searches branch October 13, 2022 14:12
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants