feat(examples): a six-slide carousel sized for a LinkedIn document post#472
Open
DemchaAV wants to merge 3 commits into
Open
feat(examples): a six-slide carousel sized for a LinkedIn document post#472DemchaAV wants to merge 3 commits into
DemchaAV wants to merge 3 commits into
Conversation
Portrait 1080x1350, which is the tallest frame LinkedIn shows without cropping, so the type can be sized for a phone rather than a desktop preview. Five slides: the one-composition premise, what the PPTX backend actually is, the comparative numbers, the guarantees behind them, and how to depend on it. Figures are read at render time - the version line from the filtered banner.properties, the comparative timings from the committed benchmark snapshot - so the file does not need remembering on the next release. The coordinate slide deliberately does not print the reactor version: this renders from a -SNAPSHOT tree, and publishing that string would advertise a coordinate that is not on Central. Two engine details the layout needed. A section measures to its longest line, so a stack of cards renders with ragged right edges; a zero-height spacer sets the width floor and they line up. Leading whitespace is trimmed during inline layout, so the code sample indents with non-breaking spaces, which occupy the same advance in a monospaced face. The same composition also writes a PPTX, which is what keeps slide two's claim about identical geometry honest whenever this file changes.
…ts licence The carousel now leads with SocialCardExample's artwork rather than restating it, so the post opens on the picture that already explains the premise. That drove the page size. The card is a 1280pt canvas with absolute coordinates, and the DSL has no node-level scale outside images, so scaling it would have meant rebuilding it against a width. Widening the carousel to 1280x1600 keeps the frame at 4:5 and carries the card at native size instead. Everything else was drawn against a 1080-wide page, so the three type helpers multiply by the ratio and the slides keep their proportions. Its own page takes a zero margin so the artwork reaches the edges, and a spacer centres it in the taller frame; both share the night background, so the space above and below reads as letterboxing rather than a gap. The closing slide said APACHE-2.0. The repository is MIT - LICENSE, the README badge and the card's own footer all agree - so the carousel was contradicting the slide it now opens with. The Maven coordinate also broke mid-artifact at that width and is set as groupId over artifactId.
…es with the type The prose still described the first commit: five slides at 1080x1350, where adding the social card made it six at 1280x1600. Class javadoc and the method comment both said five. The widening scaled the type helpers but left the gaps, corner radii, accent bars and stroke widths at their 1080-era values, so "the slides keep their proportions" was true of the text and not of the boxes around it. They take the same ratio now, and the constant's javadoc says which lengths it applies to rather than leaving the next reader to guess. The opening slide's centring spacer is floored at zero: a card taller than the page would have asked for a negative height instead of simply filling the frame.
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.
Why
The existing social card is 1280x640 — a link-preview image. LinkedIn's document post is a swipeable carousel, and it crops anything wider than 4:5, so an announcement needs its own asset rather than a reuse of the preview.
What
LinkedInCarouselExample— portrait 1280x1600 (4:5), six slides, composed through the canonical DSL and rendered by the engine it describes. It opens withSocialCardExample's card at native size rather than restating it, and that is what sets the page width:Nothing datable is written out. The version line comes from the filtered
banner.properties; the timings and ratios come from the committed benchmark snapshot throughEngineDeckData, shown with the capture date. The coordinate slide deliberately does not print the reactor version — this renders from a-SNAPSHOTtree, and publishing that string would advertise a coordinate that is not on Central.The same composition also writes
linkedin-carousel.pptx. Slide two claims the PPTX backend places the same geometry as the PDF one; emitting both from onecompose(...)is what keeps that true when this file changes.Two engine behaviours the layout had to work with
Neither is a defect; both are worth knowing when composing this kind of slide.
Tests
examples44/44,javadoc:javadocclean. Registered inGenerateAllExamples, so the Examples Generation Smoke Test covers it. All six slides were rendered and inspected.