Skip to content

Splitview #1080

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

Merged
merged 85 commits into from
Mar 8, 2023
Merged

Splitview #1080

merged 85 commits into from
Mar 8, 2023

Conversation

Wouter01
Copy link
Member

@Wouter01 Wouter01 commented Feb 24, 2023

Description

This PR adds splitview support for the editor. It includes the following features:

  • Ability to split editor vertically or horizontally, by right clicking a tab or by pressing the split button in the tab view.
  • Translucency for the toolbar
  • Translucency for the statusbar
  • Improvements to terminal dragging
  • Forward / Backward funcionality for each TabGroup
  • Closing a TabGroup by pressing the X button
  • Probably some other things I forgot

There are also some regressions, which will be addressed in a later PR:

  • Terminal state is not saved
  • Tab state is not saved
  • TabGroup state is not saved

Related Issue

#338
#1109

Checklist

  • Multiple Editors
  • Horizontal Split View
  • Vertical Split View
  • Nested Split View
  • Create Split View by right clicking on tab
  • Create Split View by dragging file into editor
  • Move tab to other editor by dragging
  • Make top editors go under toolbar
  • Make bottom editors go under bottom toolbar
  • Adjustments to tabs
  • Refactor WorkspaceDocument and others to support multiple tabgroups
  • Fix UI issues
  • implement close / backward / forward buttons
  • Add support for temporary tabs
  • Add menu when long-pressing forward/backward icon
  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • I documented my code
  • Review requested

Screenshots

Wouter01 and others added 7 commits February 20, 2023 13:37
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>

# Conflicts:
#	CodeEdit/Features/Documents/WorkspaceDocument.swift
#	CodeEdit/Features/Tabs/Views/TabBarItemView.swift
#	CodeEdit/Features/Tabs/Views/TabBarView.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01 Wouter01 added the enhancement New feature or request label Feb 24, 2023
@Wouter01 Wouter01 self-assigned this Feb 24, 2023
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>

# Conflicts:
#	CodeEdit/WorkspaceView.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@bombardier200
Copy link
Contributor

@Wouter01 was just testing this out, it seems that the bottom drawer no longer allows you to select Debugger or Output, not for sure if this on purpose or not!

Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01
Copy link
Member Author

Wouter01 commented Mar 7, 2023

@Wouter01 was just testing this out, it seems that the bottom drawer no longer allows you to select Debugger or Output, not for sure if this on purpose or not!

Must've messed something up there 😅, I'll have a look

@Wouter01
Copy link
Member Author

Wouter01 commented Mar 7, 2023

@Wouter01 was just testing this out, it seems that the bottom drawer no longer allows you to select Debugger or Output, not for sure if this on purpose or not!

Looks like there was no code for those yet? There was however an unused switch, which I probably removed

austincondiff
austincondiff previously approved these changes Mar 7, 2023
Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

After thorough testing, I cannot reproduce any of my previously reported bugs! 👏

Way to go @Wouter01, great work. What an accomplishment! 🙌

Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

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

A couple things beyond the comments I've left:

  • There's a regression in the native tab style. The tab background is the active tab color and tabs consume the entire tab area when opened. See screenshots:
    Before:

Screenshot 2023-03-08 at 12 56 15 PM

After:

Screenshot 2023-03-08 at 12 58 36 PM

The background color also is the active color if you scroll to the left or right.
  • After clicking the back and forward arrows of an inactive split, it doesn't bring the inactive split into focus. This looks like it's a quick fix by just setting tabManager.activeTabGroup in those button handlers.

@austincondiff
Copy link
Collaborator

austincondiff commented Mar 8, 2023

A couple things beyond the comments I've left:

  • There's a regression in the native tab style. The tab background is the active tab color and tabs consume the entire tab area when opened. See screenshots:
    Before:
Screenshot 2023-03-08 at 12 56 15 PM

After:
Screenshot 2023-03-08 at 12 58 36 PM

The background color also is the active color if you scroll to the left or right.

  • After clicking the back and forward arrows of an inactive split, it doesn't bring the inactive split into focus. This looks like it's a quick fix by just setting tabManager.activeTabGroup in those button handlers.

@thecoolwinter I actually don't mind a single tab taking up the full width, two tabs taking 50% of the width, etc. This is how they work in Finder and every other app that supports native tabs. However, there is a slight problem, when there are no tabs, it looks like there is one big empty tab in the tab bar. It should instead be the darker background color behind the buttons.

image

Also when using native tabs, the vertical split line goes all the way up into the toolbar...

image

image

@Wouter01
Copy link
Member Author

Wouter01 commented Mar 8, 2023

Thanks for the feedback! I'll try addressing the issues.

I wanted to touch on this:

  • There's a regression in the native tab style. The tab background is the active tab color and tabs consume the entire tab area when opened.

I've checked, and it looks like that behavior is also there on the latest release of CodeEdit, so I'm guessing the change must've been made earlier. That said, I did make a regression regarding the color of the tabbar when no tabs are present, as @austincondiff pointed out.

@austincondiff
Copy link
Collaborator

@Wouter01 One additional thing I just found, after clicking the back and forward arrows of an inactive split, it doesn't bring the inactive split into focus.

Copy link
Contributor

@matthijseikelenboom matthijseikelenboom left a comment

Choose a reason for hiding this comment

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

Looks good to me, just fix @thecoolwinter 's comments and then it can be merged I think.

Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Wouter01 added 2 commits March 8, 2023 23:17
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01
Copy link
Member Author

Wouter01 commented Mar 8, 2023

@Wouter01 One additional thing I just found, after clicking the back and forward arrows of an inactive split, it doesn't bring the inactive split into focus.

@thecoolwinter mentioned that too, it's fixed!

austincondiff
austincondiff previously approved these changes Mar 8, 2023
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Approved, for the last time! After this I am not approving again... 😜

Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

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

Looks good. This is a lot of work nice job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏁 Complete
Development

Successfully merging this pull request may close these issues.

✨ Navigate back and forward through history of viewed tabs ✨ Split Editors
7 participants