Build a card out of blocks when no preset is its shape - #217
Merged
Conversation
The card kinds are eight layouts somebody drew in advance, and a moment that is not a figure, a list or a quote got the nearest one worn the wrong way round or nothing at all. The moments that came out worst are the ones with nothing in them a camera could point at: a system seizing up, ten years compressed into a phrase, trust eroding. A talking head carries those least well and there is no figure in them to hang a preset on, so they were skipped. `scene` is the ninth kind and the one with no shape of its own: a layout and a list of blocks. text, quote, list, bars, meter, steps, chip, media, rule, and group to nest them side by side. Fourteen blocks, three deep. The set is closed on purpose — unlimited arrangements, not unlimited marks, because a plan that can name its own shapes can draw something nobody in the show would sign off. An arrangement nobody has seen before does not know how tall it is, which every preset did because a person sized it. So it is measured: wrapping is estimated from the advance width rather than laid out, because the same number has to come out in a browser preview and in a headless render and only one of those can measure text before it lays out. Media gives up its band first, down to the height below which a picture says nothing, and only then does the type scale — a picture cropped tighter is still the picture, where type shrunk to fit one is a card nobody reads at arm's length. The shrink has a floor of 0.55; a scene that would go past it takes the whole frame rather than sharing it with the speaker at a size that reads as a mistake. Older plans are untouched: the eight presets draw exactly what they drew, and an engine that has never heard of `scene` already drops a kind it cannot draw rather than painting an empty slab over the speaker.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a typed ChangesScene card model and measurement
Scene rendering
Card integration
Validation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CardTimeline
participant Cards
participant fitScene
participant Scene
participant RemotionMedia
CardTimeline->>Cards: select active scene card
Cards->>fitScene: evaluate available room
fitScene-->>Cards: return fit and media height
Cards->>Scene: render fitted blocks
Scene->>RemotionMedia: render video or image blocks
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
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.
The card kinds are eight layouts somebody drew in advance, and a moment that
is not a figure, a list or a quote got the nearest one worn the wrong way
round or nothing at all. The moments that came out worst are the ones with
nothing in them a camera could point at: a system seizing up, ten years
compressed into a phrase, trust eroding. A talking head carries those least
well and there is no figure in them to hang a preset on, so they were skipped.
sceneis the ninth kind and the one with no shape of its own: a layout anda list of blocks. text, quote, list, bars, meter, steps, chip, media, rule,
and group to nest them side by side. Fourteen blocks, three deep. The set is
closed on purpose — unlimited arrangements, not unlimited marks, because a
plan that can name its own shapes can draw something nobody in the show would
sign off.
An arrangement nobody has seen before does not know how tall it is, which
every preset did because a person sized it. So it is measured: wrapping is
estimated from the advance width rather than laid out, because the same
number has to come out in a browser preview and in a headless render and only
one of those can measure text before it lays out. Media gives up its band
first, down to the height below which a picture says nothing, and only then
does the type scale — a picture cropped tighter is still the picture, where
type shrunk to fit one is a card nobody reads at arm's length. The shrink has
a floor of 0.55; a scene that would go past it takes the whole frame rather
than sharing it with the speaker at a size that reads as a mistake.
Older plans are untouched: the eight presets draw exactly what they drew, and
an engine that has never heard of
scenealready drops a kind it cannot drawrather than painting an empty slab over the speaker.
Summary by CodeRabbit