-
Notifications
You must be signed in to change notification settings - Fork 899
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
topics/Dialog-and-popup-sizes.md
Outdated
|
||
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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
</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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
@@ -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
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 "Window sizes" are ok!
topics/Dialog-and-popup-sizes.md
Outdated
|
||
### 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
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.
Very nice illustration! Possibly add sizes names to the illustration?
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
topics/Dialog-and-popup-sizes.md
Outdated
* 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
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.
'A full-width code snippet or input field with long text' in the last — I'm for this change, thanks!
topics/Dialog-and-popup-sizes.md
Outdated
|
||
## 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
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.
Added the paragraph in the beginning about the rules
topics/Dialog-and-popup-sizes.md
Outdated
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
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.
Thanks for the idea!
topics/Dialog-and-popup-sizes.md
Outdated
#### 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
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.
Good idea, thanks
topics/Dialog-and-popup-sizes.md
Outdated
<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
topics/Dialog-and-popup-sizes.md
Outdated
|
||
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
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.
Couldn't find an example for the case when the size of a component is defined by its empty state, and I am not even sure it exists
topics/Window-sizes.md
Outdated
|
||
Follow these guidelines to select the correct size when creating a dialog or a popup for IntelliJ-based products. | ||
|
||
For simple cases use default sizes for [dialogs](Window-sizes.md#default-sizes) and [popups](Window-sizes.md#popup). When default sizes don't work well, set [minimum sizes for components](Window-sizes.md#minimum-sizes-for-components). |
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 make "default sizes" a link here, remove "for dialogs and popups", because there are also 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.
You're right, thanks!
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.
✅
topics/Window-sizes.md
Outdated
|
||
![A preview of recommended window sizes for dialogs: extra small, small, medium, and large](dialog_popup_sizes.png){width="706"} | ||
|
||
<note>When setting the default size for your dialog, it should be impossible to make it smaller.</note> |
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.
Could it be rewritten a big shorter, e.g. "It should be impossible to make a dialog smaller than its default size." or "The dialog cannot be made smaller than the default size."
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.
✅ Fixed, thanks!
topics/Window-sizes.md
Outdated
|
||
Best for: | ||
* A full-width table with four or more columns. | ||
* Two-column layout with an image or a video in any of the columns. In this case, the image or the video takes the most space. |
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 call it a "master-detail layout" instead of "two-column"? Or does "two-column" include both the master-detail and two columns that don't depend on each other?
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.
Yeah, by 'two-column' I meant both cases with a master detail and without. I'll write it down explicitly to remove any questions then, thanks
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.
✅
topics/Window-sizes.md
Outdated
|
||
Best for: | ||
* A full-width table with four or more columns. | ||
* Two-column layout with an image or a video in any of the columns. In this case, the image or the video takes the most space. |
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.
Images and videos are very rare for the IDEs, I'd suggest putting this bullet point in the end of this list
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.
✅
topics/Window-sizes.md
Outdated
|
||
## 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.
What is "important" content? Possibly just remove this word?
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.
✅ Removed
topics/Window-sizes.md
Outdated
</table> | ||
|
||
2. What type of content is used: | ||
|
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.
The central alignment for content that is usually left-aligned seem a big unexpected. Possibly left-align lines inside each of the examples?
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.
✅ Thought this too, fixed
topics/Window-sizes.md
Outdated
|
||
#### 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.
"recommended 500 px" — both 350 px for FQN and 500 px for dialog are recommened, so I'd suggest changing this phrase to "default Small size (500x350 px)"
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.
✅ Fixed, thanks
topics/Window-sizes.md
Outdated
|
||
#### Example 3 | ||
|
||
Add horizontal and vertical 100 px insets inside the <control>Diagram</control> popup to make it adaptable to the different amounts of content inside. |
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.
It seems, the dialog can adapt to content regardless of how much empty space it has. Possibly, the 100 px insets help the diagram dialog be more noticeable when the diagram is small, and also makes the diagram easier to read because the edge nodes are further away from the edges.
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.
Also, I'd suggest mentioning what default size is used for the Acceptable case.
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, thanks! I changed the content of this example
…is displayed' and 'Type of content' tables
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.
Great work, added some comments
|
||
Follow these guidelines to select the correct size when creating a dialog or a popup for IntelliJ-based products. | ||
|
||
For simple cases use [default sizes](Window-sizes.md#default-sizes). When they don't work well, set [minimum sizes for components](Window-sizes.md#minimum-sizes-for-components). |
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.
"set minimum sizes" is not 100% clear here. does it mean to "set your dialog width and height to minimum values described below" or " set minimum and maximum width and height as described below"? if the latter, still not clear which sizes to use if standard sizes don't fit
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.
The link actually refers to a different chapter about components and controls sizes inside dialogs and popups
|
||
![A preview of recommended window sizes for dialogs: extra small, small, medium, and large](dialog_popup_sizes.png){width="706"} | ||
|
||
<note>A dialog can't be made smaller than the default size.</note> |
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 clarify a bit: The user shouldn't be able to resize the dialog to smaller dimensions than the defined standard size.
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.
It actually was something like you suggested at first, but then we made it shorter and now it kinda works fine as well
Size: 500×350 px | ||
|
||
Best for: | ||
* Multiple components with short labels that are divided into two columns. |
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.
Ideally, each case requires its own sample, but I understand it might be too much for this article already
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.
Yeah, I suppose the guide would be super hard to read + there is not much content for each specific bullet point
topics/Window-sizes.md
Outdated
* Two-column layout with code snippets or input fields with long texts in both columns. | ||
* Three-or-more-column layout regardless of the content. | ||
|
||
For example, <control>Code Style</control> settings for Java in the <control>Settings</control> dialog. The dialog has three columns with a tree, a table, and a code snippet in different columns: |
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 is not clear if this size is applied to a specific page of the Settings dialog. How does it work in this case? Should it resize automatically?
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.
Good point. I rewrote this part
topics/Window-sizes.md
Outdated
|
||
### Popup | ||
|
||
Popups should have the same default width as dialogs. In addition, there is an **extra small** size for popups – 200 px wide, when the content is narrow. |
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.
add a link to deault dialog size section here
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.
Thanks, added!
topics/Window-sizes.md
Outdated
|
||
### Popup | ||
|
||
Popups should have the same default width as dialogs. In addition, there is an **extra small** size for popups – 200 px wide, when the content is narrow. |
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.
wide, when - the comma is not needed here
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.
Thanks, removed!
|
||
Popups should have the same default width as dialogs. In addition, there is an **extra small** size for popups – 200 px wide, when the content is narrow. | ||
|
||
<note>A popup can't be made smaller than the default size.</note> |
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.
the same suggestion as above
topics/Window-sizes.md
Outdated
|
||
#### Maximum width and height | ||
|
||
The maximum width and height shouldn't exceed 80% of a screen size. Use a [scrollbar](scrollbar.md) if a popup's content doesn't fit within the set dimensions. |
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.
can we write here something like: set maximum dimensions to 80% of a screen size
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.
Thanks, yeah, this is simpler
New guideline for dialog and popup sizes