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

Command palette entries should have optional icons #6644

Closed
zadjii-msft opened this issue Jun 23, 2020 · 2 comments · Fixed by #7368
Closed

Command palette entries should have optional icons #6644

zadjii-msft opened this issue Jun 23, 2020 · 2 comments · Fixed by #7368
Assignees
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@zadjii-msft
Copy link
Member

Do we want these icons to be a:

  • path to an image?
  • a font icon?

If we want to support both, the XAML binding will probably be pretty hard.

If we want to support images only. we'll probably need to ship some images for default icons.

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) labels Jun 23, 2020
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Jun 23, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 23, 2020
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 25, 2020
@zadjii-msft zadjii-msft self-assigned this Aug 20, 2020
ghost pushed a commit that referenced this issue Aug 21, 2020
## Summary of the Pull Request
![cmdpal-default-nested-commands](https://user-images.githubusercontent.com/18356694/90684483-e6b13400-e22d-11ea-8ca6-fe90ca8d9e82.gif)

Adds a pair of top-level commands that both have nested, iterable sub-commands. The "New Tab..." command has one child for each profile, and will open a new tab for that profile. The "Split Pane..." command similarly has a nested command for each profile, and also has a nested command for split auto/horizontal/vertical.

## References

* megathread: #5400 
* Would look better with icons from  #6644

## PR Checklist
* [x] Closes #7174 
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated
@zadjii-msft
Copy link
Member Author

It would be really cool if we could somehow support images, Segoe MDL2 Assets icons, AND emoji icons all at the same time.

That would be cool.

@ghost ghost added the In-PR This issue has a related PR label Aug 21, 2020
@ghost ghost closed this as completed in #7368 Aug 21, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Aug 21, 2020
ghost pushed a commit that referenced this issue Aug 21, 2020
## Summary of the Pull Request

![cmdpal-icons](https://user-images.githubusercontent.com/18356694/90916410-97dada00-e3a6-11ea-9fb0-755938a68a05.gif)

Adds support for setting a command's `icon`. This supports a couple different scenarios:
* setting a path to an image
* on `"iterateOn": "profiles"` commands, setting the icon to `${profile.icon}` (to use the profile's icon)
* setting the icon to a symbol from [Segoe MDL2 Assets](https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font)
* setting the icon to an emoji
* setting the icon to a character (what is an emoji other than a character, after all?)

## References
* Big s/o to @leonMSFT in #6732, who really did all the hard work here.

## PR Checklist
* [x] Closes #6644 
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

Importantly, the creation of these icons must occur on the UI thread. That's why it's done in a "load the path from json", then "get the actual IconSource" structure.

## Validation Steps Performed
see the gif
@ghost
Copy link

ghost commented Aug 26, 2020

🎉This issue was addressed in #7368, which has now been successfully released as Windows Terminal Preview v1.3.2382.0.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants