-
Notifications
You must be signed in to change notification settings - Fork 964
UX-3614 Tool Window Guideline #1649
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?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -6,50 +6,114 @@ | |
|
|
||
| A tool window is a pane inside the main IDE window. For information about tool windows, see [IntelliJ IDEA Web Help](https://www.jetbrains.com/help/idea/tool-windows.html). For information about implementing tool windows, see [](tool_windows.md). | ||
|
|
||
| {width=960} | ||
| {width=706} | ||
|
|
||
| ## When to use | ||
|
|
||
| Use the tool window to show a large amount of information that the user needs while working side-by-side with the editor or other tool windows. For example, viewing the project structure, running and debugging an application, and viewing git log. | ||
| Tool windows provide access to information, tools, and services that support coding. They let users manage the project, run and debug applications, view git changes, and work with external systems — all without leaving the main workspace. | ||
|
|
||
| If the amount of information is small, show it in the editor, main toolbar, status bar or popup. For example, show version control changes on the editor gutter, breadcrumbs in the main toolbar, current branch and file details in the status bar, quick doc in a popup. | ||
| <!-- Use the tool window to show a large amount of information that the user needs while working side-by-side with the editor or other tool windows. For example, viewing the project structure, running and debugging an application, and viewing git log. | ||
| If the user does not need the information from the main window to complete an operation, show the content in the popup or dialog window. For example, Search Everywhere popup, Settings dialog. | ||
| ## When not to use | ||
| ## Tool window structure | ||
| ### Small amount of information | ||
| {width=483} | ||
| If the amount of information is small, show it in the editor, main toolbar, status bar, or popup. For example, show version control changes in the editor gutter, breadcrumbs in the main toolbar, current branch and file details in the status bar, quick doc in a popup. | ||
| ## How to use | ||
| For more information about choosing the correct placement for content, read [UI guidelines on placing content](content_placement.md). //TODO: Write a guideline on placing content in IDE. | ||
| ### Main window content is not needed | ||
| If the user does not need the information from the main window to complete an operation, show the content in the popup or dialog window. For example, the <control>Search Everywhere</control> popup, <control>Settings</control> dialog. | ||
| --> | ||
|
|
||
| ## Tool window structure | ||
|
Collaborator
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. Also, maybe it makes sense to add information about speed search. How it works in the tool window, or, if we have a separate article, include a link to it. What do you think?
Collaborator
Author
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. I'll see what I can do. The Search field guideline is also on me right now. When we publish it, I'll add a link somewhere here |
||
|
|
||
| {width=706} | ||
|
|
||
| Give the tool window a name: | ||
| ### Tool window name | ||
|
|
||
| * The name should be [short and descriptive](writing_short.md), preferably not longer than two words. | ||
| * Use title-case capitalization. | ||
eldar-jetbrains marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Provide an abbreviation if a common one exists when tool window names are shown in the stripes. For example, <code>Pull Requests</code> becomes <code>PR</code>. | ||
|
|
||
| <table border="false" style="none"> | ||
| <tr> | ||
| <td width="378"><img src="toolwindow_name.png" alt=""/></td> | ||
| <td width="378"><img src="toolwindow_name_stripes.png" alt=""/></td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| <!--Show the tool window name in the tool window button and header. If there are tabs in the tool window header, add a colon after the tool window name. Otherwise, do not add it.--> | ||
|
|
||
| ### Icon | ||
|
|
||
| Add an icon for the tool window button. The icon should be created in two sizes: 20×20px and 16×16px, grey, and monochromatic. See how to create icons in the [icons guidelines](icons_style.md). | ||
|
|
||
| <!--### Icon | ||
| Follow [tool window icons guidelines](icons_style#NNN.md) to create correct icons for tool windows. | ||
| // TODO: publish this chapter when the guideline about icons is public too | ||
| --> | ||
|
|
||
| #### Icon badge for feedback | ||
|
|
||
| Show the tool window name in the tool window button and header. If there are tabs in the tool window header, add a colon after the tool window name. Otherwise, do not add it. | ||
| Show a colored badge above the icon if the tool window content changes and can contain different types of feedback, for example, new updates or errors. | ||
|
|
||
| {width=308} | ||
| Do not change the icon for the tool window button when the content changes. | ||
eldar-jetbrains marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Add an icon for the tool window. The icon is 13px x 13px, grey and monochromatic. See how to create icons in the [icons guidelines](icons_style.md). | ||
| {width=706} | ||
|
|
||
| <!--**Exception:** <control>Problems</control> and <control>Event Log</control> icons change color and show the current status.--> | ||
|
|
||
| ### Tabs | ||
|
Collaborator
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. I think it would be useful to add a link to the Tabs article (better check my new one) or the Group Controls article |
||
|
|
||
| Add [tabs](tabs.md) to group related content or create similar instances, like run sessions, history for files, find results. The tabs for similar entities should be closable. | ||
|
|
||
| {width=706} | ||
|
|
||
| ### Visibility | ||
|
Collaborator
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. I suggest moving this section to How to use because it doesn't seem to be about structure |
||
|
|
||
| If a tool window has no content yet, show its button by default only if the window contains basic functionality that is likely to be used for all projects, for example, <control>Version Control</control> or <control>Problems</control>. Otherwise, hide the tool window button by default. Hidden tool windows are still available under <control>More tool windows</control> menu. | ||
|
|
||
| <table border="false" style="none"> | ||
| <tr> | ||
| <td width="50%"><format color="Green" style="bold">Correct</format><img src="toolwindow_more_correct.png" alt=""/></td> | ||
| <td width="50%"><format color="red" style="bold">Incorrect</format><img src="toolwindow_more_incorrect.png" alt=""/></td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| Don't show the tool window button if the tool window is not relevant to the current project configuration. For example, don't show the <control>Maven</control> tool window for a project without Maven configuration files. | ||
|
|
||
| ### Toolbar | ||
|
|
||
| Add a toolbar for [frequently used actions and filters](toolbar.md#what-items-to-add-on-toolbar). For more details, see the [toolbar guidelines](toolbar.md). | ||
|
|
||
| <!--Put tool window viewing mode settings under the gear icon in the header. If there is no toolbar, put other options under the gear icon as well. For example, see the gear icon in the Project tool window.--> | ||
|
|
||
| ## How to use | ||
|
|
||
| **Exception:** <control>Problems</control> and <control>Event Log</control> icons change color and show the current status. | ||
| ### Orientation | ||
|
|
||
| Select the tool window orientation depending on the content. Vertical tool windows work better for trees, for example, Project, Structure, or Maven tool windows. Horizontal tool windows work better for tables, wide content or master-detail panels, for example, Git Log, Terminal, or Problems. | ||
| #### Vertical window | ||
|
|
||
| Do **not** show the tool window button if the tool window is not relevant to the current project configuration. For example, do not show the Maven tool window for a project without Maven configuration files. | ||
| Vertical tool windows work better for trees, for example, Project, Structure, or Maven tool windows. | ||
|
|
||
| If a tool window has no content yet, show its button by default only if the window contains basic functionality that is likely to be used for all projects, for example, Version Control or Problems. Otherwise, do not show the tool window button by default. | ||
| {width=706} | ||
|
|
||
| Add a toolbar for [frequently used actions and filters](toolbar.md#what-items-to-add-on-toolbar). Use a horizontal toolbar for vertical tool windows and a vertical toolbar for horizontal tool windows. For more details, see the [toolbar guidelines](toolbar.md). | ||
| #### Horizontal window | ||
|
|
||
| Put tool window viewing mode settings under the gear icon in the header. If there is no toolbar, put other options under the gear icon as well. For example, see the gear icon in the Project tool window. | ||
| Horizontal tool windows work better for tables, wide content, or master-detail panels, for example, Git Log, Terminal, or Problems. | ||
|
|
||
| Add tabs if all the information does not fit in one tab or refers to similar instances, like run sessions, history for files, find results. The tabs for entities should be closable. | ||
| {width=706} | ||
|
|
||
| {width=308 style=block} | ||
| *Separate tabs are added for each file history.* | ||
| ### Empty state | ||
|
|
||
| {width=448 style=block} | ||
| *Separate tabs are added for different search queries.* | ||
| If a tool window has no content yet, show [empty state](empty_state.md) to help users start working with the tool window. | ||
|
|
||
| <table border="false" style="none"> | ||
| <tr> | ||
| <td width="50%"><format color="Green" style="bold">Correct</format><img src="toolwindow_empty_state_correct.png" alt=""/></td> | ||
| <td width="50%"><format color="red" style="bold">Incorrect</format><img src="toolwindow_empty_state_incorrect.png" alt=""/></td> | ||
| </tr> | ||
| </table> | ||
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.
For me, it feels like the examples in this paragraph are too specific. I don’t think all these things are shown in the editor only because they contain a small amount of information. The same goes for Settings and SE. Maybe we could rephrase the “When to use” part and remove this section completely?
I tried to make an example:
Tool windows provide access to information, tools, and services that support coding. They let users manage the project, run and debug applications, track changes, and work with external systems — all without leaving the main workspace.
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 kinda agree with you. We also wanted to write an article about what kind of layout (tw, popup, or dialog) to use in which case, so we can add a link to it later here