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

Fixed terminal resize and scroll layout issues, improved utility area toggle animation #1845

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

austincondiff
Copy link
Collaborator

@austincondiff austincondiff commented Aug 8, 2024

Description

When the terminal was resized, it displayed partial lines at the bottom due to a remainder in the line height multiple. This caused two things:

  1. Resizing the Utility Area drawer caused a visual stutter in the terminal.
  2. Partial lines at the bottom created an unsightly visual artifact.

The terminal height must now be a multiple of a single line’s height to resolve these issues.

Utility area drawer now has a push/pull animation rather than a reveal.

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

codeedit-terminal-height-fix-before-resize-scroll.mov
codeedit-terminal-height-fix-before-resize.mov

After

codeedit-terminal-height-fix-after.mov

VS Code handles this in a similar way

vscode-terminal-height-resize.mov

Improved utility area animation

Screen.Recording.2024-08-10.at.12.44.40.AM.mov

Note

I removed the maximize drawer toggle in favor of simply dragging to resize up. This simplifies things greatly.

…l. Removed the maximize drawer button in favor of simply dragging to resize up.
@austincondiff austincondiff changed the title Fixed terminal resize jank and visual artifacts during scroll Fixed terminal resize and scroll layout issues, improved utility area toggle animation Aug 10, 2024
@austincondiff austincondiff added the enhancement New feature or request label Aug 10, 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.

Just one little thing, and it’s good to go!

CodeEdit/WorkspaceView.swift Outdated Show resolved Hide resolved
Co-authored-by: Tom Ludwig <tommludwig@icloud.com>
@austincondiff
Copy link
Collaborator Author

austincondiff commented Aug 13, 2024

It might be nice to fix the terminal to the top (how it was before) if the scroll position is at the very top. This way the terminal contents are both aligned to the top and when the utility area drawer is resized, the terminal content follows it smoothly. I am not sure how to grab the terminal scroll position we'd need in order to do this though.

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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants