Portrait layout support for AnimeScene/ComparisonCard/KPIGrid + HeroTitle word-wrap#340
Open
sethshoultes wants to merge 1 commit into
Open
Conversation
- AnimeScene: new fit="contain-blurred" mode for portrait source images on a landscape canvas (e.g. host avatars) — a blurred cover-fit backdrop plus the full undistorted image letterboxed on top, instead of "cover" scaling a portrait image ~2.5x and pushing faces off-frame. Each image layer now gets its own nested AbsoluteFill (previously two Img siblings competed for flex space and both could collapse). - HeroTitle: wraps at word boundaries instead of mid-word, scales font size down for long titles, and exposes textColor/accentColor/ subtitleColor/veil as props instead of hardcoded values. - ComparisonCard: portrait-mode layout (stacks top/bottom with a horizontal divider instead of left/right with a vertical one), caps value font size for narrow canvases, exposes cardBackgroundColor/ leftColor/rightColor for dark-theme use. - KPIGrid: derives grid dimensions from actual video width/height instead of a hardcoded 1920x1080, single-column layout for portrait. - Explainer/Root/SCENE_TYPES.md: prop plumbing and docs for the above.
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
Four component fixes, developed while producing portrait (1080x1920) short-form video content:
fit="cover" | "contain-blurred"prop. Portrait source images (e.g. a host avatar) rendered with the defaultcoverfit on a landscape canvas get scaled ~2.5x and can push a face off-frame.contain-blurredrenders a blurred/darkened cover-fit backdrop plus the full undistorted image letterboxed on top. Also fixes a real bug: twoImgelements as direct siblings inside oneAbsoluteFill(a flex container) compete for layout space and can both collapse to invisible — each image layer now gets its own nestedAbsoluteFill, matching how the existing vignette/particle overlay layers already stack.textColor/accentColor/subtitleColor/veilas props instead of hardcoded values.cardBackgroundColor/leftColor/rightColorprops for dark-theme use.width/heightinstead of a hardcoded1920x1080, and switches to a single-column layout for portrait.Explainer.tsx/Root.tsx/SCENE_TYPES.mdcarry the prop plumbing and documentation for the above.Test plan
contain-blurred, KPI dashboards, comparison cards)contain-blurredbranches, existing default paths unchanged)