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

$(mark-github) in notification #145722

Closed
hediet opened this issue Mar 22, 2022 · 12 comments
Closed

$(mark-github) in notification #145722

hediet opened this issue Mar 22, 2022 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@hediet
Copy link
Member

hediet commented Mar 22, 2022

Happens during GitHub sign in.

image

Not sure who provides the GitHub auth provider.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Mar 22, 2022

@bpasero (you seem to be the owner but maybe it's actually @jrieken?) I tried moving from a status bar item that handled progress to the withProgress API. This was the result of that:

  1. spinny icon and GitHub icon are too close together
  2. $(mark-github) gets displayed in notification.

I don't think I have any control over this since I'm just using the withProgress API but let me know if there's a way.

If not, I can remove the $(mark-github) from the title for now.

@TylerLeonhardt TylerLeonhardt added this to the March 2022 milestone Mar 22, 2022
@TylerLeonhardt TylerLeonhardt added the bug Issue identified by VS Code Team member as probable bug label Mar 22, 2022
@bpasero
Copy link
Member

bpasero commented Mar 22, 2022

I think we made the decision at one point to not allow icons in notifications to avoid abuse.

spinny icon and GitHub icon are too close together

You mean in the status bar?

@TylerLeonhardt
Copy link
Member

I think we made the decision at one point to not allow icons in notifications to avoid abuse.

In this case, can you strip out any icons in notifications?

You mean in the status bar?

Yeah. They're like right next to each other in the screenshot

@bpasero
Copy link
Member

bpasero commented Mar 22, 2022

Yeah not sure why we don't do that.

As for icons in the status bar: not sure what to do here, if we just add margins we might break it for existing extensions that have worked around it.

@TylerLeonhardt
Copy link
Member

not sure what to do here, if we just add margins we might break it for existing extensions that have worked around it.

@bpasero So one of the ways I tried to work around this was adding a space in front of the icon:

title: localize('signingIn', " $(mark-github) Signing in to github.com..."),

but I didn't see any noticeable change. Locally I tried adding like 100 spaces and still get:

image

@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

I have extracted the status bar issue into #145852

@jrieken
Copy link
Member

jrieken commented Mar 23, 2022

In this case, can you strip out any icons in notifications?

The API doc should spell out when a label supports theme icons, like here.

@bpasero I not sure that simply stripping out $(abc) is valid. This means that messages have changed their behaviour and that escaping is needed - despite us not supporting theme icon rendering here

@jrieken jrieken reopened this Mar 23, 2022
@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

Yeah thanks for reopen, the fix was not clever. Instead I am now stripping the icon only for this particular case, where a progress starts in the status bar where icons are supported and then moves to be a notification by the user clicking it. Since this is not something the extension can control, we have to strip the codicons there.

But we should not strip them from all notification messages 👍

@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

@TylerLeonhardt to clarify:

  • use ProgressLocation.Window and you can use codicons, the progress will show in the status bar and when shown in notifications have the icon removed
  • use ProgressLocation.Notification and you cannot use codicons, so please remove from message

I will update our JSDoc too to make that clear.

@TylerLeonhardt
Copy link
Member

@bpasero I only use ProgressLocation.Window so I don't think I need to do anything here.

title: localize('signingIn', " $(mark-github) Signing in to github.com..."),

Thanks for jumping on this!

@bpasero
Copy link
Member

bpasero commented Mar 23, 2022

Yeah you are all set.

@connor4312 connor4312 added the verified Verification succeeded label Mar 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants
@bpasero @jrieken @connor4312 @TylerLeonhardt @hediet @alexr00 and others