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

added split pane options to settings #82888

Merged

Conversation

@dhairyanadapara
Copy link
Contributor

dhairyanadapara commented Oct 19, 2019

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

This comment has been minimized.

Copy link

msftclas commented Oct 19, 2019

CLA assistant check
All CLA requirements met.

@bpasero

This comment has been minimized.

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
Dhaiyra
@dhairyanadapara dhairyanadapara force-pushed the dhairyanadapara:splitting-pane-options-to-settings branch from bace6a2 to 3fe5f8b Oct 20, 2019
@dhairyanadapara

This comment has been minimized.

Copy link
Contributor Author

dhairyanadapara commented Oct 20, 2019

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

@@ -37,7 +37,8 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = {
openSideBySideDirection: 'right',
closeEmptyGroups: true,
labelFormat: 'default',
iconTheme: 'vs-seti'
iconTheme: 'vs-seti',
splitSizing: 'Distribute'

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member

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.")

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member

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

@@ -60,6 +60,16 @@ import { isMacintosh, isWindows, isLinux, isWeb, isNative } from 'vs/base/common
],
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs.")
},
'workbench.editor.splitSizing': {
'type': 'string',
'enum': ['Distribute', 'Split'],

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member

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."),

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member

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

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

@@ -1025,6 +1025,7 @@ interface IEditorPartConfiguration {
mouseBackForwardToNavigate?: boolean;
labelFormat?: 'default' | 'short' | 'medium' | 'long';
restoreViewState?: boolean;
splitSizing?: 'Split' | 'Distribute';

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member

I would prefer lowercase distribute and split

@@ -497,13 +497,18 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
return group;
}

private _getSizingStyle(): Sizing {

This comment has been minimized.

Copy link
@bpasero

bpasero Oct 21, 2019

Member
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
Dhaiyra and others added 2 commits Oct 21, 2019
Dhaiyra
@bpasero bpasero merged commit 0abf6cf into microsoft:master Oct 21, 2019
1 of 2 checks passed
1 of 2 checks passed
VS Code in progress
Details
license/cla All CLA requirements met.
Details
@bpasero

This comment has been minimized.

Copy link
Member

bpasero commented Oct 21, 2019

Thanks 👍

@dhairyanadapara

This comment has been minimized.

Copy link
Contributor Author

dhairyanadapara commented Oct 21, 2019

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.