Skip to content

docs(cli): make Slider/Selector/MultiSelector showcases interactive#3199

Open
durvesh1992 wants to merge 1 commit into
facebook:mainfrom
durvesh1992:fix/interactive-showcases
Open

docs(cli): make Slider/Selector/MultiSelector showcases interactive#3199
durvesh1992 wants to merge 1 commit into
facebook:mainfrom
durvesh1992:fix/interactive-showcases

Conversation

@durvesh1992

Copy link
Copy Markdown
Contributor

Summary

Closes #3187. Closes #3188. Closes #3189.

The Slider, Selector, and MultiSelector showcase blocks rendered controlled components with a static value and a no-op/missing onChange, so the docsite previews appeared frozen — dragging the slider or picking an option did nothing. Wired local useState + onChange in each, mirroring the existing examples that already do this (SliderWithMarks, SelectorWithSections, MultiSelectorColumnVisibilitySelector).

  • Slider/SliderShowcase.tsxuseState(50) + onChange
  • Selector/SelectorShowcase.tsxuseState<string | undefined>() + value/onChange
  • MultiSelector/MultiSelectorShowcase.tsxuseState<string[]>([]) + onChange; added 'use client' (now uses state)

Testing

  • Regenerated docsite data — all three blocks parse and copy cleanly.
  • Patterns are identical to existing stateful examples in the same folders (which compile), so the controlled-state wiring is type-correct.

I can't launch a browser locally to click-test the previews, but this is the exact state-wiring the issues request; a quick visual confirm on the preview is welcome.

Changeset

Included (@astryxdesign/cli patch) — showcase blocks ship in cli/templates.

Closes facebook#3187. Closes facebook#3188. Closes facebook#3189.

These showcase blocks rendered controlled components with a static value
and a no-op/missing onChange, so the docsite previews appeared frozen
(dragging the slider / picking an option did nothing). Wire local
useState + onChange in each, mirroring the other examples
(SliderWithMarks, SelectorWithSections, MultiSelectorColumnVisibilitySelector).
MultiSelectorShowcase also gains 'use client' now that it uses state.
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

1 participant