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

✨ Split Editors #338

Closed
Tracked by #346
austincondiff opened this issue Mar 30, 2022 · 9 comments · Fixed by #1080
Closed
Tracked by #346

✨ Split Editors #338

austincondiff opened this issue Mar 30, 2022 · 9 comments · Fixed by #1080
Assignees
Labels
enhancement New feature or request source editor UI This is UI related workspace

Comments

@austincondiff
Copy link
Collaborator

austincondiff commented Mar 30, 2022

Is your feature request related to a problem? Please describe.

Users might want to see more than one editor at once.

Describe the solution you'd like

We need the ability to open editors in a split side-by-side layout, vertically and horizontally.

Mockups

Step 1: User mouses over to editor tab that they would like to go in a new split editor

image

Step 2: User drags tab out of the tab bar

To the bottom half of the editor to split down

image

Or to the right half of the editor to split right

image

Step 3: User releases mouse and new split editor view is added to the right

image

Step 4: User drags addition tab to right split editor view

To add it to the existing split view, the user can drag the tab into the tab bar of the right split or over the center of the split view like so...

image

To split the right split view again to the right...

image

Note: This will create three columns equal in width. Dragging to the right side of the left split and the left side of the right split will do the same thing, create a new split view in the middle of the two existing split views.

Or to the bottom to create a bottom split within the existing right split...

image

Describe alternatives you've considered
n/a

Additional context

See Workspace Windowing & Layout Strategy.

Notice the close editor button on the left and split icon on the right. When right clicking this split icon you might see an option to split vertically as well. We might have an icon that puts that pane in fullscreen like Xcode
Screen Shot 2022-03-30 at 11 41 56 AM

We may also consider a setting that closes the editor pane on close of the last tab in that pane.

Screen Shot 2022-03-30 at 11 41 56 AM

VSCode Split Editors
Screen Shot 2022-03-30 at 12 10 00 PM

Complex layouts are possible
image

Related Issues

@austincondiff austincondiff added the enhancement New feature or request label Mar 30, 2022
@austincondiff austincondiff changed the title [FEAT] - Split Editors ✨ Split Editors Mar 31, 2022
@austincondiff austincondiff mentioned this issue Mar 31, 2022
12 tasks
@CodeEditApp CodeEditApp deleted a comment from lukepistrol Apr 19, 2022
@austincondiff
Copy link
Collaborator Author

Please note, this issue is blocked and is dependent on the completion of the following issue:

@Matejkob
Copy link
Collaborator

Matejkob commented Jul 3, 2022

I can try to do it. 🚀

Matejkob added a commit to Matejkob/CodeEdit that referenced this issue Jul 3, 2022
… Add drop delegate, calculations of proposal position and unit tests to it
@Matejkob
Copy link
Collaborator

Matejkob commented Jul 3, 2022

I noticed that on the mockups when a user drags the tab out and puts it in the editor, it splits the editor and placeholder into two independent views. We can handle it in a bit different way - in the same way, as VS code handles this. Instead of creating two independent views embedded into VStack or HStack, we can create an overlay above the editor. Moreover, we can go a bit further behind VS code idea and let a user option to put a new editor in one of the following positions: leading, trailing, top, bottom or center. Position center probably isn't required when a user drags the tab out of the tab bar, but if we add dragging a file out directly from the navigator, it would be necessary. Thanks to this solution interface would be a bit more user-friendly and a bit more smooth during choosing positions for the new editor. I'm attaching the recording with POC.

Screen.Recording.2022-07-03.at.7.14.47.PM.mov

austincondiff added a commit that referenced this issue Jul 30, 2022
* [#338] Add `SplitEditors` and `SplitEditorsTests` targets; Add drop delegate, calculations of proposal position and unit tests to it

* Add split editor drop proposal overlay

* Create overlay as on the mock-ups

* Add possibility to chose available positions

* Rename Split Editor to Split View

* Add split view view modifier

* Add possibility to handle end of dragging

Co-authored-by: Mateusz Bąk <44930823+Matejkob@users.noreply.github.com>
austincondiff added a commit that referenced this issue Sep 27, 2022
* Split Layouts WIP (#702)

* [#338] Add `SplitEditors` and `SplitEditorsTests` targets; Add drop delegate, calculations of proposal position and unit tests to it

* Add split editor drop proposal overlay

* Create overlay as on the mock-ups

* Add possibility to chose available positions

* Rename Split Editor to Split View

* Add split view view modifier

* Add possibility to handle end of dragging

Co-authored-by: Mateusz Bąk <44930823+Matejkob@users.noreply.github.com>

* Added update capabilities to application menu and preferences.

* Fixed typos

* Update Package.swift

* Update Package.swift

* Delete DropProposalPositionCalculationsTests.swift

* Delete DropProposalPositionCalculations.swift

* Delete SplitViewDropDelegate.swift

* Delete SplitEditorDropProposalPosition.swift

* Delete SplitViewDropProposalOverlay.swift

* Delete SplitViewModifier.swift

* Update AppDelegate.swift

* Moved updater state object up so it will get initialized on launch and added SUEnableInstallerLauncherService to Info.plist

* Changed ObservableUpdater to SoftwareUpdater

* Missed one, got it

* Removed shared singleton from SoftwareUpdater and removed invalid @StateObject from AppDelegate.

* Lowercased URL in Info.plist to be consistent with other URLs

Co-authored-by: Mateusz Bąk <44930823+Matejkob@users.noreply.github.com>
@andyPark
Copy link

andyPark commented Oct 3, 2022

I'm actively working on this, could you assign it to me? @austincondiff

@austincondiff
Copy link
Collaborator Author

austincondiff commented Nov 4, 2022

@andyPark Are you still working on this? Just wanted to make sure.

If so, you might check out the documentation around this that we have just written.

@andyPark andyPark removed their assignment Nov 5, 2022
@andyPark
Copy link

andyPark commented Nov 5, 2022

@austincondiff Hey I got dragged into another project, sorry but I can't finish this task at the moment!

@austincondiff
Copy link
Collaborator Author

No worries. Anybody else care to take this on?

@austincondiff
Copy link
Collaborator Author

I just updated the mockups in main issue description. Per @Matejkob's comment:

I noticed that on the mockups when a user drags the tab out and puts it in the editor, it splits the editor and placeholder into two independent views. We can handle it in a bit different way - in the same way, as VS code handles this. Instead of creating two independent views embedded into VStack or HStack, we can create an overlay above the editor.

These updated mockups reflect this by floating the placeholders on top of the editor view instead of splitting the view as the user is dragging as this could lead to a frustrating UX.

@austincondiff
Copy link
Collaborator Author

I am assigning this to @bombardier200. @Matejkob could you brief him on the work you started?

@Wouter01 Wouter01 mentioned this issue Feb 24, 2023
20 tasks
@Wouter01 Wouter01 linked a pull request Mar 5, 2023 that will close this issue
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request source editor UI This is UI related workspace
Projects
Status: 🏁 Complete
Development

Successfully merging a pull request may close this issue.

5 participants