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

Search by supports relationship and other search improvements #3939

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Dec 7, 2023

Motivation

  • The mod search can search all relationships except supports. @JonnyOThan suggested adding supports.

Problems

  • If you click the search dropdown button on Windows and then click it again, the dropdown disappears but you have to click the button two more times to get it to reappear. (On Mono this already works perfectly.)
  • Ctrl+Backspace is a common hotkey for deleting whole words in a textbox (with a dubious history as a "rogue feature" starting with early Internet Explorer releases), but the CKAN GUI currently only supports it on Mono (where it's built in to the runtime)
  • While working on the rest of this, I noticed that the "Help → Report an issue with mod metadata" link assumed the game was KSP1, even if you were working with a KSP2 instance

Causes

  • The search dropdown was set up to be a separate floating window, but clicking outside of it didn't make it invisible! Instead the main window was moved in front of it. The second click on Windows then toggled the button and officially hid the already non-visible dropdown, and the third click re-displayed it.

before

Changes

  • Now there's a Supports field in the search dropdown, corresponding to a sup: search prefix in the English locale
    image
  • Now the search dropdown is properly set up as always-on-top, and we hide it when you click outside of it. A special case is needed when you click on the expand/collapse button again to avoid hiding it and then immediately re-displaying it. Platform.IsWindows is used because Windows and Mono differ drastically in how they handle this.
  • Now Ctrl+Backspace works in our textboxes, using the de facto standard Windows API.
    Closes Ctrl+Backspace workaround for Windows #3398.
  • Now the mod metadata link is game-specific and opens KSP2-NetKAN for KSP2

@HebaruSan HebaruSan requested a review from techman83 December 7, 2023 03:03
@HebaruSan HebaruSan added Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI Windows Issues specific for Windows labels Dec 7, 2023
@HebaruSan HebaruSan force-pushed the feature/gui-search-supports branch from d465693 to 5a61c22 Compare December 7, 2023 15:46
@HebaruSan HebaruSan force-pushed the feature/gui-search-supports branch from 5a61c22 to 1198c06 Compare December 11, 2023 15:34
@HebaruSan HebaruSan force-pushed the feature/gui-search-supports branch from 1198c06 to aa2106a Compare December 11, 2023 16:22
@HebaruSan
Copy link
Member Author

I want to get this merged so we can prep for a new release before KSP2 0.2.0.0 comes out, and it looks solid in testing on Windows and Linux. Self-reviewing...

@HebaruSan HebaruSan merged commit 8dc8643 into KSP-CKAN:master Dec 11, 2023
8 checks passed
@HebaruSan HebaruSan deleted the feature/gui-search-supports branch December 11, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI Windows Issues specific for Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant