-
Notifications
You must be signed in to change notification settings - Fork 31
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
New expression: displayValue
#1341
Conversation
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.
Great work! 👏 Maybe we should add a unit-test to make sure every (new) component implementing getDisplayValue()
has a corresponding shared test for this expression function? 🤔 That way we would ensure the backend gets a push to implement new components for this functionality as well.
Great idea! |
SonarCloud Quality Gate failed. 11 Bugs 83.5% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Description
Adds a new expression function:
["displayValue", "<componentId>"]
, which returns the formatted string representation of the component's form data which can be used to build texts. To make this work I had to convert all of the hooks used intoget
-functions with the required state as arguments. The hooks are preserved but use theget
-functions under the hood to avoid duplicate implementations (similar touseLanguage
)Shared tests:
Related Issue(s)
Verification/QA
src/layout/layout.d.ts
andlayout.schema.v1.json
, and these are all backwards-compatiblekind/*
label to this PR for proper release notes grouping