Skip to content
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

table resizing #386

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,60 +23,80 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:s="/lib/samples">
<j:jelly xmlns:j="jelly:core" xmlns:s="/lib/samples" xmlns:t="/lib/hudson" xmlns:l="/lib/layout">
<s:layout>
<s:section hideBorder="true">
<s:group>
<s:preview>
<table class="jenkins-table sortable jenkins-!-margin-bottom-0">
<thead>
<th>
Name
</th>
<th>
Status
</th>
<th>
Reason
</th>
</thead>
<tbody>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 1</a>
</td>
<td>
Success
<a href="#" class="jenkins-table__link jenkins-table__badge model-link">#7</a>
</td>
<td>
No Errors
</td>
</tr>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 2</a>
</td>
<td>
Failure
</td>
<td>
Can't compile
</td>
</tr>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 3</a>
</td>
<td>
Unstable
</td>
<td>
Test Failed
</td>
</tr>
</tbody>
</table>
<div class="jdl-table-container">
<t:setIconSize/>
<table class="jenkins-table sortable ${iconSize == '16x16' ? 'jenkins-table--small' : iconSize == '24x24' ? 'jenkins-table--medium' : ''}">
<thead>
<th>
Name
</th>
<th class="jenkins-table__cell--tight">S</th>
<th>
Status
</th>
<th>
Reason
</th>
</thead>
<tbody>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 1</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-blue"/>
</div>
</td>
<td>
Success
<a href="#" class="jenkins-table__link jenkins-table__badge model-link">#7</a>
</td>
<td>
No Errors
</td>
</tr>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 2</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-red"/>
</div>
</td>
<td>
Failure
</td>
<td>
Can't compile
</td>
</tr>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 3</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-yellow"/>
</div>
</td>
<td>
Unstable
</td>
<td>
Test Failed
</td>
</tr>
</tbody>
</table>
<t:iconSize/>
</div>
</s:preview>
<s:code file="index.jelly" />
</s:group>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/scss/pages/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
@use "notifications";
@use "spacing";
@use "symbols";
@use "tables";
8 changes: 8 additions & 0 deletions src/main/resources/scss/pages/_tables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.jdl-table-container {
width: 100%;
margin-bottom: 0;
}

.jdl-table-container>div:last-child {
margin-bottom: 0;
}
46 changes: 32 additions & 14 deletions src/main/webapp/Table/index.jelly
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<table class="jenkins-table sortable">
<thead>
<th>
Name
</th>
<th>
Status
</th>
<th>
Reason
</th>
</thead>
<tbody>
<t:setIconSize/>
<table class="jenkins-table sortable ${iconSize == '16x16' ? 'jenkins-table--small' : iconSize == '24x24' ? 'jenkins-table--medium' : ''}">
<thead>
<th>
Name
</th>
<th class="jenkins-table__cell--tight">S</th>
<th>
Status
</th>
<th>
Reason
</th>
</thead>
<tbody>
<tr>
<td>
<a href="#" class="jenkins-table__link">Link 1</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-blue"/>
</div>
</td>
<td>
Success
<a href="#" class="jenkins-table__link jenkins-table__badge model-link">#7</a>
Expand All @@ -27,6 +34,11 @@
<td>
<a href="#" class="jenkins-table__link">Link 2</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-red"/>
</div>
</td>
<td>
Failure
</td>
Expand All @@ -38,12 +50,18 @@
<td>
<a href="#" class="jenkins-table__link">Link 3</a>
</td>
<td class="jenkins-table__cell--tight jenkins-table__icon">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-yellow"/>
</div>
</td>
<td>
Unstable
</td>
<td>
Test Failed
</td>
</tr>
</tbody>
</tbody>
</table>
<t:iconSize/>
3 changes: 2 additions & 1 deletion src/test/java/ValidRelativeUrlsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ private boolean filterUrl(DomNode anchor) {
&& !url.equals("..")
&& !url.equals("twoColumn")
&& !url.equals("oneColumn")
&& !url.equals("fullscreen");
&& !url.equals("fullscreen")
&& !url.startsWith("/jenkins/iconSize");

if (!response) {
System.out.println("🤫 Ignoring URL: " + url);
Expand Down
Loading