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

themable debug icons #111183

Merged
merged 5 commits into from
Nov 24, 2020
Merged

themable debug icons #111183

merged 5 commits into from
Nov 24, 2020

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Nov 23, 2020

For #92791

  • no more codicon references in code
  • define debug specific icon name for reused icons

@isidorn You might want to look at the names and descriptions given in https://github.com/microsoft/vscode/pull/111183/files#diff-66eeaa212162fdffb80b665f45fa68fd3f66c27504635227161fb9efa41edf27

I double/trippled checked that I didn't introduce any regressions, but from experience there are always one or two...

@aeschli aeschli requested a review from isidorn November 23, 2020 15:38
@aeschli aeschli added this to the November 2020 milestone Nov 23, 2020
@aeschli aeschli self-assigned this Nov 23, 2020
@@ -330,7 +331,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
static readonly LABEL = nls.localize('addWatchExpression', "Add Expression");

constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
super(id, label, 'debug-action codicon-add', debugService, keybindingService);
super(id, label, 'debug-action ' + icons.watchExpressionsAdd.classNames, debugService, keybindingService);
Copy link
Contributor

Choose a reason for hiding this comment

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

We previously had just one add icon which was the plus add, now it would be possible for somebody to customise to have multiple different icons for different adds. Does not really matter I guess

Copy link
Contributor Author

@aeschli aeschli Nov 24, 2020

Choose a reason for hiding this comment

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

It's up to you. If it is essential that the same icon is used, we can have a single add icon. Makes things simpler, for sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I would go with a single add icon.

@@ -350,7 +351,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
static readonly LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions");

constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
super(id, label, 'debug-action codicon-close-all', debugService, keybindingService);
super(id, label, 'debug-action ' + icons.watchExpressionsRemoveAll.classNames, debugService, keybindingService);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for close-all, now you are adding a remove-all for each case. Which is fine I think

export const debugStackframe = registerIcon('debug-stackframe', Codicon.debugStackframe, localize('debugStackframe', 'Icon for a stackframe.'));
export const debugStackframeFocused = registerIcon('debug-stackframe-focused', Codicon.debugStackframeFocused, localize('debugStackframeFocused', 'Icon for a focused stackframe.'));

export const debugGripper = registerIcon('debug-gripper', Codicon.gripper, localize('debugGripper', 'Icon for the debug bar gripper.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Which icon is this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Aaaaa now I figured out. The one from the quick pick. This also does not feel debug specific and should be a general workbench icon

Copy link
Contributor Author

@aeschli aeschli Nov 24, 2020

Choose a reason for hiding this comment

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

It's the ' grip handle' on the toolbar. https://code.visualstudio.com/api/references/icons-in-labels
I would say we should allow themes to customize that just for the debug toolbar as it is quire special.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense.


export const debugStackframeActive = registerIcon('debug-stackframe-active', Codicon.debugStackframeActive, localize('debugStackframeActive', 'Icon for an active stackframe.'));
export const debugStackframeDot = registerIcon('debug-stackframe-dot', Codicon.debugStackframeDot, localize('debugStackframeDot', 'Icon for a stackframe dot.'));
export const debugStackframe = registerIcon('debug-stackframe', Codicon.debugStackframe, localize('debugStackframe', 'Icon for a stackframe.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention in the descriptoin: that Stackframe and StackframeFocused are shown in the Editor glyph margin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

export const debugBreakpoint = registerIcon('debug-breakpoint', Codicon.debugBreakpoint, localize('debugBreakpoint', 'Icon for breakpoints.'));
export const debugBreakpointDisabled = registerIcon('debug-breakpoint-disabled', Codicon.debugBreakpointDisabled, localize('debugBreakpointDisabled', 'Icon for disabled breakpoints.'));
export const debugBreakpointUnverified = registerIcon('debug-breakpoint-unverified', Codicon.debugBreakpointUnverified, localize('debugBreakpointUnverified', 'Icon for unverified breakpoints.'));
export const debugBreakpointHint = registerIcon('debug-hint', Codicon.debugHint, localize('debugBreakpointHint', 'Icon for breakpoint hints.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Add in description: "shown on hover in editor glyph margin"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

export const watchExpressionsAddFuncBreakpoint = registerIcon('watch-expressions-add-function-breakpoint', Codicon.add, localize('watchExpressionsAddFuncBreakpoint', 'Icon for the add function breakpoint action in the watch view.'));

export const breakpointsRemoveAll = registerIcon('breakpoints-remove-all', Codicon.closeAll, localize('breakpointsRemoveAll', 'Icon for the remove all action in the breakpoints view.'));
export const breakpointsActivate = registerIcon('breakpoints-activate', Codicon.activateBreakpoints, localize('breakpointsActivate', 'Icon for the activatel action in the breakpoints view.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

activatel is a typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed


export const debugConsoleEvaluationInput = registerIcon('debug-console-evaluation-input', Codicon.arrowSmallRight, localize('debugConsoleEvaluationInput', 'Icon for the debug evaluation input marker.'));
export const debugConsoleEvaluationPrompt = registerIcon('debug-console-evaluation-prompt', Codicon.chevronRight, localize('debugConsoleEvaluationPrompt', 'Icon for the debug evaluation prompt.'));
export const debugExceptionWidgetClose = registerIcon('debug-exception-widget-close', Codicon.close, localize('debugExceptionWidgetClose', 'Icon for the close action of the debug exception widget.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah not a fan of having multiple close action. I think these should be aligned across the workbench across our widgets. x should look everywhere the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. I started a list of common icons in the iconRegistry

Copy link
Contributor

Choose a reason for hiding this comment

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

Great!

@isidorn
Copy link
Contributor

isidorn commented Nov 23, 2020

@aeschli thanks a lot for cleaning this up, really appreciate it.
I did a review of your changes and they look great - I left some minor comments in the PR.
I would like that we merge this as soon as possible so we catch breakages in Insiders -> thus approved

I did not test this. Let me know if you would be more comfortable if I test it out and I can.

@aeschli aeschli merged commit 6a41811 into master Nov 24, 2020
@aeschli aeschli deleted the aeschli/themableDebugIcons branch November 24, 2020 20:32
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants