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

Show the REPL/output with cursor at the bottom (#792) #793

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

glebovmaksim
Copy link

@glebovmaksim glebovmaksim commented Sep 20, 2020

What has Changed?

Eliminates the state and always shows the REPL/output with cursor at the bottom when using command/shortcut ctrl+alt+c o.

Fixes #792

My Calva PR Checklist

I have:

  • Read How to Contribute.
  • Directed this pull request at the dev branch. (Or have specific reasons to target some other branch.)
  • Made sure I have changed the default PR base branch, so that it is not master. (Sorry for the nagging.)
  • Updated the [Unreleased] entry in CHANGELOG.md, linking the issue(s) that the PR is addressing.
  • Figured if anything about the fix warrants tests on Mac/Linux/Windows/Remote/Whatever, and either tested it there if so, or mentioned it in the PR.
  • Tested the VSIX built from the PR (so, after you've submitted the PR). You'll find the artifacts by clicking Show all checks in the CI section of the PR page, and then Details on the ci/circleci: build test. NB: There is a CircleCI bug that makes the Artifacts hard to find. Please see this issue for workarounds.
    • Tested the particular change
    • Figured if the change might have some side effects and tested those as well.
    • Smoke tested the extension as such.
  • Referenced the issue I am fixing/addressing in a commit message for the pull request.
    • If I am fixing the issue, I have used GitHub's fixes/closes syntax
    • If I am fixing just part of the issue, I have just referenced it w/o any of the "fixes” keywords.
  • Created the issue I am fixing/addressing, if it was not present.

The Calva Team PR Checklist:

Before merging we (at least one of us) have:

  • Made sure the PR is directed at the dev branch (unless reasons).
  • Figured if anything about the fix warrants tests on Mac/Linux/Windows/Remote/Whatever, and tested it there if so.
  • Read the source changes.
  • Given feedback and guidance on source changes, if needed. (Please consider noting extra nice stuff as well.)
  • Tested the VSIX built from the PR (well, if this is a PR that changes the source code.)
    • Tested the particular change
    • Figured if the change might have some side effects and tested those as well.
    • Smoke tested the extension as such.
  • If need be, had a chat within the team about particular changes.

Ping @PEZ, @kstehn, @cfehse, @bpringe

@PEZ
Copy link
Collaborator

PEZ commented Sep 20, 2020

I don't think we can remove the scrolling in that append method. When the window is not visible it should still be scrolled when made visible. So my guess is that this will not work when the output window is in the same tab group as the file where the evaluation happens. I'd be happy to be wrong about it, though. No fan of state. 😄

@glebovmaksim
Copy link
Author

The output window will always be scrolled to the bottom when made visible via the ctrl+alt+c o. It also works with "Open Results Window" button on hover (it's the same command) and with peek to definition. When using another methods (clicking on tab / ctrl+tab etc) the scrolling will not work. I'll revert that change if you consider it bad behaviour. This will require extra check to prevent double scrolling and will no longer be simple, but maybe it is necessary.

@bpringe
Copy link
Member

bpringe commented Sep 20, 2020

I like your changes here, but I agree with @PEZ that keeping the auto scroll behavior even when the output window is clicked via a tab and when there are unread eval results, is best. So your change would be additive and not remove any existing functionality. I too would like to get rid of that state, but the behavior (as desired) seems inherently stateful.

I'm not sure that preventing double scrolling is really necessary, as it's a pretty insignificant thing, I would guess, and an idempotent operation. But if it's pretty simple to prevent, then we should.

@PEZ
Copy link
Collaborator

PEZ commented Dec 18, 2020

Will you maybe have time to finish this during Christmas, @glebovmaksim ? 😄

@ieugen
Copy link
Contributor

ieugen commented Aug 11, 2021

Hi @glebovmaksim ,

I would like to see this through since I usually code with split window and having Calva output there messes with my flow.

Are you interested in continuing this?
Are you open to let someone else continue?

I would give it a shot, even though I know quite little about typescript and even less about vscode (that is how much I want to see this though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants