Skip to content

Add setting to make touchbar controls optional#70174

Merged
bpasero merged 6 commits intomicrosoft:masterfrom
MarcusNoble:optional_touchbar_controls
Aug 9, 2019
Merged

Add setting to make touchbar controls optional#70174
bpasero merged 6 commits intomicrosoft:masterfrom
MarcusNoble:optional_touchbar_controls

Conversation

@MarcusNoble
Copy link
Contributor

Related issues: #63865, #38333, on2-dev/nasc-vscode-mac-touchbar#9

Adds a new setting that allows the user to selectively have controls not appear in the touchbar without having to completely disable it.

Example settings to hide all debug controls but keep navigation:

{
	"keyboard.touchbar.ignoreActions": [
		"workbench.action.debug.start",
		"workbench.action.debug.run",
		"workbench.action.debug.restart",
		"workbench.action.debug.stepOver",
		"workbench.action.debug.stepInto",
		"workbench.action.debug.stepOut",
		"workbench.action.debug.stop",
		"workbench.action.debug.continue",
		"workbench.action.debug.pause"
	]
}

This also allows people to use plugins that make use of the touchbar without having to also have the nav and debug controls (that take up much of the space).

Screenshots

Default:
image

Debug controls disabled:
image

Debug controls disabled with nasc-vscode-mac-touchbar extension enabled:
image

@msftclas
Copy link

msftclas commented Mar 10, 2019

CLA assistant check
All CLA requirements met.

this.touchBarGroups.forEach((touchBarGroup, index) => {
const commands = groups[index];
// Clear the segments first to prevent icon or label remaining
touchBarGroup.segments = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There seems to be a bug in electron where it doesn't correctly clear icons or labels when segments are replaced (See: electron/electron#17322). This gets around it by clearing out the segments then replacing them. No noticeable flicker when tested on my machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This issue has been fixed in Electron (electron/electron#17336) but has yet to be released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has now been released in https://github.com/electron/electron/releases/tag/v3.1.7

What is the process for updating dependencies of VSCode? Are there any guidelines that need to be followed?

@bpasero bpasero added this to the Backlog milestone Aug 8, 2019
@bpasero
Copy link
Member

bpasero commented Aug 9, 2019

Thanks, merged with the settings name keyboard.touchbar.ignored

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.

3 participants