You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/08/29 20:39:31 UTC
(juneau) branch master updated: Recolor detail-view action button defaults from blue to Juneau neutrals.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 88d6e903c5 Recolor detail-view action button defaults from blue to Juneau neutrals.
88d6e903c5 is described below
commit 88d6e903c5c79a5cbd37c58393957d23f30837dc
Author: James Bognar <ja...@apache.org>
AuthorDate: Sat Aug 29 16:39:26 2026 -0400
Recolor detail-view action button defaults from blue to Juneau neutrals.
Substitutes five blue CSS custom properties in juneau-views.css with Juneau
neutral tones (contrast ~8.20:1 on white / ~7.32:1 on hover background, both
comfortably clear WCAG AA), and adds a new ViewsMixin_Serving_Test.o09 guard
covering the change.
---
.../org/apache/juneau/views/juneau-views.css | 10 +++++-----
.../rest/server/views/ViewsMixin_Serving_Test.java | 21 +++++++++++++++++++++
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/juneau-rest/juneau-rest-server-views/src/main/resources/org/apache/juneau/views/juneau-views.css b/juneau-rest/juneau-rest-server-views/src/main/resources/org/apache/juneau/views/juneau-views.css
index 9bdd7e2d68..b855149ec4 100644
--- a/juneau-rest/juneau-rest-server-views/src/main/resources/org/apache/juneau/views/juneau-views.css
+++ b/juneau-rest/juneau-rest-server-views/src/main/resources/org/apache/juneau/views/juneau-views.css
@@ -161,13 +161,13 @@
*/
--jc-detail-action-bg: #ffffff;
--jc-detail-action-border: #cccccc;
- --jc-detail-action-color: #1a5297;
+ --jc-detail-action-color: #4f4f4f;
--jc-detail-action-hover-bg: #f2f2f2;
- --jc-detail-action-primary-bg: #1a5297;
- --jc-detail-action-primary-bg-hover: #005fb2;
- --jc-detail-action-primary-border: #144279;
+ --jc-detail-action-primary-bg: #4f4f4f;
+ --jc-detail-action-primary-bg-hover: #333333;
+ --jc-detail-action-primary-border: #333333;
--jc-detail-action-primary-color: #ffffff;
- --jc-detail-action-primary-bg-disabled: #93a8c2;
+ --jc-detail-action-primary-bg-disabled: #8a8a8a;
}
/*
diff --git a/juneau-rest/juneau-rest-server-views/src/test/java/org/apache/juneau/rest/server/views/ViewsMixin_Serving_Test.java b/juneau-rest/juneau-rest-server-views/src/test/java/org/apache/juneau/rest/server/views/ViewsMixin_Serving_Test.java
index 782ae0248e..cfcbe50a2d 100644
--- a/juneau-rest/juneau-rest-server-views/src/test/java/org/apache/juneau/rest/server/views/ViewsMixin_Serving_Test.java
+++ b/juneau-rest/juneau-rest-server-views/src/test/java/org/apache/juneau/rest/server/views/ViewsMixin_Serving_Test.java
@@ -892,6 +892,27 @@ class ViewsMixin_Serving_Test extends TestBase {
assertTrue(body.contains("border: 1px solid"), body);
}
+ /**
+ * The nine {@code --jc-detail-action-*} defaults must fall back to neutral, not to a brand accent: a themeless
+ * render, or a theme that supplies only a partial palette, still gets a legible button rather than a colour
+ * that reads as "the theme didn't apply". Both the delivered neutrals and the absence of every prior accent
+ * hex are asserted, so re-adding one of those values under a tenth name would still fail this test.
+ */
+ @Test void o09_viewsCss_hasNeutralDetailActionDefaults() throws Exception {
+ var body = cWithMixin.get(ViewsMixin.VIEWS_CSS_PATH).run().assertStatus(200).getContent().asString();
+ var start = body.indexOf("--jc-detail-action-bg:");
+ assertTrue(start >= 0, body);
+ var end = body.indexOf("}", start);
+ var block = body.substring(start, end);
+ assertTrue(block.contains("--jc-detail-action-color: #4f4f4f;"), block);
+ assertTrue(block.contains("--jc-detail-action-primary-bg: #4f4f4f;"), block);
+ assertTrue(block.contains("--jc-detail-action-primary-bg-hover: #333333;"), block);
+ assertTrue(block.contains("--jc-detail-action-primary-border: #333333;"), block);
+ assertTrue(block.contains("--jc-detail-action-primary-bg-disabled: #8a8a8a;"), block);
+ for (var accent : new String[]{"#1a5297", "#005fb2", "#144279", "#93a8c2"})
+ assertFalse(block.contains(accent), () -> "accent colour leaked back into the detail-action defaults: " + accent + " in " + block);
+ }
+
//------------------------------------------------------------------------------------------------------------------
// i) data-juneau-saved-views stamp via a real RestRequest URI resolver
//------------------------------------------------------------------------------------------------------------------