-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
plugin: ThemeIcon Support in SCM #12187
plugin: ThemeIcon Support in SCM #12187
Conversation
8371377
to
d7f2df0
Compare
d7f2df0
to
06da84a
Compare
@@ -58,6 +58,8 @@ export interface ScmResource { | |||
} | |||
|
|||
export interface ScmResourceDecorations { | |||
icon?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether it would be a better idea to keep the conditional structure (either a ThemeIcon or a { dark: ..., light...} structure until we render the whole thing in the UI? It kinda doesn't make sense to have a dark and light ThemeIcon, as mentioned elsewhere, IMO.
@FernandoAscencio what do you mean by that? |
c582211
to
002f719
Compare
It has been a while so I have no idea. I'll change the steps so they make more sense. |
002f719
to
70db92d
Compare
@FernandoAscencio having done a bit more thinking about the general approach of this PR. In |
@tsmaeder |
70db92d
to
e2ae178
Compare
4e7161c
to
9780fe5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks much nicer!
@@ -511,6 +513,15 @@ class SsmResourceGroupImpl implements theia.SourceControlResourceGroup { | |||
return rawResourceSplices; | |||
} | |||
|
|||
private getThemableIcon(icon: UriComponents | ThemeIcon | undefined): IconUrl | ThemeIcon | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think string | ThemaIcon | undefined
would be a more precise return type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
@FernandoAscencio about the "how to test": what are the changes you did to the git and git-base extensions? We already could have dark and light icons before, how does the testing procedure test the use of |
fixes small typo `SsmResourceGroupImpl` -> `ScmResourceGroupImpl` Signed-Off-By: FernandoAscencio <[email protected]>
Finishes Estelle's changes to support Themables. Signed-off-by: FernandoAscencio <[email protected]> Co-Authored-By: Estelle
9780fe5
to
8836ce4
Compare
@tsmaeder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now.
@FernandoAscencio unless you have more changes coming, I'll merge this one. |
@tsmaeder |
What it does
Closes: #11829
Finishes Estelle's changes to support Themables from here.
Allows
SourceControlResourceThemableDecorations.iconPath
to acceptThemeIcon
and modifies the SCM supporting architecture to accept the change.How to test
"@theia/git": "1.38.0"
from theexamples\browser\package.json
andexamples\electron\package.json
files.git-base
andgit
files from herepackage.json
files.This package currently only tests for 'Light' and "Dark" theme changes as well as
URI
andThemeIcon
inputs.Possible tests:
Review checklist
Reminder for reviewers