Bug 564495 - Make the editor tab width unchanged while the file status switching between dirty and saved
Summary: Make the editor tab width unchanged while the file status switching between d...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-20 04:31 EDT by Gao Hao CLA
Modified: 2020-11-30 05:45 EST (History)
6 users (show)

See Also:


Attachments
excel (83.81 KB, image/png)
2020-06-20 07:14 EDT, Gao Hao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gao Hao CLA 2020-06-20 04:31:32 EDT
When enable autosave, it is better to give an option to hide dirty file mark(*) in Editor tab.
Comment 1 Rolf Theunissen CLA 2020-06-20 06:03:48 EDT
Why is this better? Is that your personal opinion or does it give a better user experience, why would it give a better user experience? Please give a motivation.

Instead of loading the IDE with tons of options, it is better to have sane defaults that work for the majority of people.
Comment 2 Gao Hao CLA 2020-06-20 06:09:39 EDT
People do not pay attention to whether the file is unsaved when enable the autosave, especially when they set a relatively short save interval.
Comment 3 Rolf Theunissen CLA 2020-06-20 06:22:32 EDT
It is advised not to have a short autosave interval, because that can result in performance issues and other editor artifacts. Moreover, the autosave is reset on many events.

I think it is important that there is feedback that a resource is dirty or not, even if autosave is enabled. Even tools like Microsoft Office give feedback if the file being edited is dirty or not.

Does it disturb you that the asterisk is there? Would you rather have other feedback that the resource is dirty, maybe similar to the busy state of views when autosave is enabled?
Comment 4 Gao Hao CLA 2020-06-20 06:51:23 EDT

The asterisk should not in front of file name, the width of editor tab becomes long when the file is dirty, and becomes short when the file is saved.  
There are four options: 
1) spare some room to display the asterisk. 
    When the file is dirty, show the asterisk.
    When the file is saved, hide the asterisk.
    So that the width of editor tab will not change whenever the status of file changes.

2) close icon and asterisk have the same position.
   When the file is dirty, show the asterisk; when the file is saved, show the asterisk.

3)do not use asterisk to mark the editor unsaved, use the font-weight to mark.
   When the file is dirty, the font-weight of file name becomes bold.
   When the file is saved, the font of file name becomes regular.


And hide the asterisk no matter the file is dirty is the fourth option.
Comment 5 Gao Hao CLA 2020-06-20 07:14:56 EDT
Created attachment 283361 [details]
excel

"When the file is dirty, show the asterisk; when the file is saved, show the asterisk" -> "When the file is dirty, show the asterisk; when the file is saved, show the close icon"

The width of editor tab changes frequently can be annoying.
Comment 6 Rolf Theunissen CLA 2020-06-20 07:28:34 EDT
Now we are getting somewhere, I agree with you that the changing of the tab with is distracting. But that is also the case when autosave is off.

Can you update the summary/title of this bug to reflect this?

(b.t.w. with Office 2016, when documents are on OneNote/SharePoint they offer autosave. In that case there is 'Saving...' in the header, when dirty. When saved, it shows 'Saved'. When dirty and not saved, it shows nothing.)
Comment 7 Lars Vogel CLA 2020-06-21 05:35:40 EDT
I like the idea of using a bold font instead of an *
Comment 8 Thomas Wolf CLA 2020-06-21 09:08:37 EDT
Wouldn't changing the font or font style also change the width of the tab?
Comment 9 Gao Hao CLA 2020-06-21 10:16:18 EDT
Yes. Changing the color of file name or the tab color will not affect the tab width.
Comment 10 Rolf Theunissen CLA 2020-06-21 10:57:13 EDT
In fact, changing the font can make it worse. The maximum with of a tab is defined by the number of characters. So currently for long names the width will not change, for short widths it will change.

Another thing that can be changed without changing the with is the icon of the part. Maybe a adornment can be added for dirty parts. Additionally, this icon consistently be used in the quick selection views, e.g. ctrl-3, chevron-menu.

Finally, a fixed tab width could be used. This resolves the width changing, at the cost of having extra white-space/waste in the tab bar.
Comment 11 Andrew Obuchowicz CLA 2020-06-21 22:02:44 EDT
I personally don't mind the "*", but maybe changing the tab background color could be interesting? I think this would be much more immediately noticeable to the user rather than a *, assuming the color difference is noticeable enough. 

A possible downstream issue is that existing themes for Eclipse would have to be updated to use this feature correctly. However, I don't think this would be a realistic blocker for this solution. 

This is an interesting topic :)
Comment 12 Rolf Theunissen CLA 2020-06-22 02:33:19 EDT
I don't mind the '*' either, but it can be distracting that the width of tabs changes all the time, with jumping tabs and even '...' coming and going.

When thinking of colors, keep in mind that you probably need at least 3 colors. Like there are 3 colors for the tabs already. Having lots of colors doesn't make it all look that well either.
Comment 13 Andrey Loskutov CLA 2020-06-22 02:44:50 EDT
(In reply to Rolf Theunissen from comment #12)
> I don't mind the '*' either, but it can be distracting that the width of
> tabs changes all the time, with jumping tabs and even '...' coming and going.
> 
> When thinking of colors, keep in mind that you probably need at least 3
> colors. Like there are 3 colors for the tabs already. Having lots of colors
> doesn't make it all look that well either.

Note, there are color blind people, so color alone probably isn't OK.

*If* changing this, it should be optional.

Regarding space use (which is the trigger for this bug I guess), consider:

* Adding icon overlay (like for pinned editors)
* Keep adding "*" but automatically reduce the tab name by one character.
Comment 14 Andrew Obuchowicz CLA 2020-06-22 10:28:44 EDT
> 
> Note, there are color blind people, so color alone probably isn't OK.
> 

Agreed. I don't think color alone should be used anymore, thanks for pointing this out Andrey.