-
Notifications
You must be signed in to change notification settings - Fork 942
tabs-vika #1410
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
base: main
Are you sure you want to change the base?
tabs-vika #1410
Changes from 3 commits
18700cd
f5b84b8
82e19bf
9bcd1de
9a16ac6
806e56f
0923c69
e411fa1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,11 @@ | |
|
||
</tldr> | ||
|
||
Tabs organize content in dialogs by grouping similar UI controls. | ||
Tabs organize content by grouping similar UI controls. | ||
|
||
{width=322} | ||
{width=706} | ||
|
||
## Tabs in Code Editors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly rename this to "Tab Control Implementations" and tell that this article covers tabs in dialogs but there are two other implementations? To make it more clear about which tabs this article is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could say these are tabs for dialogs, but they also seem perfectly usable in settings — which aren’t technically dialogs anymore. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Links are good. But my concern here — info about implementation is in two separate parts, above the illustration and below it. I think it might be easier to read if it's unified. Possibly just move all links to the tldr tag and remove/shorten descriptions? Here are examples from other articles: two links to implementaitons https://plugins.jetbrains.com/docs/intellij/checkbox.html, or "Related" https://plugins.jetbrains.com/docs/intellij/got-it-tooltip.html |
||
In code editors, tabs are created with another component — [`JBEditorTabs`](%gh-ic%/platform/platform-api/src/com/intellij/ui/tabs/impl/JBEditorTabs.kt). It supports extended functionality like icons, closeable, and draggable tabs. Do **not** use this component in dialogs. | ||
|
||
In tool windows, tabs are generated automatically. See also [Tool window](tool_window.md). | ||
|
@@ -24,49 +25,71 @@ Follow the rules in [Groups of controls](groups_of_controls.md). | |
|
||
## How to use | ||
|
||
Use title capitalization for tab labels. | ||
### Label | ||
|
||
Make the label short, preferably no more than 3 words. | ||
Use title capitalization for tab labels. Make the label short, preferably no more than 3 words. | ||
Avoid generic words, such as "General" or "Advanced". | ||
See [Writing short and clear](writing_short.md). | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=284} | ||
<table style="none" border="false"> | ||
<tr> | ||
<td width="50%"> | ||
<format color="Green" style="bold">Correct</format><img src="02_How_to_use_correct.png" alt="A correct example of a tab label"/> | ||
</td> | ||
<td width="50%"> | ||
<format color="Red" style="bold">Incorrect</format><img src="02_How_to_use_incorrect.png" alt="An incorrect example of a tab label"/> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### Organization and Accessibility | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Accessibility" creates expectations that this part might tell something about voice-over, high contrast and other stuff usually associated with this word. Possibly make the header about tabs order? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe something like this? Tab Order and Layout There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! Please use sentence capitalization |
||
|
||
Place the most frequently used content in the first tab. | ||
|
||
Tabs that do not fit allotted screen space automatically hide under the dropdown component. | ||
(It is better to add no more than 8 tabs, but this number is not limited.) | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=533} | ||
{width=706} | ||
|
||
Always place tabs on top. It is possible to place them at other sides of the content — bottom, left, or right — but such a placement is extremely rare and might confuse users. | ||
### Unavailable content | ||
|
||
Do not remove or disable a tab when its function is unavailable. Explain why a tab’s content is unavailable in the body of the tab. | ||
|
||
## Placement | ||
|
||
Make sure the border of the tab reaches the edges of the area tabs occupy. | ||
### Position | ||
|
||
<format color="Red" style="bold">Incorrect</format> | ||
Always place tabs on top. It is possible to place them at other sides of the content — bottom, left, or right — but such a placement is extremely rare and might confuse users. | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=595} | ||
|
||
<format color="Green" style="bold">Correct</format> | ||
### Independent content | ||
|
||
{width=595} | ||
Do not place independent content under the tabs. Create separate tabs for such content. | ||
|
||
Do **not** surround the tab content area with a visible border. | ||
<format color="369650" style="bold">Correct</format> | ||
|
||
<format color="Red" style="bold">Incorrect</format> | ||
{width=706} | ||
|
||
{width=595} | ||
<format color="E55765" style="bold">Incorrect</format> | ||
|
||
Avoid placing independent content groups under the tabs' area. | ||
{width=706} | ||
|
||
<format color="Red" style="bold">Incorrect</format> | ||
When there are other UI controls above tabs, separate them with a vertical indent. | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=595} | ||
{width=706} | ||
|
||
When there are other UI controls above tabs, separate them with a vertical indent. | ||
### Bottom border | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=595} | ||
Make sure the border of the tab reaches the edges of the area tabs occupy. | ||
|
||
<format color="369650" style="bold">Correct</format> | ||
|
||
{width=706} | ||
|
||
<format color="E55765" style="bold">Incorrect</format> | ||
|
||
{width=706} | ||
|
||
Do **not** surround the tab content area with a visible border. | ||
WildSeaTurtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{width=706} |
Uh oh!
There was an error while loading. Please reload this page.