Skip to content

fix(svg-editor): show spec-violation banner when SVG lacks width/height#127

Merged
hugohe3 merged 2 commits into
hugohe3:mainfrom
jysir99:fix/115-svg-dimensions
May 22, 2026
Merged

fix(svg-editor): show spec-violation banner when SVG lacks width/height#127
hugohe3 merged 2 commits into
hugohe3:mainfrom
jysir99:fix/115-svg-dimensions

Conversation

@jysir99

@jysir99 jysir99 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Closes #115. Surface spec violations with a red banner instead of silent blank preview. No backfill - upstream spec stays authoritative.

Instead of silently backfilling dimensions, display a centered red
banner telling the user to ask the AI to follow shared-standards.md §4.
The banner is per-slide: removed on navigation, re-shown only when the
incoming slide is missing width/height.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@hugohe3

hugohe3 commented May 22, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution. I think the direction here is right: live preview should not silently backfill root SVG dimensions on the frontend, because that would hide upstream SVG output that does not follow shared-standards.md §4. Surfacing the missing width/height as a spec violation is a better behavior than continuing to fail silently.

I made one small follow-up fix before merging: the original implementation only checked for a missing width attribute, so it missed the case where height was absent. The merged version now triggers the warning when either width or height is missing.

@hugohe3 hugohe3 merged commit 60712cd into hugohe3:main May 22, 2026
@jysir99 jysir99 mentioned this pull request May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

实时预览不显示

2 participants