-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Collapsible blueprint input sections #19946
Collapsible blueprint input sections #19946
Conversation
emontnemery suggested that sections which have required inputs should not be collapsible, so in order to keep the same visual styling and same slots for all sections I modified the expansion-panel to support a mode where it is not interactive, thinking that is simpler than trying to recreate the styling using a diffrent class. Or maybe we could have all sections be collapsible, but just automatically expand them on submit failure if they had a missing input, that's another possibility. |
I like this option better. Less confusing to user as the problem pops right up for them to see. |
… collapsible-blueprint-sections
return html` <ha-expansion-panel | ||
outlined | ||
.expanded=${expanded} | ||
.noCollapse=${anyRequired} |
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.
Should we use an expansion panel if it can not be collapsed anyway? Shouldn't we just use a ha-card
in that case?
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.
Initially when I wrote this they were all collapsible, so the removal of collapsing was a last minute add on.
I think I was concerned that the CSS styling might not look the same if some sections were expPanels and some were ha-cards. Just looking at it it seems like the font-size for the headers might be different, and possibly other paddings and margins as well. It could maybe be fixed but I'm not convinced the styling wouldn't further diverge in the future.
Keeping the same class I think guarantees that collapsible/noncollapsible sections always have a similar look and feel.
Proposed change
Frontend for home-assistant/core#110513
Add an optional section to blueprint definition called
input_sections
, and allow inputs to optionally attach themselves to a particular section. This information can then be used by the UI to visually group certain sets of inputs.Authors of large blueprints sometimes claim that the current big flat list of all inputs becomes difficult to organize and can overwhelm users visually with number of options, and would like a way to organize them better. With collapsable sections, various related inputs can be visually grouped and collapsed to improve organization.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: