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

Add icon override setting for newTabMenu entries #18116

Merged

Conversation

GeekJosh
Copy link
Contributor

@GeekJosh GeekJosh commented Oct 27, 2024

Summary of the Pull Request

This PR is to allow users to set a custom icon for entries in the new tab menu for "action" and "profile" type entries.

References and Relevant Issues

This PR is in response to #18103

Detailed Description of the Pull Request / Additional comments

It is now possible to specify an optional "icon" setting for any "action" or "profile" type entry in the "newTabMenu" JSON settings. When specified, this icon will be used as the menu icon for that action/profile in the new tab menu. If not specified, the action/profile definition's default icon will be used instead (if present).

The Cascadia settings schema ("doc/cascadia/profiles.schema.json") has been updated to reflect this.

Validation Steps Performed

Manually tested with multiple combinations of icon settings:

  • ActionEntry:
    • valid path in action definition and new tab entry (renders new tab entry icon)
    • valid path in action definition but no path in new tab entry (renders action definition icon)
    • no path in action definition, valid path in new tab entry (renders new tab entry icon)
    • invalid path in action definition, valid path in new tab entry (renders new tab entry icon)
    • valid path in action definition, invalid path in new tab entry (renders no icon)
    • invalid path in both (renders no icon)
    • no path in both (renders no icon)
  • ProfileEntry:
    • valid path in new tab entry (renders new tab entry icon)
    • no path in new tab entry (renders profile's default icon)
    • invalid path in new tab entry (renders no icon)

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-Settings Issues related to settings and customizability, for console or terminal Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Oct 27, 2024
@GeekJosh
Copy link
Contributor Author

@GeekJosh please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@GeekJosh GeekJosh changed the title Allow icon override setting for newTabMenu entries Add icon override setting for newTabMenu entries Oct 27, 2024
GeekJosh added a commit to GeekJosh/terminal that referenced this pull request Oct 27, 2024
Adds documentation about the new icon override feature for profile and action entries (PR: microsoft/terminal#18116)
@GeekJosh GeekJosh marked this pull request as ready for review October 27, 2024 13:12
@DHowett
Copy link
Member

DHowett commented Oct 28, 2024

oh, I think I need to comment here before it will run pipelines now. FLY, MY PRETTIES

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much - this is excellent work! Exactly what we needed.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thank you!

@carlos-zamora carlos-zamora merged commit 5b63465 into microsoft:main Oct 29, 2024
15 checks passed
nguyen-dows pushed a commit to MicrosoftDocs/terminal that referenced this pull request Nov 21, 2024
Adds documentation about the new icon override feature for profile and
action entries to be introduced by PR:
microsoft/terminal#18116

Also added a section on "action" entries as it was previously missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-UserInterface 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. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In newTabMenu allow assignment/override of the icon property for the action items
3 participants