Skip to content
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

Closed
miguelsolorio opened this issue Aug 10, 2021 · 17 comments
Assignees
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan ux User experience issues workbench-tabs VS Code editor tab issues

Comments

@miguelsolorio
Copy link
Contributor

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:

CleanShot 2021-08-10 at 15 26 20@2x

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:

image

Alternatively, we could use codicons to display instead of seti:

image

Option B

We could use our info icon for read-only and error for deleted:

image

Option C

Or we simply rely on the decorators to indicate it, we'd need to figure out how to show read-only:

image

cc @bpasero

@miguelsolorio miguelsolorio added ux User experience issues workbench-tabs VS Code editor tab issues labels Aug 10, 2021
@miguelsolorio miguelsolorio added this to the August 2021 milestone Aug 10, 2021
@miguelsolorio miguelsolorio self-assigned this Aug 10, 2021
@bpasero
Copy link
Member

bpasero commented Aug 11, 2021

👍 , one interesting aspect of this is that a tab can indicate both readonly and deleted at the same time.

@miguelsolorio
Copy link
Contributor Author

@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

@miguelsolorio
Copy link
Contributor Author

miguelsolorio commented Sep 15, 2021

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:

CleanShot 2021-09-14 at 17 42 31@2x

@bpasero thoughts?

@bpasero
Copy link
Member

bpasero commented Sep 15, 2021

leveraging the existing git decorators

but the decorators are not using red for deletion it seems, probably because that is reserved for showing problems:

image

Are you suggesting to change decorator color for deletes to show like problems?

Also, are you suggesting to add a new decoration R for the readonly case?

and swapping to codicons for easier discoverability

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.

using our custom hovers to display this

Can you elaborate why this better than the native hover where the same information is displayed?

@bpasero bpasero self-assigned this Sep 15, 2021
@miguelsolorio
Copy link
Contributor Author

but the decorators are not using red for deletion it seems, probably because that is reserved for showing problems:

I think currently this depends on whether you have any warnings/errors:

CleanShot 2021-09-15 at 07 54 35@2x

CleanShot 2021-09-15 at 07 55 38@2x

CleanShot 2021-09-15 at 07 55 55@2x

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.

Also, are you suggesting to add a new decoration R for the readonly case?

Yes, since decorators already show a D for deleted, it made sense to add R for read only, though I don't know if there is a similar concept in git for it. My suggestion was to keep them consistent.

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.

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:

image

Can you elaborate why this better than the native hover where the same information is displayed?

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.

@miguelsolorio
Copy link
Contributor Author

I brought this up in our design-wide critique for some feedback and here's the suggestions:

  • Showing codicons as status icons (like the trash icons) can be a bit confusing, is it a status or an action?
  • People associate the the filename w/ the file icon so replacing the file icons can cause additional overhead for the user
  • Everyone liked the strikethrough for deleted files
  • Additional indicators like tab background color could be another option to explore
  • There was a preference for using the git decorators for the status (even though read only isn't a git status, but is a decorator)
    CleanShot 2021-09-15 at 09 39 58@2x

@bpasero
Copy link
Member

bpasero commented Sep 16, 2021

I have pushed a change to enforce the strikethrough decoration. Fun fact, the decoration would have worked, but we had a CSS rule to disable text decorations in tabs, not sure why.

With SCM

image

Without SCM

recording

The fact that a file is readonly only shows up in the hover and not as a decoration because I think showing R is misleading: SCM uses that to indicate a file was moved.

Because our custom hovers can appear much quicker than native.

That is a user setting tough right? And by default we try to match OS defaults.

@bpasero
Copy link
Member

bpasero commented Sep 16, 2021

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...

@miguelsolorio
Copy link
Contributor Author

I see, so then we need to explore alternate options that don’t rely on decorations?

@miguelsolorio
Copy link
Contributor Author

Visual Studio uses a lock icon for read only:

CleanShot 2021-09-16 at 10 58 33@2x

So if Deleted uses the strikethrough, I wonder if we can append a lock icon for read only that way each can work independently without icons/decorators?

CleanShot 2021-09-16 at 11 01 41@2x

CleanShot 2021-09-16 at 11 03 28@2x

@silkfire
Copy link

Maybe it's just me, but if a file has been deleted, then I no longer care whether it was read-only or not.

@bpasero
Copy link
Member

bpasero commented Sep 17, 2021

I went ahead and fully embraced decorations for this:

image

It is possible that multiple decorations apply, e.g. in git case, but I think that still looks fine:

image

@bpasero
Copy link
Member

bpasero commented Sep 17, 2021

Related hover indicator:
recording

@miguelsolorio
Copy link
Contributor Author

Looks good!

@bpasero
Copy link
Member

bpasero commented Sep 20, 2021

@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.

@gjsjohnmurray
Copy link
Contributor

I also like the lock, but understand the scope for confusion. Could the eye codicon represent a view-only document?

@miguelsolorio
Copy link
Contributor Author

yea we could use eyes as an alternate that would still work well with locked groups:

CleanShot 2021-09-20 at 09 31 36@2x

But we do use the lock icon in multiple areas (notebooks locked cells, output scrolling, ports privacy) and we add the lock icon to the tab and not the group so I personally still think it's fine to use:

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan ux User experience issues workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

5 participants