Repository navigation
fix(ha-panels): the builder's preview no longer crowds out the tile editors - #345
Merged
Merged
Conversation
…ditors The builder put its preview beside the tile editors from the screen's width (lg), but inside the Admin Panel the builder is only about 745px wide. A Large preview (720px) beside the editors left them a sliver, too narrow to type in, and Medium squeezed them too. The builder now lays out by its own width, measured with a ResizeObserver: the preview goes beside the editors only when they keep at least 420px (previewLayout), else above them. It is drawn at the widget size it stands for, and scaled as a whole only when the builder is narrower than that (a phone), so tiles wrap as on the dashboard. A tile editor's fields, and its "Show only when" row, wrap by the editors' width through a container query, not the screen's breakpoints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the Home Assistant panel builder, choosing a Medium or Large preview made the tile editors too narrow to use.
Cause. The builder decided whether to put the preview beside the tile editors from the screen's width (MUI
lg). Inside the Admin Panel, though, the builder itself is only about 745px wide. A Large preview (720px) placed beside the editors left them a sliver, too narrow to type in. Medium squeezed them as well.Fix. The builder now lays out by its own width, measured with a
ResizeObserver:previewLayoutinhaPanelBuilder.js, puts the preview beside the editors only when they still get at least 420px. Otherwise the preview goes above them. In the panel, Small sits beside the editors and Medium and Large sit above.Testing.
previewLayout. The client suite passes (819/819) and the build is clean.🤖 Generated with Claude Code