Skip to content

Conversation

@arunjose696
Copy link
Contributor

Previously, JFace wizard dialogs could have their content cut off without any scrollbars. This occurred when users resized the dialog or moved it between monitors, where size adjustments caused by rounding could make the dialog smaller than its content. As a result, parts of the UI could become inaccessible without any visual indication.

This change wraps the content in a ScrolledComposite, with vertical and horizontal scrollbars so users can still access all content even when the dialog becomes smaller.

Steps to reproduce

1)Open a new class dialog in eclipse IDE
2)Resize it to make it smaller to see the scrollbars appear with this change

Previously, JFace wizard dialogs could have their content cut off without any
scrollbars. This occurred when users resized the dialog or moved it between
monitors, where size adjustments caused by rounding could make the dialog
smaller than its content. As a result, parts of the UI could become inaccessible
without any visual indication.

This change wraps the content in a ScrolledComposite, with
vertical and horizontal scrollbars so users can still access all content even
when the dialog becomes smaller.
@arunjose696 arunjose696 linked an issue Nov 18, 2025 that may be closed by this pull request
Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

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

@arunjose696 I don't think this is a valid change. This will suddenly affect all users of WizardDialog (and even break if they depend on internal behavior).

If anything needs to be done (resizing / relayout / ...) then we need to register a zoom change listener and perform the adjustment in a new protected methods so consumers can possibly override that method.

@arunjose696
Copy link
Contributor Author

@arunjose696 I don't think this is a valid change. This will suddenly affect all users of WizardDialog (and even break if they depend on internal behavior).

The design of the wizard dialog seems pretty flawed as one can resize (and in particular shrink) it without a scrollbar being provided for the contents. wouldnt the dialogs function as before if the content fits right and The scrollbars only show up when something gets clipped, wouldnt this be a reasonable default for all wizard dialogs?

If anything needs to be done (resizing / relayout / ...) then we need to register a zoom change listener and perform the adjustment in a new protected methods so consumers can possibly override that method.

I can move this to a protected method, but Would it be OK to make the scrolling behavior opt-out? That way anyone who relies on the old behavior can override it, while everyone else gets a scrollbars as default?

@laeubi
Copy link
Contributor

laeubi commented Nov 18, 2025

The design of the wizard dialog seems pretty flawed as one can resize (and in particular shrink) it without a scrollbar being provided for the contents.

This is for sure but we can't just change it. Also the question is more is the wizard dialog flawed or the implementation that puts content into the dialog. e.g. if I carefully design my controls to have some content that do scrolling (e.g. a table) I won't see the issue but now possibly getting additional scrollbars.

What JFace (and SWT in general) mostly miss is the concept of a min / max size of controls.

I can move this to a protected method, but Would it be OK to make the scrolling behavior opt-out?

No see above, only opt-in would be compatible but I doubt we should do it. If I want such behavior I can create s scrolled composite on my own (what has its own limitations and quirks).

while everyone else gets a scrollbars as default?

Scrollbars of the full content are really a wore UI design on its own and should really never be used without care or other options considered before.

@github-actions
Copy link
Contributor

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 6m 9s ⏱️ - 11m 10s
 8 234 tests ±0   7 985 ✅ ±0  249 💤 ±0  0 ❌ ±0 
23 622 runs  ±0  22 828 ✅ ±0  794 💤 ±0  0 ❌ ±0 

Results for commit af87311. ± Comparison against base commit a3fa065.

@arunjose696
Copy link
Contributor Author

This is for sure but we can't just change it. Also the question is more is the wizard dialog flawed or the implementation that puts content into the dialog. e.g. if I carefully design my controls to have some content that do scrolling (e.g. a table) I won't see the issue

To fix the issue in implementatation to fix issues with new class dialog I have opened the below PR in JDT so closing this effort

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.

Text cut-off in new class dialog

2 participants