-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JNG-6169 transform helper texts #294
Conversation
...src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiOperationsTest.java
Show resolved
Hide resolved
...ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiWidgetsTest.java
Show resolved
Hide resolved
WalkthroughA new method Changes
Sequence Diagram(s)sequenceDiagram
participant S as Source Declaration
participant T as Transformation Rule
participant U as UI Element
S->>T: Provide source action/widget definition
T->>S: Call getHelpModifier()
alt Help modifier exists
T->>U: Set tooltipText with help modifier value
else No help modifier
T->>U: Proceed without tooltipText
end
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/viewWidgetDeclaration.etl (1)
12-14
: LGTM! Tooltip functionality added to base widget rule.The tooltip text assignment is correctly implemented in the base rule, ensuring consistent behavior across all derived widget types.
This change in the base rule effectively propagates tooltip functionality to all visual elements, promoting code reuse and maintaining consistency across the UI.
judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/viewActionDeclaration.etl (1)
16-18
: LGTM! Tooltip functionality consistently implemented across button rules.The tooltip text assignment is correctly implemented in all button rules.
Consider extracting the tooltip assignment logic into a helper operation to reduce code duplication across button rules. Example:
+@cached +operation JSL!UIActionDeclaration assignTooltipText(t: UI!ui::Button) { + if (self.getHelpModifier().isDefined()) { + t.tooltipText = self.getHelpModifier().value.value; + } +}Then use it in each button rule:
-if (s.getHelpModifier().isDefined()) { - t.tooltipText = s.getHelpModifier().value.value; -} +s.assignTooltipText(t);Also applies to: 176-178, 247-249
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/namespace/modifiable.eol
(1 hunks)judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/rowActionDeclaration.etl
(1 hunks)judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/viewActionDeclaration.etl
(3 hunks)judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/viewWidgetDeclaration.etl
(1 hunks)judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiOperationsTest.java
(2 hunks)judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiWidgetsTest.java
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: ⏳ Build, test and deploy artifacts
🔇 Additional comments (6)
judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/namespace/modifiable.eol (1)
30-33
: LGTM! Clean implementation of help modifier getter.The implementation follows the established pattern of other modifier getters and correctly uses caching for performance optimization.
judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/view/rowActionDeclaration.etl (1)
20-22
: LGTM! Consistent implementation of tooltip text assignment.The tooltip text assignment is correctly placed and follows the same pattern used in other button rules.
judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiOperationsTest.java (2)
101-101
: LGTM! Help text added to the action.The addition of the help text
"Us all"
tomyAction3
action aligns with the PR objective of transforming helper texts.
231-237
: LGTM! Test assertions verify tooltip text transformation.The test assertions properly verify that the help text is correctly transformed into tooltip text for the button.
judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiWidgetsTest.java (2)
432-432
: LGTM! Help text added to the widget.The addition of the help text
"ME"
toemailWritable
widget aligns with the PR objective of transforming helper texts.
662-662
: LGTM! Test assertion verifies tooltip text transformation.The test assertion properly verifies that the help text is correctly transformed into tooltip text for the widget.
No description provided.