Chore: onboarding crosssell subtitle marquee - #3046
Merged
StylianosGakis merged 12 commits intoAug 12, 2026
Merged
Conversation
Long subtitles (common in English) wrapped to a second line, giving the bundle-discount cross-sell rows varying heights and uneven pillow spacing. Make the subtitle a single marquee line so it scrolls instead. Titles are left free to wrap. Inter-row spacing is unchanged.
Replace basicMarquee with a custom AutoScrollingText that scrolls a too-wide subtitle to its end, pauses, then scrolls back to the start and pauses again, looping. basicMarquee only loops one direction with an arbitrary gap before the text re-enters from the right; this reveals the whole line and returns, matching the iOS behaviour. Scroll duration scales with the hidden overflow so the speed stays constant. Subtitles that already fit do not move.
Repackage the ping-pong auto-scroll as Modifier.autoScrollingMarquee(), a LayoutModifierNode that measures its content unbounded, reports the container width, clips, and animates the placement offset. Applies directly to HedvigText like basicMarquee, dropping the wrapping Box and the style/color pass-through.
Promote Modifier.autoScrollingMarquee() from feature-onboarding to the shared design-system-hedvig commonMain so any surface can reuse it. Now public and KMP-common (available to iOS too).
panasetskaya
approved these changes
Aug 12, 2026
Lay the cross-sell rows out with a small custom Layout that measures every row once and sizes them all to the tallest, centring each row's content in its cell. A single two-line title lifts every row to the same height, so the pillows and See price buttons keep an even vertical rhythm instead of drifting with each row's text. One measure pass, so heights are uniform on the first frame with no relayout. When no title wraps, the tallest equals the rest and nothing changes.
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.
Context:
https://hedviginsurance.slack.com/archives/C03U9C6Q7TP/p1786539083361549?thread_ts=1786525230.417139&cid=C03U9C6Q7TP