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

Activity View Resize, Inspector Toggle, Window Consistency #1776

Merged
merged 7 commits into from
Jun 26, 2024

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jun 24, 2024

Description

Fixes a few issues with the windowing system, the toolbar, and the inspector.

  • Makes the activity view resizable
  • Removes the jank code used for the inspector tracking item in the toolbar
    • Replaces it with an inspector split item, allowing AppKit to handle the tracking exactly like Xcode's.
    • Removes animation glitches made more obvious with the activity view.
    • This also fixes a small bug where the inspector tracking item would be visible when the app opened and the inspector was closed.
  • Removes the root SwiftUI view, which was causing a lot of layout issues with the toolbar & inspector toggling. SwiftUI doesn't interop well with this stuff, so if in the future we absolutely need a SwiftUI API like focusedSceneObject we'll have to hack it into each of the three split views.

Misc:

  • Moved the split view setup code inside the split view.

There's still some work to do on the toolbar. In the example video the branch picker disappears before the activity view, which imo should be the other way around. But it's def a step in the right direction.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Before:

Toolbar removing wrong view:

Screen.Recording.2024-06-23.at.5.40.58.PM.mov

Resizing is awful:

Screen.Recording.2024-06-23.at.5.41.19.PM.mov

Now:

toolbar.mov

Still works w/ side tabs
Screenshot 2024-06-23 at 7 38 33 PM

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.

In Xcode the toolbar has a 25%-50%-25% split.

The activity viewer seems to have a max width of 40% of the total window width regardless of whether the navigator or inspector sidebar is opened or closed.

Can you make this adjustment?

tom-ludwig
tom-ludwig previously approved these changes Jun 25, 2024
Copy link
Member

@tom-ludwig tom-ludwig left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes! 🚀🚀🚀

@thecoolwinter
Copy link
Collaborator Author

In Xcode the toolbar has a 25%-50%-25% split.

The activity viewer seems to have a max width of 40% of the total window width regardless of whether the navigator or inspector sidebar is opened or closed.

Can you make this adjustment?

I probably can, but it'll likely require going a different route than is implemented here. Why don't we make an issue for that and merge this, since it fixes a few critical bugs beyond that. I can begin working on it in the meantime.

Copy link
Member

@FastestMolasses FastestMolasses left a comment

Choose a reason for hiding this comment

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

Just a small change, otherwise LGTM

CodeEdit/Features/ActivityViewer/ActivityViewer.swift Outdated Show resolved Hide resolved
@austincondiff austincondiff merged commit 051a837 into CodeEditApp:main Jun 26, 2024
2 checks passed
@austincondiff
Copy link
Collaborator

@thecoolwinter I hope you don't mind me committing @FastestMolasses's request. I then approved and merged this PR and created #1780.

@thecoolwinter thecoolwinter added the enhancement New feature or request label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Drag-collapsing Inspector sidebar in full-screen breaks layout
4 participants