-
-
Notifications
You must be signed in to change notification settings - Fork 695
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
Update Main UI expressions docs #2111
Conversation
The docs mention chart pages as an exception where expressions aren't supported, but openhab/openhab-webui#1649 introduced support. This updates the docs. Signed-off-by: Florian Hotze <[email protected]>
✅ Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Thanks @florian-h05
@florian-h05 still in draft? |
Yes. @ghys Can you please have a look at this minor doc change and approve if it's correct? |
ui/building-pages.md
Outdated
@@ -144,7 +144,7 @@ See the [Component Reference](./components/) for details about the different lib | |||
|
|||
## Dynamically Configuring Components with Expressions | |||
|
|||
Virtually everywhere - with the notable exception of chart pages - every time you need a config prop to be dynamically updated, you can use an expression to configure it. | |||
Virtually everywhere - with the notable exception of config properties of user-created widgets - every time you need a config prop to be dynamically updated, you can use an expression to configure it. |
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.
As I understand it now, this isn't true:
You can insert user-created widgets from another parent component and have their properties configured with expressions:
# Personal widget
uid: widget_4064e9fb1e
tags: []
props:
parameters:
- description: A text prop
label: Prop 1
name: prop1
required: false
type: TEXT
parameterGroups: []
component: f7-card
config:
style:
display: flex
justify-content: center
slots:
default:
- component: oh-link
config:
text: =props.prop1
class:
- margin
# Inserting the personal widget and configuring prop1 with an expression
component: widget:widget_4064e9fb1e
config:
prop1: =2+3
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.
Thanks for the hint!
In the widget editor, properties are not evaluated, openhab/openhab-webui#2007 adds a note about that.
Signed-off-by: Florian Hotze <[email protected]>
@stefan-hoehn This is ready to be merged now. |
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.
LGTM, Florian, thx.
The docs mention chart pages as an exception where expressions aren't supported, but openhab/openhab-webui#1649 introduced support. This updates the docs.