Skip to content

[actions] Multiline copy should not include line numbers #25365

Closed
@Thalhammer

Description

@Thalhammer

Description

When trying to copy multiple lines of output from a actions step it will include line numbers.
This is especially annoying if actions produce user readable output that needs to be preserved and executed as given (e.g. a lint job outputing a git patch command), because you need to first copy it to a text editor, remove the line numbers and then apply it. This adds an extra, really annoying step.

Instead it should only copy the content, not including the line numbers, like it does in diff/code view.

For my own actions I can work around this by putting everything on a single line and relying on gitea's line wrapping, but this should probably be changed none the less.

The easy way to achieve this (and the way I did it for the below screenshot) would be to add the following css, however this prevents selection of the numbers entirely, which might not be what everyone wants. It might be better to have a gui config and let people select.

.job-log-line .line-num {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

Screenshots

What it looks like

What its supposed to look like

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Linux (Google Chrome)

Browser Version

Version 114.0.5735.106

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions