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

extract IconPath type for uri, uris, and ThemeIcon combo #232471

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

jrieken
Copy link
Member

@jrieken jrieken commented Oct 29, 2024

re #124363

@jrieken jrieken requested a review from mjbvz as a code owner October 29, 2024 09:47
@jrieken jrieken self-assigned this Oct 29, 2024
@jrieken jrieken enabled auto-merge (squash) October 29, 2024 09:47
* Represents an icon in the UI. This is either an uri, separate uris for the light- and dark-themes,
* or a {@link ThemeIcon theme icon}.
*/
export type IconPath = Uri | {
Copy link
Member Author

Choose a reason for hiding this comment

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

@mjbvz Let me know if you have an idea for a better name. This isn't overly correct but matches the property names.

Also there are still a few places where iconPath: ... is used/defined but where not this exact shape is supported

@vs-code-engineering vs-code-engineering bot added this to the November 2024 milestone Oct 29, 2024
Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

lgtm. I think IconPath makes sense with the property names

@jrieken jrieken merged commit 6d07420 into main Oct 29, 2024
8 checks passed
@jrieken jrieken deleted the joh/delightful-ape branch October 29, 2024 15:11
*/
dark: string | Uri;
} | ThemeIcon;
iconPath?: IconPath;
Copy link
Contributor

Choose a reason for hiding this comment

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

@jrieken since this type took a string, in addition to a Uri, isn't this a breaking change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, sorry. That was an oversight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants