Skip to content

docs(ui): stop claiming the theme toggle is shared with hosted - #2027

Open
RaghavChamadiya wants to merge 1 commit into
mainfrom
docs/theme-toggle-consumers
Open

docs(ui): stop claiming the theme toggle is shared with hosted#2027
RaghavChamadiya wants to merge 1 commit into
mainfrom
docs/theme-toggle-consumers

Conversation

@RaghavChamadiya

Copy link
Copy Markdown
Member

packages/ui/src/shared/theme-toggle.tsx opens by describing itself as the

Canonical implementation consumed by both packages/web and the hosted frontend so the toggle UX stays identical across surfaces.

Only the first half of that is true. The hosted app imports a local single-button toggle of its own and has done for a while, so the two surfaces do not match.

The comment is a good part of why that went unnoticed. A shared component that names its consumers is exactly the thing you check before assuming parity, and this one named a consumer it does not have.

This replaces the claim with what is actually there, and records that the hosted control is the newer design (it carries a focus ring and a reduced-motion guard this one lacks) and is meant to land here rather than stay forked.

Comment only. No behaviour change, no API change.

The docstring described this component as the canonical implementation
consumed by both packages/web and the hosted frontend, so that the toggle UX
stays identical across surfaces. Only the first half is true. Hosted renders a
single icon button of its own and has done for a while.

The comment is the reason that went unnoticed: a shared component that names
its consumers is the thing you check before assuming parity, and this one
named a consumer it does not have. Replace the claim with what is actually
there, including that the hosted control is the newer design and is meant to
land here rather than stay forked.

Comment only, no behaviour change.
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