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

Properly update find/replace overlay size and displayed widgets #2006 #2030

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

HeikoKlare
Copy link
Contributor

Currently, the widgets in the find/replace overlay (search options, replace expand bar) are not always properly updated on size changes of the target editor. This is complicated by the implementation mixing up the calculation of the overlay size and the calculations to determine which widgets are displayed, which also leads to the missing updates the UI upon certain events requiring the resizing of the overlay.

With this change, the calculations for the overlay size and the determination of the displayed widgets are separated. This also makes a template string for a "compromise text length" obsolete. It also removes the "size gap" between the minimal width of the overlay with the replace expansion bar, taking up 70% of the editor width, and the size of the width of the overlay without the replace expansion bar, taking up 95% of the editor width.

Fixes #2006

Before

find_replace_maximize_before

After

find_replace_maximize_after

@HeikoKlare
Copy link
Contributor Author

@Wittmaxi maybe you want to have a look at this, as it slightly changes the resizing behavior of the overlay.

Copy link
Contributor

github-actions bot commented Jul 4, 2024

Test Results

 1 815 files  ±0   1 815 suites  ±0   1h 32m 27s ⏱️ +25s
 7 663 tests ±0   7 435 ✅ +1  228 💤 ±0  0 ❌  - 1 
24 150 runs  ±0  23 401 ✅ +1  749 💤 ±0  0 ❌  - 1 

Results for commit 7544b9d. ± Comparison against base commit 44dc49e.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review July 4, 2024 15:21
@BeckerWdf
Copy link
Contributor

I could not see this issue (before this change) on macOS. Is this only visible on windows?

@HeikoKlare
Copy link
Contributor Author

I could not see this issue (before this change) on macOS. Is this only visible on windows?

Indeed, I cannot reproduce the problem on MacOS. But I see it on Windows and Linux.

@Wittmaxi
Copy link

Wittmaxi commented Jul 6, 2024

This looks like a proper fix for the issue, the refactoring-on-the-fly is helpful for the code quality. I also could not find any bugs while testing.

…se-platform#2006

Currently, the widgets in the find/replace overlay (search options,
replace expand bar) are not always properly updated on size changes of
the target editor. This is complicated by the implementation mixing up
the calculation of the overlay size and the calculations to determine
which widgets are displayed, which also leads to the missing updates the
UI upon certain events requiring the resizing of the overlay.

With this change, the calculations for the overlay size and the
determination of the displayed widgets are separated. This also makes a
template string for a "compromise text length" obsolete. It also removes
the "size gap" between the minimal width of the overlay with the replace
expansion bar, taking up 70% of the editor width, and the size of the
width of the overlay without the replace expansion bar, taking up 95% of
the editor width.

Fixes eclipse-platform#2006
@HeikoKlare HeikoKlare merged commit e786511 into eclipse-platform:master Jul 6, 2024
16 checks passed
@HeikoKlare HeikoKlare deleted the issue-2006 branch July 6, 2024 13:44
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: Buttons sometimes missing
3 participants