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 2024/10/27 03:45:15 UTC
(causeway) 01/01: CAUSEWAY-3824: polishing java-doc and semantics
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch 3824-action.ellipsis
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit b6b4e679d8b58d210658c0a2269d2eb4ca11ffe7
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Oct 27 04:45:05 2024 +0100
CAUSEWAY-3824: polishing java-doc and semantics
---
.../causeway/core/config/CausewayConfiguration.java | 2 +-
.../commons/model/decorators/ActionDecorators.java | 16 +++++++++-------
.../causeway/viewer/wicket/ui/util/WktDecorators.java | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
index 4f7dcb31a7..cee3fa9eb0 100644
--- a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
+++ b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
@@ -2931,7 +2931,7 @@ public class CausewayConfiguration {
/**
* Whether actions, that on click will show a dialog,
- * should be indicated by a trailing ellipsis on the actions's label.
+ * should be indicated by a trailing ellipsis on the action's label.
* <p>
* Applies to both, action buttons and action menu items.
*/
diff --git a/viewers/commons/model/src/main/java/org/apache/causeway/viewer/commons/model/decorators/ActionDecorators.java b/viewers/commons/model/src/main/java/org/apache/causeway/viewer/commons/model/decorators/ActionDecorators.java
index cfb65af07e..c4f5891707 100644
--- a/viewers/commons/model/src/main/java/org/apache/causeway/viewer/commons/model/decorators/ActionDecorators.java
+++ b/viewers/commons/model/src/main/java/org/apache/causeway/viewer/commons/model/decorators/ActionDecorators.java
@@ -48,17 +48,19 @@ public class ActionDecorators {
public enum ButtonModifier {
NONE,
/**
- * To respect UI visual hierarchy, we render action buttons outlined,
- * if they appear next to their association, (this is, not in the field-set header).
+ * With respect to UI visual hierarchy, actions that appear in the field-set header
+ * are ranked higher than those that appear inside a field-set.
+ * <p>
+ * Consequently, viewers may reflect lower visual rank e.g. by rendering the latter action buttons as outlined.
*/
- OUTLINED,
+ LOWER_VISUAL_RANK,
}
public enum MenuItemModifier {
NONE,
/**
* For menu items that are rendered in vertical sequence, some may have icons some may not.
- * For improved visual appearance, the latter can be force aligned with the others by means
+ * For improved visual appearance, the latter can be forced to align with the others by means
* of a blank icon, that just occupies the same amount of width as regular icons.
*/
FORCE_ALIGNMENT_WITH_BLANK_ICON;
@@ -88,7 +90,7 @@ public class ActionDecorators {
.action(action)
.buttonModifier(managedActionHolder.isPositionedInsideFieldSet()
|| action.isPrototype()
- ? ButtonModifier.OUTLINED
+ ? ButtonModifier.LOWER_VISUAL_RANK
: ButtonModifier.NONE)
.menuItemModifier(MenuItemModifier.FORCE_ALIGNMENT_WITH_BLANK_ICON) // default
.prototyping(action.isPrototype()
@@ -115,8 +117,8 @@ public class ActionDecorators {
/**
* @see ButtonModifier
*/
- public boolean isRenderOutlined() {
- return buttonModifier==ButtonModifier.OUTLINED;
+ public boolean isLowerVisualRank() {
+ return buttonModifier==ButtonModifier.LOWER_VISUAL_RANK;
}
/**
diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktDecorators.java b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktDecorators.java
index 10705053d6..b94c973eb9 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktDecorators.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktDecorators.java
@@ -216,7 +216,7 @@ public class WktDecorators {
// don't care if expressed twice
WktDecorators.danger().decorate(actionLink);
} else {
- Wkt.cssAppend(actionLink, decorationModel.isRenderOutlined()
+ Wkt.cssAppend(actionLink, decorationModel.isLowerVisualRank()
? ButtonSemantics.SECONDARY.buttonOutlineCss()
: ButtonSemantics.SECONDARY.buttonDefaultCss());
}