Skip to content

docs(core): correct Carousel doc drift and translate the Chinese usage block - #3532

Merged
cixzhang merged 1 commit into
meta:mainfrom
arham766:docs/carousel-accuracy
Jul 8, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
arham766:docs/carousel-accuracy

Conversation

@arham766

@arham766 arham766 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #3332 — while working on that PR I noticed three more spots where Carousel.doc.mjs had drifted from the component:

  • The anatomy claimed items are "animated with a scroll-driven scale effect" — no such effect exists in Carousel.tsx.
  • hasButtons was described as "on hover (desktop only)" in the anatomy, the props table, the zh translation, and the dense variant. The buttons are actually driven by per-edge overflow: each button appears when the content can scroll in that direction (see the overflowStart/overflowEnd wiring and the component JSDoc, which already says "when content is scrollable").
  • The docsZh.usage block was still entirely in English; translated it in the same style as the other component translations (e.g. AvatarGroup).

Test plan

  • astryx component Carousel --dense and --zh render the corrected content
  • pnpm -F @astryxdesign/core exec vitest run --root ../.. packages/core/src/Carousel/Carousel.test.tsx — 7/7 pass
  • pnpm -F @astryxdesign/core run typecheck:docs — clean

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

@arham766 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 Jul 4, 2026
@arham766
arham766 force-pushed the docs/carousel-accuracy branch from 7059f45 to 57efb52 Compare July 4, 2026 05:08
@arham766
arham766 marked this pull request as ready for review July 4, 2026 05:08
@arham766
arham766 force-pushed the docs/carousel-accuracy branch 2 times, most recently from bd2aa6a to 418d4da Compare July 4, 2026 05:40
The anatomy claimed a scroll-driven scale effect that does not exist,
and hasButtons was described as hover-triggered and desktop-only. The
buttons are actually driven by per-edge overflow: each appears when the
content can scroll in that direction. Descriptions now mirror the
component JSDoc. The docsZh usage block was still in English; translate
it in the same style as the other component translations.

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@cixzhang
cixzhang merged commit 1f25f25 into meta:main Jul 8, 2026
14 of 15 checks passed
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

Development

Successfully merging this pull request may close these issues.

2 participants