Bug 343317 - [ui] Accessibility issue: If Install / Update dialog is resized smaller - it does not have scroll bars and text is cut off
Summary: [ui] Accessibility issue: If Install / Update dialog is resized smaller - it ...
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-04-19 17:33 EDT by Janet Dmitrovich CLA
Modified: 2019-10-29 18:36 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet Dmitrovich CLA 2011-04-19 17:33:16 EDT
Build Identifier: 3.4.2 Build id: M20090211-1700

On Windows XP go to Control Panel->Accessibility Options, choose the "display" tab, check "use high contract". click OK button. then the system come into large characters and high contrast model.

1. Help->Software Updates->Find and Install 
The install/update dialog shows. Drag the dialog to be smaller, the content can't totally show and there are no scroll bars either.
2. The same problem shows on the next  "Install", "Update", "Install/Update", "Update Manager" dialogs, 

Reproducible: Always
Comment 1 Carolyn MacLeod CLA 2011-11-29 12:58:58 EST
In more recent versions of Eclipse, these dialogs have been merged into a single dialog in Help -> Install New Software...

The dialog in question is quite large, and in high contrast mode, it does become large enough that it would require scrollbars on a less-than-high resolution monitor. (On my 1600 x 1200 display it looks fine in high resolution, unless I resize it to be smaller... which is not recommended...).

So what this dialog needs (in order to be readable on small monitors) is an org.eclipse.swt.custom.ScrolledComposite parent for the client area.

I am assuming that this is not something the JFace folks would like to add for all dialogs, in org.eclipse.jface.dialogs.Dialog.createDialogArea(Composite) and/or maybe org.eclipse.jface.wizard.WizardDialog.createDialogArea(Composite).
Paul, is this correct?

On that assumption, then, this particular dialog class is called:
org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardDialog

And the git repository to clone to see its source code is:
http://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git
(Just get the 'master' branch. When you import projects, select the org.eclipse.equinox.p2.ui bundle).

Paul, can you suggest the best way to approach this? Should org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardDialog override org.eclipse.jface.wizard.WizardDialog.createPageContainer(Composite) and create a ScrolledComposite for the pageContainer instead of a Composite?

Or should they create a ScrolledComposite on every org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardPage, for example in org.eclipse.equinox.internal.p2.ui.dialogs.AvailableIUsPage.createControl(Composite) and org.eclipse.equinox.internal.p2.ui.dialogs.SelectableIUsPage.createControl(Composite) and org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage.createControl(Composite) and org.eclipse.equinox.p2.ui.AcceptLicensesWizardPage.createControl(Composite)?

In case it's helpful, an example of creating a ScrolledComposite parent to contain dialog contents can be found in the Preferences dialog. Automatic scrolling will occur if the dialog gets too small, for example in high contrast mode. Here's the method where the PreferenceDialog creates a ScrolledComposite:
org.eclipse.jface.preference.PreferenceDialog.createPageContainer(Composite)
(the source for this class can be found in http://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git in the org.eclipse.jface project)
Comment 2 Paul Webster CLA 2011-11-30 12:53:58 EST
Susan, do you have any opinion on making the org.eclipse.jface.wizard.WizardDialog (org.eclipse.jface) follow the same pattern as the org.eclipse.jface.preference.PreferenceDialog and providing a protected createPageContainer(Composite parent) method?

We would probably make the current method on WizardDialog protected and allow the subclasses (like ProvisioningWizardDialog) to override with something similar to the PreferencesDialog.

PW
Comment 3 Susan McCourt CLA 2011-12-01 23:03:38 EST
(In reply to comment #2)
> Susan, do you have any opinion on making the
> org.eclipse.jface.wizard.WizardDialog (org.eclipse.jface) follow the same
> pattern as the org.eclipse.jface.preference.PreferenceDialog and providing a
> protected createPageContainer(Composite parent) method?
> 
> We would probably make the current method on WizardDialog protected and allow
> the subclasses (like ProvisioningWizardDialog) to override with something
> similar to the PreferencesDialog.


That sounds right to me.  ProvisioningWizardDialog is internal to p2, so from a p2 point of view, there is no risk at all in exposing that method.

From a jface point of view, making createPageContainer dialog doesn't seem like a huge risk, but we should doc it as explicitly as possible...ie, any layouts we assume the container has (gridlayout), etc. etc.
Comment 4 Dani Megert CLA 2011-12-07 08:28:06 EST
> From a jface point of view, making createPageContainer dialog doesn't seem like
> a huge risk, but we should doc it as explicitly as possible...ie, any layouts
> we assume the container has (gridlayout), etc. etc.

As this can't be guaranteed for existing code, I guess the new behavior would be off by default, right?
Comment 5 Paul Webster CLA 2011-12-07 10:16:45 EST
(In reply to comment #4)
> 
> As this can't be guaranteed for existing code, I guess the new behavior would
> be off by default, right?

Right now it is simply an internal method on WizardDialog, used by createDialogArea(*).  Clients that actually subclass WizardDialog would have overridden createDialogArea(*) and would not be effected.

PW
Comment 6 Dani Megert CLA 2011-12-07 10:23:59 EST
(In reply to comment #5)
> (In reply to comment #4)
> > 
> > As this can't be guaranteed for existing code, I guess the new behavior would
> > be off by default, right?
> 
> Right now it is simply an internal method on WizardDialog, used by
> createDialogArea(*).  Clients that actually subclass WizardDialog would have
> overridden createDialogArea(*) and would not be effected.

Yes, but they could currently also call super.createDialogArea(...) and if we now start to expect a certain layout, they might be broken, no?
Comment 7 Paul Webster CLA 2011-12-07 10:37:20 EST
(In reply to comment #6)
> Yes, but they could currently also call super.createDialogArea(...) and if we
> now start to expect a certain layout, they might be broken, no?

ah, I agree.  This will have to be equivalent to a no-op for those that do override WizardDialog, unless they make the change (opt in).

PW
Comment 8 Susan McCourt CLA 2011-12-07 12:34:05 EST
yeah, I wasn't suggesting any new constraints.  Just that we try to doc the assumptions that are implicit in overriding that method.  Such as "if you override this method and do not override createDialogArea, your page container must....<insert assumptions here>"
Comment 9 Eclipse Genie CLA 2019-10-29 18:36:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.