fixes #2903 - Rearrange layout of columns#2936
Conversation
|
Could perhaps be better implemented by an option in preferences? I'm not sure if it's something people would switch between frequently enough to need a dedicated button on the UI, and the logo for it is very close visually to the one next to it. |
I think having to navigate to a new screen and find the orientation setting to change it each time would be quite jarring for the user. I know VSCode has the layout options in "View" of the top menu bar. I agree changing the icon to make it more unique and identifiable would be better.
I'm struggling to replicate this. Can you let me know more details and I can investigate further |
| if (!(editorStyle.fontSize > 0 && editorStyle.fontSize < 132)) editorIndentSize = 4 | ||
| editorStyle.indentSize = editorIndentSize | ||
|
|
||
| if (isStacking) { |
There was a problem hiding this comment.
Nit. I think this would be more readable if you add it like following:
editorStyle = isStacking ?
{ width: '100%' , height: `${this.state.codeEditorHeightInPercent}%` } :
{ width: `${this.state.codeEditorWidthInPercent}%`, height: '100%' }
previewStyle = isStacking ?
{ width: '100%', height: `${100 - this.state.codeEditorHeightInPercent}%` } :
{ width: `${100 - this.state.codeEditorWidthInPercent}%`, height: '100%' }
sliderStyle = isStacking ?
{ left: 0, top: `${this.state.codeEditorHeightInPercent}%` } :
{ left: `${this.state.codeEditorWidthInPercent}%`, top: 0 }if/else would be also OK but I would avoid adding each prop line by line & use backtick strings to add the % to the style.
There was a problem hiding this comment.
I agree, I have changed the if statement however, this would override the previously set properties, so I have used object.assign to set the new properties. It might be beneficial to update the babel config to transpile the spread operator.
|
@callumbooth can you please merge master into your branch? For me it's also hard to reproduce the toggling issue that @MiloTodt mentioned. A step-by-step guide would help here as it's pretty fast in the screenrecording. To the icon |
This has been done |
ZeroX-DG
left a comment
There was a problem hiding this comment.
Sorry for the wait 😭 Can you resolve the conflict please.
browser/main/lib/ConfigManager.js
Outdated
| delfaultStatus: 'PREVIEW', // 'PREVIEW', 'CODE' | ||
| scrollPastEnd: false, | ||
| type: 'SPLIT', // 'SPLIT', 'EDITOR_PREVIEW' | ||
| isStacking: false, |
There was a problem hiding this comment.
I think this should be in UI instead of editor
| <img styleName='iconInfo' src={isStacking ? '../resources/icon/icon-panel-split-vertical.svg' : '../resources/icon/icon-panel-split-horizontal.svg'} /> | ||
| <span lang={i18n.locale} styleName='tooltip'>{ | ||
| isStacking ? i18n.__('Split Panels Horizontally') : i18n.__('Split Panels Vertically') | ||
|
|
There was a problem hiding this comment.
Can you adjust the code format here? I think you should separate the src for image and the content for span tag into smaller variables for better readability
There was a problem hiding this comment.
I have refactored the image src and the span text into smaller vars.
browser/components/CodeEditor.js
Outdated
| width: width, | ||
| height: height | ||
| } | ||
| } |
There was a problem hiding this comment.
Can you fix the format here too please?
Just adding my two cents: I think that adding this to the View menu would also be better. There would be less clutter in the UI, and this feature 100% pertains to the View. |
|
@callumbooth can you resolve the conflict before I can approve this please? thank you 😃 |
|
Also I agree with the idea of moving this to the |
|
@callumbooth ping |
|
@ZeroX-DG I've fixed the merge conflicts and moved the button the View menu |
ZeroX-DG
left a comment
There was a problem hiding this comment.
@callumbooth can you update your code before I approve it?
| isLocked: false, | ||
| editorType: props.config.editor.type, | ||
| switchPreview: props.config.editor.switchPreview, | ||
| RTL: false |
There was a problem hiding this comment.
Please don't remove this RTL key, this is for Right To Left feature, people who use this feature will be very angry 😄
|
@ZeroX-DG sorry, thats been fixed |


Description
Adds a button to change the orientation of the the split editing window to allow either vertical or horizontal
Issue fixed
#2903
Type of changes
Checklist:
IssueHunt Summary
IssueHunt has been backed by the following sponsors. Become a sponsor