feat(web): fill example-gallery gaps for uncovered library features#98
Merged
Conversation
Add gallery examples for README features that had no live demo: - Root props (call.root) — "Account-aware dialog" (root-context) - Optional mutationFn + .orEnd() — "Confirm with optional async" (optional-mutation) - End from caller, end(promise, value) — "Resolve from the caller" (caller-resolve) - Broadcast update, update(props) to all — "Broadcast to every call" (broadcast-update) Add exit animations (unmountingDelay + call.ended) to the side-drawer and bottom-sheet examples, with explanatory notes. Infra: support Root-props examples in the generated App.tsx and CodeSandbox export via an optional rootProps meta field; add exit-animation, root-props and end-from-caller behavior tags; drop the redundant "Behaviors" filter label.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What & why
Audited the gallery against the README and found library features with no live example. This fills those gaps and surfaces a couple that were under-demonstrated.
New examples
root-context)call.root.userNameflowing from<Greeter userName="…" />optional-mutation)mutationFn+.orEnd()caller-resolve)Approval.end(promise, false)broadcast-update)update(props)with no promiseEdits to existing examples
unmountingDelaysecond arg +call.ended(slide-in on mount, slide-out on close), with notes.Infra / supporting changes
rootPropsfield onExampleMeta, threaded through the generatedApp.tsx(code-marks) and the CodeSandbox export (PlaygroundButton) so a Root-props example actually shows where the prop is passed. Unit tests updated.exit-animation,root-props,end-from-caller.Verification
code-marksunit tests pass (21); biome clean;astro buildgenerates all 21 example routes; pre-committsc -b+ lint green..orEnd/handler paths, timeout + manual approval, broadcast merge across a stack, drawer/sheet enter+exit).Follow-up (separate)
While building
broadcast-updateI hit a library behavior worth a look: callingX.end()(end-all) and thenX.call()in the same synchronous tick leaves the new calls unrendered. The example's caller was written to avoid that pattern; flagged for investigation inpackages/react-callseparately. — Fixed in #96