Skip to content

added split pane options to settings#82888

Merged
bpasero merged 5 commits intomicrosoft:masterfrom
dhairyanadapara:splitting-pane-options-to-settings
Oct 21, 2019
Merged

added split pane options to settings#82888
bpasero merged 5 commits intomicrosoft:masterfrom
dhairyanadapara:splitting-pane-options-to-settings

Conversation

@dhairyanadapara
Copy link
Contributor

This PR fixes #79665

  • Added the setting for splitting the pane into multiple parts
  • User has 2 options:
    • Split: Selected editor splits into equal parts
    • Distribute: All editors splits into equal parts
  • Same while closing editors

@msftclas
Copy link

msftclas commented Oct 19, 2019

CLA assistant check
All CLA requirements met.

@bpasero
Copy link
Member

bpasero commented Oct 20, 2019

@dhairyanadapara I think you are adding the option on the wrong layer (monaco editor), shouldn't the setting appear very similar to other existing editor settings, such as workbench.editor.closeEmptyGroups?

@bpasero bpasero self-assigned this Oct 20, 2019
@bpasero bpasero added the info-needed Issue requires more information from poster label Oct 20, 2019
@dhairyanadapara dhairyanadapara force-pushed the splitting-pane-options-to-settings branch from bace6a2 to 3fe5f8b Compare October 20, 2019 08:31
@dhairyanadapara
Copy link
Contributor Author

Thanks, @bpasero. Found out the same. I have moved options to workbench.editor

labelFormat: 'default',
iconTheme: 'vs-seti'
iconTheme: 'vs-seti',
splitSizing: 'Distribute'
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer lowercase distribute and split

nls.localize('workbench.editor.splitSizing.Distribute', "Splits all the editors to equal parts."),
nls.localize('workbench.editor.splitSizing.Split', "Splits the active editor to equal parts.")
],
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'splitSizing' }, "Controls the sizing of editor tabs.")
Copy link
Member

Choose a reason for hiding this comment

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

Controls the sizing of editor tabs. => Controls the sizing of editors when splitting them.

},
'workbench.editor.splitSizing': {
'type': 'string',
'enum': ['Distribute', 'Split'],
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer lowercase distribute and split

'enum': ['Distribute', 'Split'],
'default': 'Distribute',
'enumDescriptions': [
nls.localize('workbench.editor.splitSizing.Distribute', "Splits all the editors to equal parts."),
Copy link
Member

Choose a reason for hiding this comment

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

workbench.editor.splitSizing.Distribute => workbench.editor.splitSizingDistribute

workbench.editor.splitSizing.Split => workbench.editor.splitSizingSplit

mouseBackForwardToNavigate?: boolean;
labelFormat?: 'default' | 'short' | 'medium' | 'long';
restoreViewState?: boolean;
splitSizing?: 'Split' | 'Distribute';
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer lowercase distribute and split

return group;
}

private _getSizingStyle(): Sizing {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private _getSizingStyle(): Sizing {
private getSplitSizingStyle(): Sizing {
const splitStyle = this._partOptions.splitSizing;
if (splitStyle === 'Split') {
return Sizing.Split;
}
return Sizing.Distribute;
}

@bpasero bpasero added this to the October 2019 milestone Oct 21, 2019
@bpasero bpasero removed the info-needed Issue requires more information from poster label Oct 21, 2019
Dhaiyra and others added 2 commits October 21, 2019 21:09
@bpasero bpasero merged commit 0abf6cf into microsoft:master Oct 21, 2019
@bpasero
Copy link
Member

bpasero commented Oct 21, 2019

Thanks 👍

@dhairyanadapara
Copy link
Contributor Author

Thanks, @bpasero. This was my first contribution to open source and I enjoyed it. If you found any other issue in which I can help, please assign it. Thanks again for helping. :)

@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2020
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.

Option to not automatically resize all panes when splitting a pane

3 participants