-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UX-3157 Suggest reasonable dialog/popup sizes for popular cases #1407
base: main
Are you sure you want to change the base?
Conversation
|
||
For example, the height of the <control>Git Brunches</control> popup adapts to the amount of the content inside: | ||
|
||
![Two Git Branches popups adapting to the height of their content. The popup on the left is shorter because it has fewer branches, while the popup on the right is longer because it has more branches](dialog_popup_sizes_adaptive.png){width="706"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adapting → adapted
<tr> | ||
<td width="50%"> | ||
Vertical <control>Project</control> tool window: | ||
<img src="dialog_popup_sizes_tool_window_vertical.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
</td> | ||
<td width="50%"> | ||
Horizontal <control>Build</control> tool window: | ||
<img src="dialog_popup_sizes_tool_window_horizontal.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="369650" style="bold">Correct</format> | ||
<img src="dialog_popup_sizes_example_2_correct.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="DarkOrange" style="bold">Acceptable</format> | ||
<img src="dialog_popup_sizes_example_2_acceptable.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="369650" style="bold">Correct</format> | ||
<img src="dialog_popup_sizes_example_3_correct.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="DarkOrange" style="bold">Acceptable</format> | ||
<img src="dialog_popup_sizes_example_3_acceptable.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="369650" style="bold">Correct</format> | ||
<img src="dialog_popup_sizes_empty_state_correct.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
<tr> | ||
<td width="706"> | ||
<format color="E55765" style="bold">Incorrect</format> | ||
<img src="dialog_popup_sizes_empty_state_incorrect.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text is needed
@@ -0,0 +1,278 @@ | |||
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> | |||
|
|||
# Dialog and Popup Sizes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it's dialog and popup but in the article it's also tool windows and editor tabs. Not sure how to solve this though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly separate this article into several under the common group header? Like this:
- Default and minimum sizes
- Components
- Dialogs
- Popups
- Tool windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could just name the article 'Window sizes'? Editor tabs can be considered as a special case
|
||
### Dialog | ||
|
||
There are four recommended window sizes for dialogs: **extra small**, **small**, **medium**, and **large**. Select the size depending on the amount of content to keep the important information visible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly could make an illustration comparing this sizes where one overlays another, and show sizes on them — can serve as an "at a glance" reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking about making a preview where we could show a possible layout for each size
topics/Dialog-and-popup-sizes.md
Outdated
Size: 500×350 px | ||
|
||
Best for: | ||
* Two-column layout with a tree on one column and several components that are stacked vertically in the second column. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems 500 px width is too small for this? Is there an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's quite small. Plus, I couldn't find an example for this case, seems redundant here. I removed it
* A full-width table with two or three columns. | ||
* A full-width code editor or snippet. | ||
|
||
For example, the <control>Evaluate Expressions</control> dialog has two code snippets that are stacked vertically: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are an input field with the editor font and a tree with long lines, not code snippets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Could we come up with a collective term for these kinds of inputs? Both code snippets and input fields with code require large width. Or we could just write something like 'A full-width code snippet or input field with long text' in the last
|
||
## Minimum sizes for components | ||
|
||
When the default sizes are either too big or too small for a window, or the window has a complex layout, add minimum sizes to important content inside the window. This will make the content displayed correctly and reduce any potential issues caused by resizing the window. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think, these min sizes should always be set
- Possibly tell we have 2 sets of rules in the beginning of the article? That is, for simple cases use xs, s, m, l sizes. When it doesn't fit well, think about min sizes of controls
When the default sizes are either too big or too small for a window, or the window has a complex layout, add minimum sizes to important content inside the window. This will make the content displayed correctly and reduce any potential issues caused by resizing the window. | ||
|
||
### How to set the size correctly | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly add illustrations for types of content here? Not always clear what it is, and when it's clear, an illustration can help visualize the sizes
#### Example 1 | ||
|
||
The <control>Rename Inheritors</control> dialog has a table with FQNs. Add 350 px as the minimum width for a table column. This will make the dialog wider than the recommended 500 px but will show more of FQNs. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly show sizes on the image here? Will also help understanding how the correct example differs from the acceptable
<tr> | ||
<td width="706"> | ||
<format color="DarkOrange" style="bold">Acceptable</format> | ||
<img src="dialog_popup_sizes_example_3_acceptable.png" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the "Acceptable" example based on some sizing rules? Unclear how these paddings were chosen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I should've written here that it's the default XS size
|
||
Some components, for example, <control>tables</control>, can have an [empty state](empty_state.md) when there is no content. In this case, the minimum size depends on which state takes more space: the component with content or with an empty state. | ||
|
||
In most cases, an empty state takes less space than the minimum size of a component. In other cases, the minimum size of the component should be determined by the size of the empty state to reduce unexpected resizing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'd suggest adding an example where the component size is defined by its empty state
- Possibly write explicitly the sizes of the table again here for this particular example — we take min width and height and get this empty state size
New guideline for dialog and popup sizes