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 dropdown #3175

Closed
wants to merge 1 commit into from
Closed

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Oct 13, 2020

Background / motivation

In #3041, we replaced the 3 old search fields at the top with 1 at the bottom, which can be expanded to to reveal 8 detail-level fields:

Initially during development I tried to keep the search field at the top, but I had trouble figuring out how to create a dropdown in WinForms that floats over the grid with editable controls in it, and it wasn't clear whether that was important. An expand/collapse (in the style of the above screenshots) on the top was jarring because it caused the top of the grid to jump up and down. Moving it to the bottom allowed those changes to be finished up and released with less risk of bugs, and I found examples of other applications that do just that:

We included this change in the v1.28.0-PRE1 pre-release and didn't hear a peep, but after it was fully released, multiple users expressed a preference for having the search at the top (see #3163).

Changes

Now the search is moved back to the top:

image

If you expand it, the other fields appear in a dropdown:

image

This is not easy to do in WinForms (there's not one simple switch to flip to turn it on; rather you have to tweak many poorly-documented settings in concert in just the right way), so careful testing is needed and quirks are likely to be found. In effect, the dropdown is a new top-level/standalone window with special flags set, with which the main window communicates from the outside.

Fixes #3163.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Pull request labels Oct 13, 2020
@linuxgurugamer

This comment has been minimized.

@HebaruSan

This comment has been minimized.

@HebaruSan
Copy link
Member Author

HebaruSan commented Oct 21, 2020

@linuxgurugamer @ValiZockt

image

Sorry for the inconvenience around builds with Mono 6.

@HebaruSan

This comment has been minimized.

@DasSkelett
Copy link
Member

so careful testing is needed and quirks are likely to be found.

Found some :D

  • Pressing ESC in the textboxes plays that warning bling again
  • When switching windows while the dropdown is open (e.g. alt-tab), it disappears, but the "state" isn't updated (the triangle on the button still points up, and you have to hit the button twice)
  • Same with clicking in the main search box while the dropdown is open. It disappears, but you have to hit the button twice.
  • While you are typing in one of the filter boxes, for a very brief moment (milliseconds) the dropdown expands to the right, over the mod info panel, probably as a result of the mod list updating. It might be the mod info panel itself needing some tweaks to fix that.

Apart from that, on the functional side it seems to already (or still :) work fine.

@HebaruSan
Copy link
Member Author

HebaruSan commented Oct 25, 2020

  • Pressing ESC in the textboxes plays that warning bling again

Easy fix, force-pushed.

  • When switching windows while the dropdown is open (e.g. alt-tab), it disappears, but the "state" isn't updated (the triangle on the button still points up, and you have to hit the button twice)
  • Same with clicking in the main search box while the dropdown is open. It disappears, but you have to hit the button twice.

I can't find an event that fires when this happens. I've tried listening to all of the "close" and "lost focus" type events, but none of them seems to happen in these cases. Can you think of anything that might work?

  • While you are typing in one of the filter boxes, for a very brief moment (milliseconds) the dropdown expands to the right, over the mod info panel, probably as a result of the mod list updating. It might be the mod info panel itself needing some tweaks to fix that.

I think this is because ManageMods._UpdateFilters clears the grid before filling in the new filtered contents, so for an instant it's blank and the mod info pane therefore has no mod to display.

@HebaruSan
Copy link
Member Author

@DasSkelett, what do you think of the possibility of merging this and creating an Issue to track the glitches when the dropdown closes? I think a client with a top dropdown and odd alt-tab behavior would be preferable to the current one with a bottom expand-collapse.

Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

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

Agree. I've now used a ckan.exe compiled from this branch for some days, and everything appears to work fine, only exceptions the above mentioned points, which we can fix later.

HebaruSan added a commit that referenced this pull request Nov 2, 2020
@HebaruSan
Copy link
Member Author

GitHub confused by conflict resolution, merged in a7ad4af.

@HebaruSan HebaruSan closed this Nov 2, 2020
@HebaruSan HebaruSan deleted the feature/search-dropdown branch November 2, 2020 23:02
@HebaruSan HebaruSan mentioned this pull request Nov 2, 2020
@HebaruSan HebaruSan mentioned this pull request Nov 16, 2020
@DasSkelett DasSkelett added the i18n Issues regarding the internationalization of CKAN and PRs that need translating label Jan 18, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search UI feedback
3 participants