gitea icon indicating copy to clipboard operation
gitea copied to clipboard

[Actions] Auto scroll feature

Open RealFascinated opened this issue 1 year ago • 3 comments

Feature Description

It would be nice if on the action page it would auto scroll down to the bottom of the logs (and maybe auto open the steps?)

Screenshots

No response

RealFascinated avatar Jun 10 '23 00:06 RealFascinated

I was impatient so I wrote a hacky tamper monkey script that limits the height of the action step and auto scrolls on changes:

// ==UserScript==
// @name         Gitea Autoscroll
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Limit height of build steps and scroll them automagically
// @author       You
// @match        [DOMAIN HERE]*/actions/runs/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gitea.io
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    GM_addStyle(`.job-step-logs {
        max-height: 75vh !important;
        overflow-y: scroll;
    }`);

    $("body").on('DOMSubtreeModified', ".job-step-logs", function() {
        this.scrollTo(0, this.scrollHeight);
    });
})();

I downloaded tamper monkey 10 minutes ago, so I might've done something weird in my script 😛 it works for me!

Edit: It no longer works since Chrome removed the DOMSubtreeModified event :/

GammaGames avatar Aug 30 '23 16:08 GammaGames

100% I am new to Gitea and this issue really stood out as Jenkins has had this for years. I have several long running actions and having to scroll to the bottom on every update is a PITA. I was going to open a proposal but found this one already opened.

jjardina avatar Apr 26 '24 18:04 jjardina

This definitely needs to be added

Rainnny7 avatar May 10 '24 15:05 Rainnny7