Skip to content

Comments

Fix dropdown styling when window is resized#16951

Open
ankitsharma101 wants to merge 2 commits intoeclipse-theia:masterfrom
ankitsharma101:master
Open

Fix dropdown styling when window is resized#16951
ankitsharma101 wants to merge 2 commits intoeclipse-theia:masterfrom
ankitsharma101:master

Conversation

@ankitsharma101
Copy link
Contributor

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:

  1. Does it feel smooth when resizing?
  2. Should we add a small delay to avoid closing too aggressively?
  3. Any unexpected side effects?

Thanks for taking the time to review!

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!
@ndoschek
Copy link
Member

ndoschek commented Feb 9, 2026

Hi @ankitsharma101, thanks for your contribution! A few things we'd like to address before we can move forward with this PR:

  1. Could you please fill in the PR using our pull request template as we use this as part of our changelog generation.
  2. We usually expect contributions to be tested locally before submission, as this helps ensure the changes work as intended and keeps the review process efficient.
    Our developer guide describes how to set up the development environment. If you’re running into issues with the setup, feel free to let us know, happy to help you get unblocked.
  3. The lint check is currently failing, can you please have a look and fix this?

TIA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

2 participants