Skip to content

Use jenkins cards over bootstrap cards#422

Merged
uhafner merged 1 commit into
jenkinsci:mainfrom
lewisbirks:use-jenkins-cards
Jul 31, 2025
Merged

Use jenkins cards over bootstrap cards#422
uhafner merged 1 commit into
jenkinsci:mainfrom
lewisbirks:use-jenkins-cards

Conversation

@lewisbirks

@lewisbirks lewisbirks commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

A follow up for jenkinsci/warnings-ng-plugin#2067 (review)

The main difference between this and the implementation in the jenkinsci/warnings-ng-plugin#2067 is that I haven't restricted the height of the card as this is for a page that is dedicated to these messages. That can be changed if wanted.

Testing done

Tested against the projects provided in https://github.com/uhafner/warnings-ng-plugin-devenv

image

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@lewisbirks lewisbirks marked this pull request as draft July 30, 2025 10:13
@lewisbirks lewisbirks marked this pull request as ready for review July 30, 2025 10:25
@uhafner uhafner added the enhancement Enhancement of existing functionality label Jul 30, 2025
@uhafner

uhafner commented Jul 30, 2025

Copy link
Copy Markdown
Member

The content looks fine! It produces a lot of duplication, though. See my comment in #420

The main difference between this and the implementation in the jenkinsci/warnings-ng-plugin#2067 is that I haven't restricted the height of the card as this is for a page that is dedicated to these messages.

An ideal UX would be: the info and error panels would fill the whole page (both 50% of the non-header area). Then one could scroll the content of each of these 50% views, but the side panel would stay unchanged. This is one of the annoying "features" in Jenkins that the side panel navigation is not fixed and scrolls away when the current page is scrolled. But I tried so many times to get this working without success.

<st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
<l:app-bar title="${title}"/>

<div class="${class}">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we would merge #420 then your code would be much shorter:

<bs:page it="${it}">
        <j:if test="${size(it.errorMessages) > 0}">
          <l:card title="${%Error Messages}">
            <div class="bs5-console-output">
              <pre id="errors">
                <j:forEach var="message" items="${it.errorMessages}">
                  <div>
                    ${message}
                  </div>
                </j:forEach>
            </div>
          </l:card>
        </j:if>
</bs>
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@uhafner

uhafner commented Jul 30, 2025

Copy link
Copy Markdown
Member

Ok, I merged #420. Can you please rebase or merge using the page tag?

@lewisbirks

Copy link
Copy Markdown
Contributor Author

Ok, I merged #420. Can you please rebase or merge using the page tag?

Yeah, I won't be able to get round to it today, but I'll get it done tomorrow 🙂

Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
@lewisbirks

Copy link
Copy Markdown
Contributor Author

An ideal UX would be: the info and error panels would fill the whole page (both 50% of the non-header area). Then one could scroll the content of each of these 50% views, but the side panel would stay unchanged. This is one of the annoying "features" in Jenkins that the side panel navigation is not fixed and scrolls away when the current page is scrolled. But I tried so many times to get this working without success.

Gave it a go but wasn't able to get anything working, but then again styling isn't my strong point so maybe someone else will manage it eventually

@uhafner uhafner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@uhafner uhafner merged commit 47ff1aa into jenkinsci:main Jul 31, 2025
14 checks passed
@lewisbirks lewisbirks deleted the use-jenkins-cards branch July 31, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants