-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 action auto-scroll #30057
base: main
Are you sure you want to change the base?
Add action auto-scroll #30057
Conversation
1bf3cd3
to
17f351b
Compare
This kind of scrolling while nice, does present a UX issue when the user scrolls up: It would scroll it down again when the next line is received which is disruptive. It would be better to:
That way, a user can to view lines in a running step, while still having autoscrolling when they scroll to bottom. This is how pretty much all terminals do it as well. In case it's unclear how to do this, I may have some code snippets laying around somewhere. |
Co-authored-by: silverwind <me@silverwind.io>
I try to comply to this behavior by only scrolling if the bottom of the container which contains all job steps is visible when new lines are added. So if the user scrolls up and the container bottom isn't visible, it won't continue scrolling. |
Sounds good. I guess this case is a bit tricker than the ones I had because it's not a simple self-contained element that scrolls but the whole page. When in doubt, check how GitHub does it. |
GitHub has the same behavior as my PR as long as there are only a few steps (+ the scroll down when visiting the an action page). From how GitHub does it, how you suggested it and how I would like it, I purpose the following:
|
Adds an auto-scroll/follow feature to running actions (#25186, #28535).
When new log lines are appended and the bottom of the logs container (
.action-view-right
) is visible at this time, the page automatically scrolls down to the bottom of the logs.