-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add Options to hide tab icons and and show full text in view area #1071
Add Options to hide tab icons and and show full text in view area #1071
Conversation
Change-Id: I220507837cf3472bfb0f5d8a24d9d596568e232a
Added UI controls in View Preference page Added handlers to hide icons and show full text for view tabs in CTabRendering Change-Id: Ib719fcb114ec0b2edaa1a8a7d0c5dd5e4a1ca075
Change-Id: I0c194113893a21069788b9a99907c419dedf0d6e
@praveen-skp can you provide a screenshot from the whole IDE, not only a view area (with hidden icons)? Such an example helps to explain the addressed change in overall look&feel |
...c/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedImageVisibleSWTHandler.java
Outdated
Show resolved
Hide resolved
...g/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyTabTextMinimumCharactersSWTHandler.java
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
...org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java
Outdated
Show resolved
Hide resolved
Few things:
|
This is already technically possible using the SWT API. We can consider incorporating this as a future update if required. On a side note, we also observed that showing the icon (only) for active view could potentially increase screen flickering, as the text for the tabs would be moved each time a tab is switched. Thus the impact on user experience should be evaluated before proceeding.
Showing only icons is also technically possible and here is what it would look like: We had contemplated this option and consulted with UX experts who indicated the following potential issues related to accessibility:
Moreover, the intention behind the change was not on saving space but to keep the focus only on editor area which is the main actor in IDE. Thus the icons for all tabs from the view stack (supporting actors) are to be hidden, which might draw attention away from the editor area otherwise. |
Regarding "only show icons": It looks much more cluttered compared to the current state (Icon and Text). I have the feeling this is a move into the wrong direction. |
I think it is a good idea, you can provide this 2 options(show full titles and hide icons) and let users to decide. And it would be good to always show editor tabs' full name especially when you open many editors. |
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 proposal. I really like it.
I have some minor code style comments and one general remark:
I am wondering whether it may be useful to allow the configuration for each part stack (not necessarily as part of this PR but as a future extension). You could then define the visualization that fits most for one specific stack of views. E.g., you may have one stack of views that you usually distinguish by their (full) names, so that you want to hide the icons and always show the full texts, and you may have a (horizontally) small stack of views of which you know well their icons, so that only showing the icons may be perfect for that stack (this would require to have the option of only showing icons as proposed in #1071 (comment)). This would relieve you from deciding about the visualization of tab items for the whole workbench. As a concrete example, in a "usual" perspective setup such as the Java perspective, displaying the full names of the tabs may be useful for the views in the stack at the bottom of the workbench window, while it may not be desired for the stack at the right side of the workbench window, as the names of one or two views can easily require all the available space for the tabs.
As an RCP application provider, you could even provide perspectives that are predefined accordingly. The preferences could then be used to define the initial behavior of newly created stacks.
...c/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedImageVisibleSWTHandler.java
Outdated
Show resolved
Hide resolved
...c/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedImageVisibleSWTHandler.java
Outdated
Show resolved
Hide resolved
...c/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedImageVisibleSWTHandler.java
Outdated
Show resolved
Hide resolved
...g/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyTabTextMinimumCharactersSWTHandler.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
I would try to keep the number of configurations options as small as possible. Let's start with the current implementation of this PR. Let's see that what kind of feedback we get. We can add more configuration options later on. But pls. let's start simple. |
One further thing I forgot to mention: when removing the icons, it becomes really hard to see where one tab item ends and the next begins, as there are no borders between them. With the icons enabled, you directly see where the items starts. So maybe there should be some kind of small separator to see where a new tab item starts? |
You are right. But is it necessary to see where "inactive" view tabs start and end exactly. If you want to bring it to the top you simple click on the text. Pls. look how VsCode does it - I also don't see separators there... |
Good idea. |
Earlier the padding was only added to the selected tab. For example, notice the significant space between Type Hierarchy tab and CSS Scratch Pad tab. |
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.
With some further adaptations of the required SWT change eclipse-platform/eclipse.platform.swt#785, this looks good to me.
I would be in favor of even larger paddings when no icons are shown, as also mentioned in the SWT PR (eclipse-platform/eclipse.platform.swt#785 (review)), which could look like this:
But that's a matter of personal preference.
@shubhamWaghmare-sap Was it intended that the minimum number of characters shown for tabs now is 1 in case "always show full titles" is not enabled? That way it seems to become impossible to navigate between source code files 😇 |
@HeikoKlare It seems that before this change, the minimum number of characters for tabs "in view areas" was always 1. Also the newly added preferences do not affect the "editor area". So,
|
Maybe I erroneously related the changed behavior to this PR. For me, the behavior changed in the editor area. This is how it looks like: Behavior for the view area is fine for me, as it has been like this before, and you can usually also distinguish views by icons (in comparison to files in the editor area, where the single first letter does not help). The changed behavior for the editor area (assuming that it is related to this PR) actually is a regression for me, because for me it is now ususable without "always show full titles" activated.
The SWT implementation for tab folders with disabled icons centers the text (like, e.g., VS code does). @thomasritter What do you mean by "leaning to the right"? The text actually should be centered. And making it left aligned will look strange, as then you have a huge space to the right as a separator to the next tab. |
@HeikoKlare If the tab is selected the area in which the text should be aligned runs from the left edge to the right X. See this screenshot. I added the black box. You can see that the text is not centered. It is too much to the right. |
Thanks for clarification! I got it. The problem is that centering is performed w.r.t. the "text area", but the tab also has a padding on its own. We have to fix that in SWT. |
Seeing the fake screnshot: do you really think that it looks better that way? It seems like my eyes expect the text to be centered "within the padding" of the tab, like in the current behavior. So the current behavior actually looks more "natural" to me than the proposed one. |
@HeikoKlare In order to get away from "feeling" and more towards empirical data I looked at the most widely used tab design and measured how they position the content (text + icon). Have a look at this diagram: As you can see, almost all tab titles are leaning slightly to the left side of the tab. Only Intellij uses a centered design. As most humans read from left to right this makes a lot of sense to me. The content needs to feel anchored to the left side. This is not the case with the current design. My proposal would be to follow the padding of the Eclipse tab with icon or at least do not have more padding in the front than after the (x) button. By the way thanks for sending me down this rabbit hole :) Was interesting to realize that the browser vendors are using very similar spacing for their tabs. |
Thanks for collecting that data, @thomasritter! You compare the iconless tab design with other applications using icons in tabs. The reason why left alignment and small paddings work when using icons is that the icons work as a separator between individual tabs, which allows you to easily find the start/end of a tab. When using an iconless design, you need to apply larger paddings to be able to distinguish tab start/end from whitespaces between words in a single tab (see my previous comment). From my point of view, using paddings as separators only works with centered text. Left-aligning the tab text looks really weird: To support this with some empirical data: VS code does it the same way (in the screenshot, the "Terminal" tab is moved between the "Output" and "Debug Console" tabs to show where VS code puts the border): |
…lipse-platform#1071) * Added CSSPropertyHandler for handling selected tab image and full text Change-Id: I220507837cf3472bfb0f5d8a24d9d596568e232a * Added hide icons and show full text options for View tabs Added UI controls in View Preference page Added handlers to hide icons and show full text for view tabs in CTabRendering Change-Id: Ib719fcb114ec0b2edaa1a8a7d0c5dd5e4a1ca075 * Refactored SelectedImageVisibility handler Change-Id: I0c194113893a21069788b9a99907c419dedf0d6e * Added minimum chars tab handler,made icons & title prefs theme dependent * Added copyright header, improved variable/method names & code formatting * Refactored CSSPropertyHandlers and CTabRendering --------- Co-authored-by: Shubham Waghmare <shubham.waghmare@sap.com> Co-authored-by: shubhamWaghmare-sap <57699330+shubhamWaghmare-sap@users.noreply.github.com>
Added new and noteworthy entry for: eclipse-platform/eclipse.platform.ui#1071
Added new and noteworthy entry for: eclipse-platform/eclipse.platform.ui#1071
Added new and noteworthy entry for: eclipse-platform/eclipse.platform.ui#1071
Added new and noteworthy entry for: eclipse-platform/eclipse.platform.ui#1071
Added new and noteworthy entry for: eclipse-platform/eclipse.platform.ui#1071
Issue: #735
Currently, the UI/UX for Eclipse views does not scale properly when a perspective contains a lot of views. The current solution for scaling views in Eclipse is to provide lots of different perspectives and use them to group the views. If only a limited number of views are visible it means that the whole title of each view is visible and the usability is good but if the number views increase significantly then the following issues occur:
Changes:
a. Always show full titles
b. Hide icons
Corresponding change to CTabRendering to handle these preferences and render the image and text for tabs in view areas accordingly
Added two CSS properties handler
This a prototype and would like to get feedback