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

Add close button to find/replace overlay #1991 #2032

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Jul 4, 2024

The find/replace overlay can currently only be closed via pressing Escape or using the shortcut CTRL+F when the overlay has input focus. This change adds a close button to the overlay for providing an easy and comprehensible way of closing the overlay.

In order to be compatible with different themes on all OS, we can, unfortunately, not reuse some shared close icons (i.e., one already provided in the platform.ui plugins). The icon adopts the color scheme (i.e., the same shade of gray) of the existing search options buttons.

Contributes to #1991

How it looks like (Windows)

image
image

Alternatives

As an alternative, this is how it looks like with a preceding separator.
image
That would clearly separate the single closing operation from the preceding search operations, but in my opinion it bloats up the overlay providing a significant benefit. Still it would be great to have our opinions (on the alternative as well as the proposal in general).

PR for images repository

The images (including the orignal SVG) are provided here: eclipse-platform/eclipse.platform.images#80

Relation to other PRs

If this is merged before #2030, that PR will probably need some adaptation for the considerations of the toolbars on size calculation.

HeikoKlare added a commit to HeikoKlare/eclipse.platform.images that referenced this pull request Jul 4, 2024
Copy link
Contributor

github-actions bot commented Jul 4, 2024

Test Results

 1 815 files  + 2   1 815 suites  +2   1h 33m 40s ⏱️ - 2m 59s
 7 663 tests ± 0   7 434 ✅ + 1  228 💤 ±0  1 ❌  - 1 
24 150 runs  +18  23 400 ✅ +19  749 💤 ±0  1 ❌  - 1 

For more details on these failures, see this check.

Results for commit 05f134e. ± Comparison against base commit 80c6da9.

♻️ This comment has been updated with latest results.

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Looks good to me.

That would clearly separate the single closing operation from the preceding search operations, but in my opinion it bloats up the overlay providing a significant benefit.

Agree on that. On first sight it would be nice to separate it, but since all buttons on the right of the first separator are some kind of control buttons, I think it is fine to group them all together.

@Wittmaxi
Copy link
Contributor

Wittmaxi commented Jul 5, 2024

Ia agree that we shouldn't separate the closing-button, a separator would just add more to visually process and does not add any clear benefit.

Code looks sound!

@Wittmaxi
Copy link
Contributor

Wittmaxi commented Jul 5, 2024

I have documented the second part of the issue (which was only documented in the trace of comments below)
here #2033

@HeikoKlare HeikoKlare marked this pull request as ready for review July 5, 2024 05:56
@HeikoKlare HeikoKlare marked this pull request as draft July 5, 2024 06:15
@HeikoKlare
Copy link
Contributor Author

Thank you for your quick feedback!
I just found noticed that by adding the close button to the existing search tools bar, it will be hidden when the editor becomes too small. That's not intended, so I will update the PR with the close button placed in a different toolbar that is not hidden when space is limited.

@HeikoKlare
Copy link
Contributor Author

I have updated the PR so that the close button will always stay visible (even in the most reduced configuration of the overlay).
find_replace_close

@HeikoKlare HeikoKlare marked this pull request as ready for review July 5, 2024 06:48
@vogella
Copy link
Contributor

vogella commented Jul 5, 2024

Look great, thanks

Copy link
Contributor

@BeckerWdf BeckerWdf left a comment

Choose a reason for hiding this comment

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

Looks good and manually test on macOS dark theme is fine.

@vogella
Copy link
Contributor

vogella commented Jul 5, 2024

This new close icon can also be used to update the ugly notification close API. See #2035

The find/replace overlay can currently only be closed via pressing
Escape or using the shortcut CTRL+F when the overlay has input focus.
This change adds a close button to the overlay for providing an easy and
comprehensible way of closing the overlay.

Contributes to
eclipse-platform#1991
@HeikoKlare
Copy link
Contributor Author

I consider your positive feedback as a general approval, so I will merge this PR now. In case there are things to change/optimize, we can still do that as a follow-up, but I guess it's good to have an easy way to close the overlay provided as soon as possible.

The failing test is a known random failure (#926) and the freeze period check is just because of M1 promotion, which does not forbid merges anymore.

@HeikoKlare HeikoKlare merged commit ecfde49 into eclipse-platform:master Jul 5, 2024
13 of 16 checks passed
@HeikoKlare HeikoKlare deleted the issue-1991 branch July 5, 2024 13:03
HeikoKlare added a commit to eclipse-platform/eclipse.platform.images that referenced this pull request Jul 5, 2024
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.

5 participants