-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add action auto-scroll #30057
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
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 <[email protected]>
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:
|
# Conflicts: # web_src/js/components/RepoActionView.vue
It needs some improvements, I will make some changes in this PR |
Made some changes in 5d0eccc, now we first collect all the auto-scroll-able log containers, and then scroll the last one. It should also be easier to add a "toggle" to switch the auto-scroll in |
* giteaofficial/main: (62 commits) Fix repo avatar conflict (go-gitea#32958) [skip ci] Updated licenses and gitignores fix trailing comma not matched in the case of alphanumeric issue (go-gitea#32945) Add auto-expanding running actions step (go-gitea#30058) Fix go-gitea#32954 (go-gitea#32955) Use Alpine 3.21 for the docker images (go-gitea#32924) Refactor template & test related code (go-gitea#32938) Use primary as button color (go-gitea#32949) [skip ci] Updated translations via Crowdin Add action auto-scroll (go-gitea#30057) Fix locale (go-gitea#32937) Enable Typescript `strictFunctionTypes` (go-gitea#32911) Fix areYouSure confirm (go-gitea#32941) Update i18n.go - Language Picker (go-gitea#32933) Move some errors to their own sub packages (go-gitea#32880) Improve navbar: add "admin" tip, add "active" style (go-gitea#32927) Refactor db package and remove unnecessary `DumpTables` (go-gitea#32930) show warning on navigation if currently editing comment or title (go-gitea#32920) Refactor pprof labels and process desc (go-gitea#32909) [skip ci] Updated translations via Crowdin ...
Adds an auto-scroll/follow feature to running actions (fix #25186, fix #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.