-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add screen condition to conditional card. #18041
Conversation
c0ba15d
to
5be9152
Compare
We should make the UI editor backwards compatible, if there is an |
8b08666
to
3a03abb
Compare
I added screen sizes to the UI editor, I improved the editor and improved performance for the case with only one condition. |
d57cf2a
to
22d1184
Compare
54c43fc
to
d473a30
Compare
@@ -352,22 +325,13 @@ export class HuiConditionalCardEditor | |||
.condition { | |||
margin-top: 8px; | |||
border: 1px solid var(--divider-color); |
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.
(unrelated, but we should add a border-radius)
We do need docs for this :-) |
Proposed change
New condition type : screen.
This will be used in the energy dashboard to hide the date card on desktop so we don't have to have dynamic config based on the screen size in energy strategy.
The screen condition has only one parameter
media_query
. The user can define any media query using yaml.In the UI, 4 screen sizes are displayed (mobile, tablet, desktop, wide). The editor will build the media query according to the user selection.
New editor
ha-form
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: