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

Remove YUI #10135

Merged
merged 8 commits into from
Jan 12, 2025
Merged
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
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ node/

# libraries / external deps / generated files
src/main/js/plugin-setup-wizard/bootstrap-detached.js
war/src/main/webapp/scripts/yui
war/src/main/webapp/jsbundles/
src/main/scss/_bootstrap.scss

15 changes: 6 additions & 9 deletions core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
@@ -662,17 +662,14 @@ public static String validateIconSize(String iconSize) throws SecurityException
}

/**
* Gets the suffix to use for YUI JavaScript.
*/
public static String getYuiSuffix() {
return DEBUG_YUI ? "debug" : "min";
}

/**
* Set to true if you need to use the debug version of YUI.
* No longer used, to be removed after enough plugins have adopted a version of the test harness with
* <a href="https://github.com/jenkinsci/jenkins-test-harness/pull/874">jenkins-test-harness/pull/874</a> in it.
*
* @deprecated removed without replacement
*/
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "for script console")
public static boolean DEBUG_YUI = SystemProperties.getBoolean("debug.YUI");
@Deprecated(forRemoval = true, since = "TODO")
public static boolean DEBUG_YUI;

/**
* Creates a sub map by using the given range (both ends inclusive).

This file was deleted.

2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/repeatable/repeatable.js
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ var repeatableSupport = {
};

// do the ones that extract innerHTML so that they can get their original HTML before
// other behavior rules change them (like YUI buttons.)
// other behavior rules change them.
Behaviour.specify("DIV.repeated-container", "repeatable", -100, function (e) {
if (isInsideRemovable(e)) {
return;
30 changes: 1 addition & 29 deletions core/src/main/resources/lib/layout/layout.jelly
Original file line number Diff line number Diff line change
@@ -128,37 +128,9 @@ THE SOFTWARE.

<st:adjunct includes="org.kohsuke.stapler.bind"/>

<l:userExperimentalFlag var="removeYUI" flagClassName="jenkins.model.experimentalflags.RemoveYuiUserExperimentalFlag" />
<j:if test="${!removeYUI}">
<!-- To use the debug version of YUI, set the system property 'debug.YUI' to true -->
<j:set var="yuiSuffix" value="${h.yuiSuffix}" />
<l:yui module="yahoo" />
<l:yui module="dom" />
<l:yui module="event" />
<j:if test="${h.yuiSuffix=='debug'}">
<l:yui module="logger" />
</j:if>
<l:yui module="animation" />
<l:yui module="dragdrop" />
<l:yui module="container" />
<l:yui module="connection" />
<l:yui module="datasource" />
<l:yui module="autocomplete" />
<l:yui module="menu" />
<l:yui module="element" />
<l:yui module="button" />
<l:yui module="storage" />
</j:if>

<script src="${resURL}/scripts/hudson-behavior.js" type="text/javascript"></script>
<script src="${resURL}/scripts/sortable.js" type="text/javascript"/>

<j:if test="${!removeYUI}">
<link rel="stylesheet" href="${resURL}/scripts/yui/container/assets/container.css" type="text/css"/>
<link rel="stylesheet" href="${resURL}/scripts/yui/container/assets/skins/sam/container.css" type="text/css"/>
<link rel="stylesheet" href="${resURL}/scripts/yui/menu/assets/skins/sam/menu.css" type="text/css" />
</j:if>

<l:hasPermission permission="${app.READ}">
<link rel="search" type="application/opensearchdescription+xml" href="${rootURL}/opensearch.xml" title="Jenkins" />
</l:hasPermission>
@@ -178,7 +150,7 @@ THE SOFTWARE.
<script src="${resURL}/jsbundles/sortable-drag-drop.js" type="text/javascript"/>
<script src="${resURL}/jsbundles/app.js" type="text/javascript" defer="true" />
</head>
<body id="jenkins" class="${removeYUI ? '' : 'yui-skin-sam'} ${layoutType} jenkins-${h.version}" data-version="${h.version}" data-model-type="${it.class.name}">
<body id="jenkins" class="${layoutType} jenkins-${h.version}" data-version="${h.version}" data-model-type="${it.class.name}">
<l:command-palette />

<j:if test="${layoutType!='full-screen'}">
7 changes: 1 addition & 6 deletions core/src/main/resources/lib/layout/side-panel.jelly
Original file line number Diff line number Diff line change
@@ -35,12 +35,7 @@ THE SOFTWARE.

<j:if test="${mode=='side-panel'}">
<div id="side-panel" class="app-page-body__sidebar ${attrs.sticky == 'true' ? 'app-page-body__sidebar--sticky' : ''}">
<d:invokeBody />
<!-- add YUI logger if debugging YUI -->
<j:if test="${h.yuiSuffix=='debug'}">
<!-- script to transform this into the Logger Console is done in hudson-behavior.js -->
<div id="yui-logreader" style="margin-top:1em"/>
</j:if>
<d:invokeBody />
</div>
</j:if>

13 changes: 3 additions & 10 deletions core/src/main/resources/lib/layout/yui.jelly
Original file line number Diff line number Diff line change
@@ -25,16 +25,9 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
<st:documentation>
Load Yahoo UI module.
<st:attribute name="module" use="required">
YUI module name to load.
Do not use this tag, YUI has been removed from Jenkins
<st:attribute name="module" deprecated="true">
Do not use this tag, YUI has been removed from Jenkins
</st:attribute>
</st:documentation>
<!--
We used to take @suffix as '-beta' to loa beta modules, but as of YUI 2.9 there's no beta module.
I don't think YUI2 will get new beta modules in the future, but if we do, we need to compute them
from the module name, since older plugins specify suffix="-beta" for modules that have graduated
beta since then.
-->
<script src="${resURL}/scripts/yui/${module}/${module}-${yuiSuffix}.js" />
</j:jelly>
1 change: 0 additions & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ module.exports = [
".pnp.cjs",
".pnp.loader.mjs",
"src/main/js/plugin-setup-wizard/bootstrap-detached.js",
"war/src/main/webapp/scripts/yui/*",
],
},
{
1 change: 0 additions & 1 deletion src/main/scss/base/_index.scss
Original file line number Diff line number Diff line change
@@ -6,4 +6,3 @@
@use "style";
@use "typography";
@use "visibility-utils";
@use "yui-compatibility";
17 changes: 0 additions & 17 deletions src/main/scss/base/_style.scss
Original file line number Diff line number Diff line change
@@ -670,23 +670,6 @@ table.progress-bar.red td.progress-bar-done {
}
}

/* ========================= YUI dialog ========================= */

/* discovered this margin fix by a trial and error. This can very well be a totally wrong fix, or perhaps updating
to the latest YUI will fix this? */
.dialog .hd {
margin: 0 !important;
font-size: var(--font-size-xs) !important;
}

.dialog .bd {
margin: 0 !important;
}

.dialog .ft {
margin: 0 !important;
}

/* ========================= tags/labels ================== */
// Used in core/src/main/java/hudson/util/TagCloud.java#getClassName

Loading