Fix dropdown styling when window is resized#16951
Open
ankitsharma101 wants to merge 2 commits intoeclipse-theia:masterfrom
Open
Fix dropdown styling when window is resized#16951ankitsharma101 wants to merge 2 commits intoeclipse-theia:masterfrom
ankitsharma101 wants to merge 2 commits intoeclipse-theia:masterfrom
Conversation
Fixes eclipse-theia#16865 Multiple consecutive spaces in file and folder names were being collapsed to single spaces in tree views due to white-space: nowrap. Changed white-space from 'nowrap' to 'pre' in .theia-TreeNodeSegment and .theia-TreeNodeSegmentGrow in packages/core/src/browser/style/tree.css to preserve exact spacing in all tree views.
Fixes eclipse-theia#12619 When you resize the window while a dropdown is open in the preferences page, the dropdown stays open but the positioning gets messed up. I added a resize listener that closes the dropdown when the window size changes. Also made sure to clean up the listener properly to avoid any memory leaks. Note: I couldn't test this locally (Windows build issues), but the approach is pretty standard for this kind of thing. Would appreciate if someone could verify it works!
This was referenced Feb 6, 2026
Member
|
Hi @ankitsharma101, thanks for your contribution! A few things we'd like to address before we can move forward with this PR:
TIA! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick note on the implementation:
I went with the simple approach of blurring the active element when the window resizes. This means any open dropdown will close automatically.
I considered trying to reposition the dropdown instead, but closing seemed safer and less likely to cause weird edge cases. Let me know if you think repositioning would be better though!
Also, since I couldn't test locally, I'd especially appreciate feedback on:
Thanks for taking the time to review!