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

eclipse quick search... make results box NOT modal #189

Closed
mattcsl opened this issue Jan 23, 2019 · 13 comments
Closed

eclipse quick search... make results box NOT modal #189

mattcsl opened this issue Jan 23, 2019 · 13 comments
Milestone

Comments

@mattcsl
Copy link

mattcsl commented Jan 23, 2019

This is for the quick search plugin. Not sure if this is the right place, but can we PLEASE make the results box NOT modal. Thanks!

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

I've changed the dialog to be non-modal.

I also added a 'keep open' option in the pulldown menu on the top-right corner of the dialog.

So, the dialog is allways modeless now (so you can click outside the dialog and use the editor etc).

The keep open option does not affect this, but it determines whether the dialog closes when you make a selection by double-click or enter key (clicking the ok button will still always close the dialog).

For acceptance testing. There are 3 ways to make a selection:

  • double click a item
  • select item (arrows keys or click), then press enter
  • press ok button.

The behavior (whether dialog is closed) is affected by the 'keep open' option which can be on or off.

So there are 6 (2 times 3) scenarios to try out.

@mattcsl
Copy link
Author

mattcsl commented Jan 29, 2019

Thanks so much for doing this! How do I go about testing this in eclipse? I currently am running the Eclipse Quicksearch plugin 3.9.7.201812200835-RELEASE. How do I upgrade it to 4.1.2-RELEASE? I know how to clone the git repo. What are the next steps?

@kdvolder
Copy link
Member

The easiest way to try it is from nightly/snapshot build. For qicksearch component you can install it from this update site:

https://dist.springsource.com/snapshot/TOOLS/eclipse-integration-commons/nightly

Do not click the link above. This doesn't work. What you do instead is:

  • In STS open "Help >> Install New Software"
  • Paste the update site url into the 'work with' box at the top of the dialog
  • Select "Eclipse quicksearch" under "Core / Eclipse Integration Commons"
  • Click Next and follow the dialog to its logical conclusion.

After STS is restarted you should have a new version of the quicksearch plugin.

This should work fine with the version of STS you have.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

Testing the nightly update site I noticed the new version of the dialog is not resizable. I think the old one was.

I found that somewhat annoying, especially when the dialog is used as a modeless dialog. You kind of want to be able to downsize it and set it aside so you can use the rest of of your screen for other work.

So I just pushed a small tweak that makes the dialog resizable again.

@kdvolder
Copy link
Member

@mattcsl

You may want to wait for this build to complete: https://build.spring.io/browse/IDE-COMMONSE44CI-430
As mentioned above. My first 'attempt' made the dialog no longer resizable.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

Hmm... my little tweak to make dialog resizable seems to have broken the 'Keep Open' option somehow. The dialog now allways closes when I select an item.

Invesitigating.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

Okay so, couldn't seem to find a way that makes it work so pressing 'enter' wouldn't close the dialog but clicking ok would. Somehow pressing enter also cause a 'ok button' even to be fired. So it seems to be all or nothing.

I changed it so now ok button, pressing enter or double clicking allways handled the same way. So if the 'Keep open' option is selected it will keep the dialog open for all 3 cases.

The best I can do for now.

@mattcsl
Copy link
Author

mattcsl commented Jan 29, 2019

Added the nightly build to my updates sites and installed the update. Non-modal seems to working great with a few searches I have performed. The ok button doesn't seem to do much, but I always close with the window close button anyways. You guys are awesome thanks again!

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

I like the current behavior, feels good to use. But I think we should rename the "OK" button to something like "SHOW" or "GO", to indicate that this doesn't necessarily close the dialog, but triggers the action to navigate to the selected element.

We could also disable the button as long as there is no item selected.

Another case that I found while testing:
You search for something in the dialog, keep it open, then close the corresponding project (or rename something or whatever), and then click "GO" (or "OK"), there is an editor being opened with an error message telling you that the resource doesn't exist. While that is correct, we should maybe do the check ourselves upfront.

So not sure what exactly we should do about this here. In fact the resources could change after the search found something in it. What should we do about that? Should we automatically re-trigger the search when a resource got created/changed/deleted? Or should we just check if the resource still exists? Even in that case, the position inside of the resource might no longer exist or might be wrong.

On the other side, constantly re-triggering the search if you keep it open for a long time while continuing working on files and projects might cause way too much work being done in the background.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

Another idea: we could listen for resource changes and add some status message to the search results dialog that tells the user that the results might be out-of-date - just as an indicator.

@kdvolder
Copy link
Member

kdvolder commented Jan 30, 2019

I don't want to get too fancy in dealing with resource changes. I think users are smart enough to understand that if a search is old and they made changes, the result may no longer be valid. I don't think they need a lot of handholding here. But I think it would be useful, assuming user understand search results can be stale, they could trigger a refresh if they wanted.

So here's my plan:

  • Rename the 'ok' button to something else ('go' ?).
  • Disable the 'go' button when no selection is active
  • Remove the 'cancel' button (window has a close box, which serves the same purpose).
  • Add a 'Refresh' button

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

Tested the latest version and it looks totally fine to me. But I would like to switch the default setting of the dialog to "not keep open".

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

Added an item to switch the default setting to modal: #163720788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants