Skip to content

Added scroll past end behavior (overscroll) #77

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 5 commits into from
Apr 6, 2025

Conversation

FastestMolasses
Copy link
Member

@FastestMolasses FastestMolasses commented Mar 31, 2025

Description

Added optional functionality to allow the user to scroll past the end of the document, like in Xcode or VSCode.

Related Issues

Closes #76

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

This is showing an extra 50% of the available screen. It will properly update when resizing the window as well.

Screen.Recording.2025-03-30.at.4.58.39.PM.mov

@FastestMolasses FastestMolasses self-assigned this Mar 31, 2025
@FastestMolasses FastestMolasses added the enhancement New feature or request label Mar 31, 2025
@FastestMolasses FastestMolasses changed the title Added scroll past end behavior Added scroll past end behavior (overscroll) Mar 31, 2025
@thecoolwinter
Copy link
Contributor

This works well, but I should mention we already implement overscroll in CodeEditSourceEditor.

Personally, I don't think this package is the place for it. In my mind this TextView class has to be managed by some container view, which should handle things like overscroll. In CodeEdit's case, that's the scroll view in CESE. I hate to waste your time on this though!

@FastestMolasses
Copy link
Member Author

The implementation in CodeEditSourceEditor is a little buggy (jumps around sometimes) and it doesn't allow the user to click in the extended area to set the cursor to the end of the file. Is there a known fix for this? If so I can implement it.

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.

I spoke with Austin about this the other day, and if this gets merged, I’d like to have a direct implementation in Settings where the user can choose the overflow amount.
Everything else looks fine to me.

@FastestMolasses
Copy link
Member Author

FastestMolasses commented Mar 31, 2025

I spoke with Austin about this the other day, and if this gets merged, I’d like to have a direct implementation in Settings where the user can choose the overflow amount. Everything else looks fine to me.

Awesome, I do have this PR ready to go that edits the overflow amount in the settings menu: CodeEditApp/CodeEdit#2010

It can be reviewed and merged now, but it will use the current implementation. Depends on what we want to do here, I do find the current implementation to be a bit buggy though.

Copy link
Contributor

@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.

Looks good!

@thecoolwinter thecoolwinter merged commit 02202a8 into main Apr 6, 2025
2 checks passed
@thecoolwinter thecoolwinter deleted the end_scroll_behavior branch April 6, 2025 21:57
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.

✨ Overscroll - Scroll past the end of the document
4 participants