From 51e7142d5705c10833e0959fdf2534a32b0e7d86 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Thu, 14 Apr 2022 13:50:30 +0100 Subject: [PATCH] Remove `ui-refresh-overrides.less` and UI refresh toggle --- core/src/main/java/hudson/Functions.java | 14 --- .../main/resources/lib/layout/layout.jelly | 4 +- war/src/main/less/abstracts/theme.less | 15 --- war/src/main/less/ui-refresh-overrides.less | 93 ------------------- war/webpack.config.js | 1 - 5 files changed, 1 insertion(+), 126 deletions(-) delete mode 100644 war/src/main/less/ui-refresh-overrides.less diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 879791296a..5bc8a57f71 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -188,10 +188,6 @@ public class Functions { private static final AtomicLong iota = new AtomicLong(); private static Logger LOGGER = Logger.getLogger(Functions.class.getName()); - @Restricted(NoExternalUse.class) - @SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "for script console") - public static /* non-final */ boolean UI_REFRESH = SystemProperties.getBoolean("jenkins.ui.refresh"); - public Functions() { } @@ -520,16 +516,6 @@ public class Functions { return SystemProperties.getString(key); } - /** - * Returns true if and only if the UI refresh is enabled. - * - * @since 2.222 - */ - @Restricted(DoNotUse.class) - public static boolean isUiRefreshEnabled() { - return UI_REFRESH; - } - public static Map getEnvVars() { return new TreeMap<>(EnvVars.masterEnvVars); } diff --git a/core/src/main/resources/lib/layout/layout.jelly b/core/src/main/resources/lib/layout/layout.jelly index 2658e3155b..e8869d8877 100644 --- a/core/src/main/resources/lib/layout/layout.jelly +++ b/core/src/main/resources/lib/layout/layout.jelly @@ -98,7 +98,7 @@ THE SOFTWARE. - + - - diff --git a/war/src/main/less/abstracts/theme.less b/war/src/main/less/abstracts/theme.less index 87036fdeeb..bd1ed8b54d 100644 --- a/war/src/main/less/abstracts/theme.less +++ b/war/src/main/less/abstracts/theme.less @@ -66,13 +66,6 @@ --header-link-bg-classic-hover: #404040; --header-link-bg-classic-active: #404040; - // Header new UI colors - --header-bg-v2: var(--primary-hover); - --brand-link-color-hover-v2: var(--primary-hover); - --brand-link-color-active-v2: var(--primary-active); - --header-link-bg-hover-v2: var(--primary-hover); - --header-link-bg-active-v2: var(--primary-active); - // Header dimensions --header-item-border-radius: 4px; @@ -82,14 +75,6 @@ --breadcrumbs-text-color: #4d545d; --breadcrumbs-item-bg-color--hover: var(--light-grey); - // Non-security Monitor / bell-alert new colors - --monitor-bg-v2: #fff3cd; - --monitor-color-v2: #856404; - - // Security Monitor / shield new colors - --sec-monitor-bg-v2: #f8d7da; - --sec-monitor-color-v2: #721c24; - // Alert banners // Default --alert-default-icon-color: #2196f3; diff --git a/war/src/main/less/ui-refresh-overrides.less b/war/src/main/less/ui-refresh-overrides.less deleted file mode 100644 index 9000f256b4..0000000000 --- a/war/src/main/less/ui-refresh-overrides.less +++ /dev/null @@ -1,93 +0,0 @@ -@import "./abstracts/theme.less"; - -.ui-refresh { - .page-header { - background-color: var(--header-bg-v2); - } - - #header .logo { - display: none; - } - - // Need to use the element selector to increase weight otherwise it will be overriden by the - // a:visited selector if it is declared later - a.page-header__brand-link { - display: inline-flex; - align-items: center; - height: 100%; - padding: 16px 24px; - font-size: var(--font-size-base); - font-weight: bold; - background-color: var(--logo-bg); - // TODO: comment on browser support for clip-path - clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%); - - &:link, - &:visited { - color: var(--brand-link-color); - text-decoration: none; - } - - &:hover, - &:focus { - text-decoration: underline; - color: var(--brand-link-color-hover-v2); - text-decoration-color: var(--brand-link-color-hover-v2); - } - - &:link:focus { - outline: none; - color: var(--brand-link-color-active-v2); - text-decoration-color: var(--brand-link-color-active-v2); - - .page-header__brand-name { - outline: auto; - } - } - } - - .page-header__hyperlinks a { - &:hover, - &:focus, - &.mouseIsOverMenuSelector { - background-color: var(--header-link-bg-hover-v2); - } - - &:active { - background-color: var(--header-link-bg-active-v2); - } - } - - .main-search__input:hover ~ .main-search__icon-leading { - color: var(--header-link-bg-hover-v2); - } - - .main-search__input:focus ~ .main-search__icon-leading { - color: var(--header-link-bg-active-v2); - } - - .main-search__icon-trailing { - &:hover, - &:focus { - color: var(--header-link-bg-hover-v2); - } - - &:active { - fill: var(--header-link-bg-active-v2); - } - } - - .am-container.visible .am-button { - background-color: var(--header-link-bg-active-v2); - } - - .am-button .am-monitor__count { - color: var(--monitor-color-v2); - background-color: var(--monitor-bg-v2); - } - - .am-button.security-am .am-monitor__count { - color: var(--sec-monitor-color-v2); - background-color: var(--sec-monitor-bg-v2); - } -} diff --git a/war/webpack.config.js b/war/webpack.config.js index 3240680541..c99bc737bf 100644 --- a/war/webpack.config.js +++ b/war/webpack.config.js @@ -35,7 +35,6 @@ module.exports = (env, argv) => ({ // New UI CSS files "base-styles-v2": [path.join(__dirname, "src/main/less/base-styles-v2.less")], - "ui-refresh-overrides": [path.join(__dirname, "src/main/less/ui-refresh-overrides.less")], }, output: { path: path.join(__dirname, "src/main/webapp/jsbundles"),