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

Find/replace overlay: improve focus/tab order #2161 #2515

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Nov 12, 2024

The FindReplaceOverlay currently uses the default focus order. When tabbing through the widgets, this means that when starting from the find input field you have to tab over all the search options before coming to the replace input field. Since the most often used navigation is between the two input fields for find and replace, they should come after each other in the focus order.

This change adapts the focus order of the involved elements:

  • Tab between find and replace input field
  • Tab between replace input field and the tools (starting from the search tools)
  • Tab between search/close and replace search tools (instead of coming from search/close tools to the replace input field)

Fixes #2161

Proposed Tab Order

image

Behavior

Existing tab order:
findreplace_taborder_existing

Proposed tab order:
findreplace_taborder_new

@HeikoKlare HeikoKlare marked this pull request as ready for review November 12, 2024 15:50
@HeikoKlare
Copy link
Contributor Author

@thomasritter do you agree that this proposed order/behavior is as expected?
Unfortunately, I have been thinking about a "better" solution for too long, so I am (too) late for the upcoming release. But I consider it a great improvement with respect to usability of the find/replace UI, so maybe we could still bring it into RC1.

Copy link
Contributor

github-actions bot commented Nov 12, 2024

Test Results

 1 802 files   -  19   1 802 suites   - 19   1h 51m 20s ⏱️ - 6m 10s
 7 725 tests ±  0   7 496 ✅ ±  0  228 💤 ±0  1 ❌ ±0 
23 977 runs   - 359  23 235 ✅  - 353  741 💤  - 6  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 1ecc87f. ± Comparison against base commit 69f6e45.

♻️ This comment has been updated with latest results.

The FindReplaceOverlay currently uses the default focus order. When
tabbing through the widgets, this means that when starting from the find
input field you have to tab over all the search options before coming to
the replace input field. Since the most often used navigation is between
the two input fields for find and replace, they should come after each
other in the focus order.

This change adapts the focus order of the involved elements:
- Tab between find and replace input field
- Tab between replace input field and the tools (starting from the
search tools)
- Tab between search/close and replace search tools (instead of coming
from search/close tools to the replace input field)

Fixes eclipse-platform#2161
@Wittmaxi
Copy link
Contributor

Wittmaxi commented Nov 14, 2024

This is the hack I was hoping we wouldn't need - yet, I fear it is the only logical solution to what we want (and I agree that we want this): a smooth transition from search to replace bar.

Is there a (good) way to wrap this functionality into "Accessible Toolbar"? Maybe we could add a method to the toolbars (or to the toolbar builder) allowing them to automatically do the dirty wiring so that we just need to tell toolbars A and B that "this button[A] -> that button[b]"

@HeikoKlare
Copy link
Contributor Author

This is the hack I was hoping we wouldn't need - yet, I fear it is the only logical solution to what we want (and I agree that we want this): a smooth transition from search to replace bar.

I agree that the solution is not that nice, but I would not call it a hack either. I do not see any option than a custom handling of tab events, as a custom definition leading to an automated handling of tab event is not allowed across composite border, at least on Windows (if I am not mistaken).

Is there a (good) way to wrap this functionality into "Accessible Toolbar"? Maybe we could add a method to the toolbars (or to the toolbar builder) allowing them to automatically do the dirty wiring so that we just need to tell toolbars A and B that "this button[A] -> that button[b]"

We could wrap the establishment of each wiring into a method, but without quite some additional effort that would increase the number of listeners involved. Wrapping this into the accessible toolbar is not possible, because there are other elements than accessible toolbar involved (like the text field).

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

Successfully merging this pull request may close these issues.

Find/replace overlay: improve switching between find and replace input fields
2 participants