You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2023/11/20 15:12:12 UTC

(causeway) branch master updated: CAUSEWAY-3646: remove CSS hacks for title font size

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git


The following commit(s) were added to refs/heads/master by this push:
     new f56f38de49 CAUSEWAY-3646: remove CSS hacks for title font size
f56f38de49 is described below

commit f56f38de49bffb6a6085e25236082eda534f2e56
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Nov 20 16:12:06 2023 +0100

    CAUSEWAY-3646: remove CSS hacks for title font size
    
    - so we don't need specific CSS to give the fa icon the same size as the
    title
---
 .../org/apache/causeway/applib/fa/FontAwesomeLayers.java  | 15 ++++++++-------
 .../ui/components/entity/header/EntityHeaderPanel.html    |  4 ++--
 .../viewer/wicket/ui/components/layout/bs/col/Col.html    |  4 ++--
 .../common/bootstrap/css/bootstrap-overrides-all-v2.css   |  8 --------
 4 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/causeway/applib/fa/FontAwesomeLayers.java b/api/applib/src/main/java/org/apache/causeway/applib/fa/FontAwesomeLayers.java
index 3c97b26c6b..2c3bf57c56 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/fa/FontAwesomeLayers.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/fa/FontAwesomeLayers.java
@@ -57,9 +57,9 @@ public class FontAwesomeLayers implements Serializable {
         return singleIcon("fa-blank");
     }
 
-    public static FontAwesomeLayers fallback() {
-        return singleIcon("fa-cube");
-    }
+//    public static FontAwesomeLayers fallback() {
+//        return singleIcon("fa-cube");
+//    }
 
     public static FontAwesomeLayers singleIcon(final String faClasses) {
         return new FontAwesomeLayers(null, null, List.of(new IconEntry(normalizeCssClasses(faClasses, "fa"), null)), null);
@@ -91,7 +91,8 @@ public class FontAwesomeLayers implements Serializable {
     // --
 
     @lombok.Value @Accessors(fluent=true) // record candidate
-    public static class IconEntry {
+    public static class IconEntry implements Serializable {
+        private static final long serialVersionUID = 1L;
         @Nullable String cssClasses;
         @Nullable String cssStyle;
         public String toHtml() {
@@ -109,7 +110,8 @@ public class FontAwesomeLayers implements Serializable {
     }
 
     @lombok.Value @Accessors(fluent=true) // record candidate
-    public static class SpanEntry {
+    public static class SpanEntry implements Serializable {
+        private static final long serialVersionUID = 1L;
         @Nullable String cssClasses;
         @Nullable String cssStyle;
         @Nullable String transform;
@@ -129,8 +131,7 @@ public class FontAwesomeLayers implements Serializable {
     public String toHtml() {
         var iconEntries = Can.ofCollection(iconEntries());
         if(iconEntries.isEmpty()) {
-            // fallback to cube icon
-            return fallback().toHtml();
+            return "";
         }
         if(iconEntries.isCardinalityOne()) {
             // use simple rendering (not a stack nor layered)
diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/header/EntityHeaderPanel.html b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/header/EntityHeaderPanel.html
index d392f3f221..431caaad87 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/header/EntityHeaderPanel.html
+++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/header/EntityHeaderPanel.html
@@ -21,12 +21,12 @@
     <body>
         <wicket:panel>
             <div class="entityHeaderPanel">
-                <h4 class="iconAndTitle">
+                <h2 class="iconAndTitle">
                     <div wicket:id="entityIconTitleAndCopylink" 
                     	class="iconAndTitleLabel entityIconTitleAndCopylink">[icon and title]</div>
                     <div wicket:id="entityActions"
                     	class="entityActions"></div>
-                </h4>
+                </h2>
             </div>
         </wicket:panel>
     </body>
diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/layout/bs/col/Col.html b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/layout/bs/col/Col.html
index 01d6f26221..75b504ffe0 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/layout/bs/col/Col.html
+++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/layout/bs/col/Col.html
@@ -22,11 +22,11 @@
         <wicket:panel>
             <div wicket:id="col">
                 <div class="entityHeaderPanel" wicket:id="entityHeaderPanel">
-                    <h4 class="iconAndTitle">
+                    <h2 class="iconAndTitle">
                         <div wicket:id="entityIconTitleAndCopylink" 
                         	class="iconAndTitleLabel entityIconTitleAndCopylink">[icon and title]</div>
                         <div class="entityActions" wicket:id="entityActions"></div>
-                    </h4>
+                    </h2>
                 </div>
                 <div class="actions" wicket:id="actions">
                     [actions]
diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css
index 5115e9df19..de510c9bbc 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css
+++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css
@@ -482,13 +482,11 @@ div.entityHeaderPanel .entityActions .cssMenuPanel .cssMenuItems:first-child {
 }
 
 .entityHeaderPanel .entityTitle {
-    font-size: 1.52em;
     font-weight:normal;
     text-decoration:none;
     padding-right: 30px;
 }
 
-
 /* from BreadcrumbPanel.css */
 
 .breadcrumbPanel {
@@ -572,12 +570,6 @@ span.containedButtonPanel {
 	margin-right: 2px;
 }
 
-/* fa icon size for page titles */
-.entityHeaderPanel .entityIconAndTitlePanel .fa,
-.entityHeaderPanel .entityIconAndTitlePanel .fa-stack {
-    font-size: calc(1.275rem + .3vw);
-}
-
 /** top alignment for additional buttons on scalar value inputs */
 .scalarValueInput .additionalButtons .btn-group {
   vertical-align: top;