-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
add rowsToScroll to scrollUp/Down w/ fallback to system default #7924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-using rowsToScroll
like that is really quite clever, I like it. This is again one of those things where it might be hard to test the interaction between the TermControl
and the TerminalPage
, so it's probably fine without a unit test.
<PM hat> Make sure to update the schema and docs as well</PM hat>, but I think this looks good to go!
Will be done - wanted to hear the initial feedback! Unrelated question - I see that linter github action is failing on the lines that were not modified. Is there a planned effort to lint the entire code base? |
Sorry about that. Looks like it's configured incorrectly, I'm hoping that we'll get it sorted out later today. You shouldn't have to change anything for this PR, the |
@zadjii-msft - I am not sure it is misconfigured: it looks there are some white-space alignment issues in the code.
|
Well, the linter shouldn't be running for C++ files. It actually doesn't know how to lint them, but then erroneously falls back to EDITORCONFIG as a language, and then immediately explodes. I've got a fix over in #7930. The schema wasn't formally linted, though it might be now that #7637 has merged.
|
@zadjii-msft - thanks for the clarification! |
For whatever reason, the super linter seems to think that any file it doesn't recognize is an EDITORCONFIG file. That means all our `cpp`, `hpp`, `h`, `resw`, `xaml`, etc files are going to get linted with different rules than the clang-format ones we already use. This PR disables the EDITORCONFIG linter, and has a minimal change to a cpp file to ensure that it's no longer linted by the action. See also: * #7637 added this * #7799 is blocked by this * #7924 is blocked by this
The linter should pass now if you rebase on top of master. It runs every time a new commit is entered and with the updated changes, the ccp files should no longer show any errors. I'm not sure how resw should be treated but most of them passed anyways. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! Just get that rebase/merge relative to master in here so the linter chills out and we'll be good to go.
…n using a hack with negative enum value
@miniksa -Addressed the comment and the linter is better, but now the CI is failing on something that I am not sure related to my changes:
Any ideas on how to proceed? 😄 |
@Don-Vito Sometimes the CI is just flaky. Looks like it's passed on re-run. I'll give Dustin the day to block if he has any last concerns, but I think this is good to go IMO. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@msftbot merge this in 14 hours |
Hello @zadjii-msft! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love that we're exposing TermControl's "RowsToScroll" as part of its public API, but there's definitely worse things in our codebase.
I just realized, writing this comment, that RowsToScroll has a magic value of -1
(WHEEL_PAGESCROLL
) that it can receive from the win32 system parameters API.
It might be better to remove the dependency on TermControl's rows and calculate it using the same mechanism as TC instead, so that we can keep track of the places we're using the system parameter and where we should have to care about WHEEL_PAGESCROLL.
Thanks for the feedback! 😄 I will fix it. The original idea to use the same value to provide a more consistent behavior with mouse scroll speed. |
@DHowett - when doing the change you suggested, I have few questions:
|
@DHowett - I am not sure I got everything correctly 😄. In any case I reverted the change in the TermControl API and compute the default rows to scroll in TerminalPage itself using the same mechanics. To preserve some level of reloading this value I do it upon settings load (in TermControl it is updated upon getting focus as well). |
@DHowett - anything I can do to unblock this one? I am ready to give some extra to ensure we have hacktoberfest tree planted 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. Thanks so much!
🎉 Handy links: |
Summary of the Pull Request
in ScrollUp and ScrollDown commands (parameter is called
"rowsToScroll").
using for mouse scrolls), rather than 1 line.
Validation Steps Performed
verified they and the default appear and behave as expected
Closes #5078