prism-anycubic: add wide/horizontal layout for wide columns - #49
Open
Itstommy10 wants to merge 2 commits into
Open
prism-anycubic: add wide/horizontal layout for wide columns#49Itstommy10 wants to merge 2 commits into
Itstommy10 wants to merge 2 commits into
Conversation
…ancements New prism-anycubic card for Anycubic Cloud printers, plus several display/UX improvements driven by real-world use. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New "Layout" config (auto/wide/vertical): wide uses a CSS-grid layout with the printer visual on the left and header, CFS, stats, progress, job-info and controls stacked on the right — less vertical space, more horizontal spread. - "auto" switches to wide at >=720px via a JS ResizeObserver (not a CSS container query) so it also works inside the card editor preview. - New "Expand Sections column width" config: HA Sections columns are capped at 500px by --ha-view-sections-column-max-width on the ancestor hui-section; the card now walks up the DOM (crossing shadow roots) and raises that cap so the wide layout can actually expand. - Kept all 3 file copies + both prism-dashboard.js bundles in sync. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
Adds an optional wide / horizontal layout to the
prism-anycubiccard so it can occupy less vertical space and spread its elements horizontally when given a wide column (e.g. 24-column / wide Sections setups).Changes
Layoutoption (auto/wide/vertical) in Display Options. The wide layout is a CSS grid: printer visual on the left, with header, CFS, stats, progress, job-info and controls stacked in the right column.autoswitches to wide at ≥720px using a JSResizeObserver(not a CSS container query) so it also works inside the card editor preview.Expand Sections column widthoption (column_max_width, px). HA Sections view caps each column at 500px via--ha-view-sections-column-max-widthon the ancestorhui-section; the card walks up the DOM (crossing shadow roots) and raises that cap for its column so the wide layout can actually expand. The override is restored on disconnect.auto, no column override) — the standard vertical card renders identically.Notes
custom-components/,dist/,www/custom-components/) plus bothprism-dashboard.jsbundles are kept in sync.node --checkand a runtime smoke test ofrender().