jenkinsci / next-executions-plugin

Adds a widget in the sidebar with the next build date for all the scheduled projects. It also creates a column definition
https://plugins.jenkins.io/next-executions/
MIT License
10 stars 25 forks source link

If the job name is long, the time information is not visible. #123

Closed jihunparkme closed 5 months ago

jihunparkme commented 5 months ago

What feature do you want to see added?

I found a problem where time information is not visible when the job name is long. I think job name is important, but time information is also important.

asis

.

So, if the job name exceeds a certain length, I suggest replacing the later characters with "...." Please refer to the example below

tobe

.

Thank you for providing a good plug-in. Please consider my suggestion. Thank you.

Upstream changes

cutJobName(name, limit) {
    if (name.length > limit) {
        return name.substring(0, limit) + '...';
    }
    return name;
}

Are you interested in contributing this feature?

No response

jonesbusy commented 5 months ago

Definitely need to be fixed, but I'm wonder if there is better CSS solution than just trimming the job name ?

jihunparkme commented 5 months ago

I think adding line breaks could also be a solution.

So, I found a CSS property called word-break. The word-break property specifies how words should break when reaching the end of a line. (ref. https://www.w3schools.com/cssref/css3_pr_word-break.php)

AS-IS

스크린샷 2024-06-13 오전 10 51 32
<tr>
    <td class="pane"><a tooltip="SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame" href="xxx"
            title="SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame">
            SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame</a></td>
    <td tooltip="(in )" class="pane" title="(in )">2024/06/13 10:49</td>
</tr>

...

TO-BE

스크린샷 2024-06-13 오전 10 54 04
<tr>
    <td class="pane"><a tooltip="SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame" href="xxx"
            title="SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame" style="word-break: break-all;">
            SampleJobNaaaaaaaaaaaaaaaaaaaaaaaaaaaame</a></td>
    <td tooltip="(in )" class="pane" title="(in )">2024/06/13 10:49</td>
</tr>

Simply add the word-break: break-all; option to an a tag that has the job name.

For your reference, I am using version 310.v52e770651319. (https://plugins.jenkins.io/next-executions/releases/)

Thank you.

jihunparkme commented 5 months ago

While reviewing the project for creating a pull request, I discovered that the issue I requested has already been addressed in version 327.v136ff959e97b_ https://github.com/jenkinsci/next-executions-plugin/pull/109

It seems appropriate to close this issue. Thank you.