-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement the UI for
LabelAxis
(#213)
The `LabelAxis` configuration was using YUI TreeView. As YUI is very old and deprecated we should remove this. This generates the complete configure page in Jelly and just add some small JavasCript to show/hide the lists with labels. Show the description as tooltip instead of adding it in brackets after the label name. The description can contain HTML, so we need to safeguard it with the markup formatter.
- Loading branch information
1 parent
4d7b7bf
commit ff91cd7
Showing
6 changed files
with
129 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.mp-label-axis__button { | ||
min-height: 20px; | ||
height: 20px; | ||
padding: 0.5rem 0.3rem; | ||
} | ||
|
||
.mp-label-axis__button[data-hidden=false] { | ||
rotate: 180deg; | ||
} | ||
|
||
.mp-label-axis__container > .jenkins-form-label { | ||
display:flex; | ||
gap: 5px; | ||
align-items: center; | ||
} | ||
|
||
.mp-label-axis { | ||
display: flex; | ||
gap: 10px; | ||
flex-direction: column; | ||
max-height: 300px; | ||
overflow: auto; | ||
} | ||
|
||
.mp-label-axis__tooltip { | ||
width: fit-content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Behaviour.specify(".mp-label-axis__button", "mp-label-container", 0, function(btn) { | ||
btn.addEventListener("click", function(evt) { | ||
const container = btn.closest(".mp-label-axis__container"); | ||
if (container) { | ||
const labelList = container.querySelector(".mp-label-axis__list"); | ||
if (labelList) { | ||
labelList.classList.toggle("jenkins-hidden"); | ||
if (btn.dataset.hidden === "true") { | ||
btn.dataset.hidden = "false"; | ||
} else { | ||
btn.dataset.hidden = "true"; | ||
} | ||
} | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters