Skip to content

feat(sample): rebuild the sample as a trip planner, fix auto-scroll and glow - #2

Merged
MohamedRejeb merged 8 commits into
mainfrom
feature/sample-rework
Oct 6, 2026
Merged

MohamedRejeb merged 8 commits into
mainfrom
feature/sample-rework

Conversation

@MohamedRejeb

Copy link
Copy Markdown
Owner

Summary

  • Rebuilds the sample as a small trip planner app whose onboarding is three chained tours, plus a Lab for trying every option live
  • Auto-scroll now brings an off-screen target to the middle of its container, and works for canvas targets
  • The glow effect is drawn as a halo that follows the cutout shape
  • Back and Next are reliable across the sample tours
  • Adds VideoCaptureTest, a frame recorder used for the intro video. It does nothing unless WAYPOINT_VIDEO_FRAMES is set

Not included

The dependency upgrade sitting uncommitted in the working tree (Kotlin 2.4.20, Compose Multiplatform 1.12.1, AGP 9, Gradle 9.8) is not part of this PR.

Test plan

  • CI allTests passes
  • Sample runs on Desktop and the three chapters play through
  • VideoCaptureTest is skipped in a normal test run

The glow was a single radial gradient centered on the target, so it was a
circle whatever the cutout shape and it tinted wide targets themselves.
It is now built from concentric outlines of the cutout, strongest at the
edge and gone at the radius, and never drawn inside the cutout.
The target was brought to the nearest edge of the scroll container, which
left it against the bottom of the screen with little room around it. It is
now centered in the container it scrolls in. A target that is already fully
visible is not moved, and the plain edge scroll remains the fallback when
centering would leave the target partly hidden.
Replaces the catalog of seven demos with one small app in its own design
kit, with a light and a dark theme. Its onboarding is three tours chained
as a sequence across screens: a spotlight tour, a hands-on tutorial that
advances from the user's input, and a tour with canvas targets, auto-scroll
and steps inside a bottom sheet. Hints and a beacon live outside the tours.
The Lab screen drives every highlight and tooltip option live.

All tours use a custom tooltip built on waypoint-core. Unused lifecycle
dependencies are removed from the sample.
A target registered with waypointCanvasTarget had no way to be scrolled, so
a step whose canvas had scrolled away never showed, for example when going
back to it. The modifier now registers the canvas for auto-scroll, and the
tour centers the targeted rectangle inside the canvas rather than the canvas
as a whole.
- Steps completed by typing or choosing advance only on a new action, and
  offer Next when revisited, instead of bouncing through filled steps.
- The route step does not reload when the user comes back to it, and the
  dim stays up while a step is getting ready.
- The share card has a Back button, and the trip tour runs on trips with
  only a few stops.
- The sheet's grab bar is part of its content so the tour dims all of it.
- Hints open below their button instead of beside it on wide windows.
Renders the sample frame by frame on the test clock and writes PNGs.
It does nothing unless WAYPOINT_VIDEO_FRAMES points at an output directory.
Gradle 9.8.0, compileSdk 37, and the companion libraries that match
Compose Multiplatform 1.12.1.

- Library modules use com.android.kotlin.multiplatform.library. The sample
  still applies com.android.application next to KMP, kept working by the
  AGP 9 opt-out flags in gradle.properties.
- js and wasmJs declare binaries.executable(), required by Compose 1.12
  for Compose UI tests.
- Re-record the Pulse and Ripple goldens, the test clock captures the
  animation one frame apart on 1.12.
- Regenerate the ABI dumps, Kotlin 2.4 adds no-arg constructors.
- Rename a test whose name had a comma, rejected by Kotlin/Native.
GIFs and stills rendered from the sample app, placed in the README, the
overview, quick start and the highlight, effects, interactive tutorial and
cross-hierarchy guides. Versions updated to Kotlin 2.4.20 and Compose 1.12.1.
@MohamedRejeb
MohamedRejeb merged commit db64cc9 into main Oct 6, 2026
1 of 2 checks passed
@MohamedRejeb
MohamedRejeb deleted the feature/sample-rework branch October 8, 2026 16:01
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.

1 participant