-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Explore how to indicated read-only and deleted files open in editors more effectively #130526
Comments
👍 , one interesting aspect of this is that a tab can indicate both readonly and deleted at the same time. |
@mjbvz let me know what the use case is for custom editors and if the "read only" state would still apply or if you're looking for an alternate version |
I'm leaning towards leveraging the existing git decorators and using our custom hovers to display this information (as opposed to the native ones) and swapping to codicons for easier discoverability: @bpasero thoughts? |
but the decorators are not using red for deletion it seems, probably because that is reserved for showing problems: Are you suggesting to change decorator color for deletes to show like problems? Also, are you suggesting to add a new decoration
To clarify, you mean to show an additional icon to the left of the label for conveying the information that the file is deleted or replacing the file icon with it? Also note that user can disable icons.
Can you elaborate why this better than the native hover where the same information is displayed? |
I think currently this depends on whether you have any warnings/errors: So I'm suggesting for Deleted & Read Only to have an elevated hierarchy to the warnings/errors because when a file is deleted, the warnings/problems don't mean anything because the file is now gone. For Read only, you can't edit the file so the warnings/errors mean less.
Yes, since decorators already show a
Suggestion is to replace the file icon with our codicons and yes there are also other states that will hide all of these indicators like:
Because our custom hovers can appear much quicker than native. I'd love it if we switched all hovers to it but understand the challenge in doing so. |
I have pushed a change to enforce the With SCM Without SCM The fact that a file is readonly only shows up in the hover and not as a decoration because I think showing
That is a user setting tough right? And by default we try to match OS defaults. |
Btw one issue with using decorations to convey this information is that I cannot really limit the decoration to tabs only, so we would end up potentially having 2 decorations for "deleted" (one from SCM and one from the the new location) across all UI pieces that support decorations... |
I see, so then we need to explore alternate options that don’t rely on decorations? |
Maybe it's just me, but if a file has been deleted, then I no longer care whether it was read-only or not. |
Looks good! |
@misolori feedback from the standup was to maybe use a different icon since we use the lock already for locked groups. Not sure we would have anything else in the cards. I personally do like the lock icon though. |
I also like the lock, but understand the scope for confusion. Could the eye codicon represent a view-only document? |
Summary
Currently when you open a file and it has been deleted or you open a read-only file, we append the text to the editor tab to indicate this:
This can get busy when you have a lot of tabs open, especially with long names. This issue aims to explore a few different ways that we can visualize this.
Concepts
Option A
One idea is to try and use different seti file icons for this and show the information via tooltip:
Alternatively, we could use codicons to display instead of seti:
Option B
We could use our info icon for read-only and error for deleted:
Option C
Or we simply rely on the decorators to indicate it, we'd need to figure out how to show read-only:
cc @bpasero
The text was updated successfully, but these errors were encountered: