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

Better styling for tree items that are actions #149254

Closed
isidorn opened this issue May 11, 2022 · 10 comments
Closed

Better styling for tree items that are actions #149254

isidorn opened this issue May 11, 2022 · 10 comments
Assignees
Labels
api api-proposal *out-of-scope Posted issue is not in scope of VS Code tree-views Extension tree view issues under-discussion Issue is under discussion for relevance, priority, approach ux User experience issues
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented May 11, 2022

We offer Tree API that encourages using Tree Items as actions. However these items are not well styled, and easily blend in to the rest of the tree.
The azure extension is using the tree item actions to the extreme and I find the experience a bit confusing.

Screenshot 2022-05-11 at 15 07 50

Compared that to the debug tree item action styling

Screenshot 2022-05-11 at 15 09 22

@alexr00 based on API we can always detect this items, right?
@misolori do you have ideas on how to improve the styling.

I think we should be consistent between debug and what we do here. Maybe we even start with the debug syling?

fyi @fiveisprime @bwateratmsft ideally when we improve this, then your actions will not need the "Click to" part of the text

@isidorn isidorn added ux User experience issues tree-views Extension tree view issues under-discussion Issue is under discussion for relevance, priority, approach labels May 11, 2022
@bwateratmsft
Copy link
Contributor

Having the text be link-blue, with an underline that appears when hovering, I think would go a long way. However, I wouldn't necessarily want that to be the case for all tree items that have a command attached--for example, for Azure resources with no associated extension, clicking will display the JSON properties returned by the ARM SDK. Thus, all of those resources have commands, but it would look weird if they were all blue.

@alexr00
Copy link
Member

alexr00 commented May 11, 2022

Yes, we can tell from the API whether a tree item has a command for when clicked. However, it's also very normal for regular tree items to have commands too, not just buttons. For example, in the GitHub Pull Requests and Issues extension, we open diffs on click.

We could say that if it's the last tree item and it has an action then we give it special styling, but I think that could be too error prone. Instead, we should have new API that indicates that the tree item should have link/button styling.

@alexr00 alexr00 added this to the June 2022 milestone May 11, 2022
@usernamehw
Copy link
Contributor

usernamehw commented May 11, 2022

Why not a subset of Markdown in the TreeView? #115365 (comment) (strikethrough, italic, bold, inline code, link)

@miguelsolorio
Copy link
Contributor

I also think the results, 3 of 9... should be moved into the view title description, which leaves plenty of room for a Show All action.

image

we should have new API that indicates that the tree item should have link/button styling

I think this sounds like a perfect plan as extensions can opt-into this behavior

@alexr00
Copy link
Member

alexr00 commented May 12, 2022

Why not a subset of Markdown in the TreeView? #115365 (comment) (strikethrough, italic, bold, inline code, link)

Having tree items that are really buttons is a common use case for extensions. Rather than force each extension to individually decide what a button should look like, I would prefer to give extensions a pre-defined way to make tree items look like buttons. This will give us better UX consistency for the user in addition to making it easier for extension authors.

@isidorn
Copy link
Contributor Author

isidorn commented May 12, 2022

@misolori good point.
@bwateratmsft @fiveisprime what do you think about Miguel's proposal to use the description API for a better way to decorate additional info in tree views. I think it will look cleaner.

@bwateratmsft
Copy link
Contributor

I think it's a good idea and probably something we should do now. I'll let @fiveisprime comment on whether that goes "far enough", I don't feel strongly one way or the other.

@fiveisprime
Copy link
Member

Yeah, that sounds good to me. So, we'll include the n of n in the description then have an option to style the action as a link, right?

@isidorn
Copy link
Contributor Author

isidorn commented May 13, 2022

@fiveisprime yes

@alexr00 alexr00 modified the milestones: June 2022, Backlog Jun 23, 2022
@daviddossett daviddossett removed their assignment Dec 15, 2022
@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Nov 24, 2023
@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api api-proposal *out-of-scope Posted issue is not in scope of VS Code tree-views Extension tree view issues under-discussion Issue is under discussion for relevance, priority, approach ux User experience issues
Projects
None yet
Development

No branches or pull requests

8 participants