eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Redesign Message Dialog

Open SougandhS opened this issue 8 months ago • 16 comments

Removes unwanted space and aligns message content & buttons to center

Before image
After Screenshot 2025-04-22 at 1 02 49 PM

Fixes : https://github.com/eclipse-platform/eclipse.platform.ui/issues/2929

SougandhS avatar Apr 23 '25 01:04 SougandhS

Test Results

 1 824 files  ±0   1 824 suites  ±0   1h 30m 39s ⏱️ - 7m 15s  7 918 tests ±0   7 690 ✅ +1  228 💤 ±0  0 ❌  - 1  23 841 runs  ±0  23 093 ✅ +1  748 💤 ±0  0 ❌  - 1 

Results for commit cd6224c7. ± Comparison against base commit e6eb975e.

github-actions[bot] avatar Apr 23 '25 05:04 github-actions[bot]

As the discussion on the bug reveals, there is no obvious consensus to find between aligned left vs centered; however, all OSs recommend to get the width fit the content (ie no extra space), so I think for a first iteration, we should focus on just saving the extra space (changing the min width to 0 or DEFAULT), and consider whether to center or not later; maybe if all OSs align on the same recommendation some day.

mickaelistria avatar Apr 23 '25 13:04 mickaelistria

Updated one

image

SougandhS avatar Apr 24 '25 06:04 SougandhS

I'm seeing an issue with the given patch: the MessageDialog now tends to become too large:

Before Screenshot From 2025-04-25 13-18-19

After Screenshot From 2025-04-25 13-16-31

mickaelistria avatar Apr 25 '25 11:04 mickaelistria

I'm seeing an issue with the given patch: the MessageDialog now tends to become too large:

Made minor adjustment for these cases

SougandhS avatar Apr 26 '25 05:04 SougandhS

I asked our inhouse UX-Experts. This is what they say:

We would not recommend the centered alignment of dialog content in Eclipse – even for short texts like "Save ‘NAME.filetype‘?" – for several reasons:

  • This dialog is displayed for only a few seconds and does not obscure any relevant content. Removing the empty line between the text and the buttons, as well as centering the text, worsens readability – we do not see any advantages in this approach.
  • Left-aligned dialogs with right-aligned buttons are common desktop practices (e.g., Windows, macOS). Centered dialogs are more typical in mobile UIs where space is limited. On the desktop, space shouldn't be an issue.
  • Prompts would wrap to two lines in the centered dialog quite easily. The current "airy issue" with short names could potentially turn into a "squeezed issue" with long names.

BeckerWdf avatar Apr 28 '25 11:04 BeckerWdf

I asked our inhouse UX-Experts. This is what they say:

Thanks for checking ✨

SougandhS avatar Apr 28 '25 23:04 SougandhS

@SougandhS So are you going to continue with some other ideas here or are you giving up on the idea (and the PR should be closed)?

akurtakov avatar Apr 29 '25 04:04 akurtakov

@SougandhS So are you going to continue with some other ideas here or are you giving up on the idea (and the PR should be closed)?

I have a small idea.. [ Not sure everyone agrees :) ] For small texts can we reduce the width a bit atleast ? image

SougandhS avatar Apr 29 '25 04:04 SougandhS

I have a small idea.. [ Not sure everyone agrees :) ] For small texts can we reduce the width a bit atleast ?

image image

SougandhS avatar Apr 29 '25 04:04 SougandhS

I have a small idea.. [ Not sure everyone agrees :) ] For small texts can we reduce the width a bit atleast ?

image image

Where's the difference?

BeckerWdf avatar Apr 29 '25 06:04 BeckerWdf

Where's the difference?

Before
image

after

image

SougandhS avatar Apr 29 '25 06:04 SougandhS

and how does this change look for other dialogs?

BeckerWdf avatar Apr 29 '25 06:04 BeckerWdf

and how does this change look for other dialogs?

Yes did checked one Before image
After
image

SougandhS avatar Apr 29 '25 07:04 SougandhS

I don't see a clear benefit with this change. IMO, the desired format is https://github.com/eclipse-platform/eclipse.platform.ui/pull/2934#issuecomment-2826495220 and anything else is not worth being pursued. I don't know the details about why https://github.com/eclipse-platform/eclipse.platform.ui/pull/2934#issuecomment-2826495220 cannot be implemented reliably. Is it because changing the horizontal span is required? Aren't there alternative that can be found? eg is the 2 columns layout used because of image? If so, then couldn't we dynamically decide of the span or layout according to whether image is null or not?

mickaelistria avatar Apr 29 '25 07:04 mickaelistria

eg is the 2 columns layout used because of image? If so, then couldn't we dynamically decide of the span or layout according to whether image is null or not?

I tried modifying IconAndMessageDialog.getColumnCount() to return 1, but the extra space remained regardless of Image. It only disappeared after I also updated data.horizontalSpan = 1 in MessageDialog.createDialogArea(Composite).

SougandhS avatar Apr 29 '25 10:04 SougandhS