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/09/07 20:48:47 UTC

(juneau) branch master updated: Datatable IRS parity: body cell line-height 1.5 (Bootstrap body row height) and linked key-column font-weight 600 (one step under IRS .table-key bold).

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 f950cae858 Datatable IRS parity: body cell line-height 1.5 (Bootstrap body row height) and linked key-column font-weight 600 (one step under IRS .table-key bold).
f950cae858 is described below

commit f950cae8581ee04531ea184c4d2a74a9274b351b
Author: James Bognar <ja...@apache.org>
AuthorDate: Mon Sep 7 16:48:40 2026 -0400

    Datatable IRS parity: body cell line-height 1.5 (Bootstrap body row height) and linked key-column font-weight 600 (one step under IRS .table-key bold).
---
 .../org/apache/juneau/views/juneau-views.css       | 25 +++++++++++++++++++++-
 .../rest/server/views/ViewsMixin_Serving_Test.java | 21 ++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletion(-)

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 c3a10c97ad..fc7fbc120d 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
@@ -498,11 +498,34 @@ table[data-juneau-view] > tbody > tr > td,
 table.dataTable > tbody > tr > th,
 table.dataTable > tbody > tr > td {
 	font-size: 0.8333rem;         /* IRS body-type parity (WORK-J0518 DF-4); not tokenized, see comment above */
-	padding: 4px 5px;
+	padding: 4px 5px;             /* IRS pages/style.css: table.dataTable thead th, tbody td */
+	/*
+	 * Body row HEIGHT (IRS visual-parity follow-up): IRS does not set an explicit min-height on tbody td.
+	 * Its taller body rows come from Bootstrap reboot's body line-height:1.5 (documented in IRS
+	 * style_tags.css as "10pt from .main-section-inner, line-height:1.5 => a 20px line box") plus the same
+	 * 4px vertical padding this rule already shares.  Hosts without Bootstrap inherit a tighter UA
+	 * `normal` (~1.2), so pin 1.5 here — a generic ratio, not an SLDS token — so every views table matches
+	 * IRS's ~28px text-only row (4+4 padding + 20 content) without depending on a host Bootstrap load.
+	 */
+	line-height: 1.5;
 	vertical-align: middle;
 	border: none;
 }
 
+/*
+ * Linked key column (IRS visual-parity follow-up): IRS stamps `className: 'table-key'` on ID columns with
+ * `.table-key { font-weight: bold }` (pages/style.css) — typically 700.  This toolkit has no author-facing
+ * key-class stamp required of every consumer, but the common pattern is a linked first data column
+ * immediately after the dedicated expander cell (and optional selection cell).  Use 600 (semibold) — one
+ * step lighter than IRS bold — and leave link color alone so blue PD/GUS hyperlinks stay blue.
+ */
+table[data-juneau-view] > tbody > tr > td.juneau-view-detail-control + td > a,
+table[data-juneau-view] > tbody > tr > td.juneau-view-detail-control + td.juneau-view-select-cell + td > a,
+table.dataTable > tbody > tr > td.juneau-view-detail-control + td > a,
+table.dataTable > tbody > tr > td.juneau-view-detail-control + td.juneau-view-select-cell + td > a {
+	font-weight: 600;
+}
+
 /*
  * The header/body boundary - the ONE row-to-row line IRS's borderless table keeps (see the tbody rule's
  * comment above), painted on the first body row's own top edge rather than the header row's bottom edge
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 e215674bb6..bbeeaef482 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
@@ -1015,6 +1015,27 @@ class ViewsMixin_Serving_Test extends TestBase {
 		assertTrue(tbodyAt >= 0, body);
 		var tbodyRule = body.substring(tbodyAt, body.indexOf("}", tbodyAt));
 		assertTrue(tbodyRule.contains("border: none"), tbodyRule);
+		// IRS body row height: Bootstrap reboot line-height:1.5 (style_tags.css documents the 20px line box).
+		assertTrue(tbodyRule.contains("line-height: 1.5"),
+			() -> "tbody cells must pin IRS Bootstrap body line-height 1.5 (no IRS min-height on td): " + tbodyRule);
+	}
+
+	/**
+	 * Linked first-data-column key weight (IRS visual-parity): IRS {@code .table-key} is {@code font-weight: bold}
+	 * (~700). This toolkit uses 600 on the linked cell immediately after the expander (and optional selection)
+	 * column — one step lighter — without forcing black ink over hyperlink color.
+	 */
+	@Test void o04c2_viewsCss_linkedKeyColumnAfterExpanderIsSemibold() throws Exception {
+		var body = cWithMixin.get(ViewsMixin.VIEWS_CSS_PATH).run().assertStatus(200).getContent().asString();
+		var sel = "table[data-juneau-view] > tbody > tr > td.juneau-view-detail-control + td > a,\n"
+			+ "table[data-juneau-view] > tbody > tr > td.juneau-view-detail-control + td.juneau-view-select-cell + td > a,\n"
+			+ "table.dataTable > tbody > tr > td.juneau-view-detail-control + td > a,\n"
+			+ "table.dataTable > tbody > tr > td.juneau-view-detail-control + td.juneau-view-select-cell + td > a {";
+		var at = body.indexOf(sel);
+		assertTrue(at >= 0, body);
+		var rule = body.substring(at, body.indexOf("}", at));
+		assertTrue(rule.contains("font-weight: 600"),
+			() -> "linked key column must be semibold (600), one step under IRS .table-key bold/700: " + rule);
 	}
 
 	/**