Skip to content

fix(docsite): keep Properties preview border framed, tidy Examples divider#2989

Merged
rubyycheung merged 1 commit into
mainfrom
chore/docsite-remove-component-version
Jun 24, 2026
Merged

fix(docsite): keep Properties preview border framed, tidy Examples divider#2989
rubyycheung merged 1 commit into
mainfrom
chore/docsite-remove-component-version

Conversation

@rubyycheung

@rubyycheung rubyycheung commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Two polish fixes to the docsite component detail pages (e.g. /components/Button, /components/Token).

1. Fix disappearing preview border on the Properties tab

On the Properties tab, the live preview sits in a sticky overflow: auto / max-height container. The border was on the inner Card, so when the preview was taller than the container the Card's top and bottom borders scrolled out of the overflow window and vanished (left/right stayed). Fixed by:

  • Moving the border + radius onto the scroll container itself (a border on the scrolling element doesn't scroll away).
  • Adding an embedded flag to InteractivePreviewStage that flattens the inner Card's border-radius so it sits flush inside the frame.

2. Remove the divider above "Examples"

Dropped the <Divider /> that sat directly above the "Examples" section on the overview — the heading provides enough separation.

Note: an earlier revision of this PR also simplified the header subtitle (dropping the package version and module name). That change has been reverted — the subtitle remains the original @astryxdesign/core v0.0.15 · Button.

Changes

  • apps/docsite/src/components/component-detail/ComponentDetailClient.tsx — border/radius on the Properties scroll container; pass embedded; removed the Examples divider.
  • apps/docsite/src/components/component-detail/InteractivePreview.tsx — new embedded prop flattens the Card corners when framed.

Test plan

  • /components/Token?tab=properties — border stays framed while scrolling the property-heavy preview
  • /components/Button — no divider above the Examples section
  • /components/Button header still renders @astryxdesign/core v0.0.15 · Button (unchanged)
  • eslint on all changed files — clean
  • Pre-commit checks (check:repo, check:changesets) pass

Notes

  • Docsite-only change (apps/docsite is private/unpublished), so no changeset is needed.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🚀 Vercel Preview Deployment

Status ✅ Deployed
Preview Open Preview
Commit f6672cb
Inspect Vercel Dashboard
Workflow View Logs

No authentication required — anyone with the link can view the preview.

@rubyycheung rubyycheung changed the title chore(docsite): remove version + redundant name from component page header chore(docsite): simplify component page header + fix Properties preview border Jun 23, 2026
@rubyycheung rubyycheung changed the title chore(docsite): simplify component page header + fix Properties preview border chore(docsite): simplify component page header, fix Properties border, tidy Examples divider Jun 23, 2026
@rubyycheung rubyycheung force-pushed the chore/docsite-remove-component-version branch from 879c902 to 01d6791 Compare June 23, 2026 04:12
canControlOpenState?: boolean;
embedded?: boolean;
}) {
const embeddedCardStyle = embedded ? {borderRadius: 0} : undefined;

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.

Can this use a proper xstyle?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — converted the embedded Card's inline borderRadius to a stylex flat rule applied via xstyle. (dd38754)

Comment on lines 185 to 196
border:
'var(--border-width, 1px) solid var(--color-border-emphasized)',
borderRadius: 'var(--radius-container)',
}}>

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.

Move to stylex

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — moved the preview-stage inline style into a stylex.create rule (styles.previewStage), with the maxHeight as a media query so the isMobile JS check is gone too. (dd38754)

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
astryx Ignored Ignored Jun 24, 2026 4:22pm

Request Review

@rubyycheung rubyycheung requested a review from cixzhang June 23, 2026 19:53
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@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.

I was thinking about the versions here and I think we should keep showing them in the headers for all docs. They should be tied to the core or chart or other package version for the relevant package the doc lives in.

  1. Core component docs are served from the core package. It's important for users to be able to reference which version of the docsite is showing relative to their own version. It's not redundant or churn-y information. Component docs will have meaningful difference per version and builders need to have this reference so they know if they need to upgrade.

  2. Theme docs should show the version from the corresponding theme package and templates and guidance should be showing the version from the CLI. All of these versions can evolve independently from the core version moving forward since we may apply hotfixes to any package and break the tight connection with core versioning.

Imagine this user scenario: you're a builder currently on v0.0.15 but want to reference docs for some component. The docsite's version may be advanced to 0.0.18 where we may have added new props or changed prop signature. So the information you get about the component won't work for your setup and if we're not showing the version it's not easy for the builder to quickly check and compare.

@rubyycheung rubyycheung changed the title chore(docsite): simplify component page header, fix Properties border, tidy Examples divider fix(docsite): keep Properties preview border framed, tidy Examples divider Jun 24, 2026
@rubyycheung rubyycheung requested a review from cixzhang June 24, 2026 16:17
…vider

On the Properties tab the live preview sits in a sticky overflow:auto /
max-height container. The border lived on the inner Card, so when the preview
was taller than the container its top/bottom borders scrolled out of view.
Move the border + radius onto the scroll container itself, and add an
`embedded` flag to InteractivePreviewStage that flattens the inner Card's
corners so it sits flush in the frame.

Also drop the redundant Divider above the Examples heading.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rubyycheung rubyycheung force-pushed the chore/docsite-remove-component-version branch from 9c10b15 to f6672cb Compare June 24, 2026 16:22
@rubyycheung

Copy link
Copy Markdown
Contributor Author

Added the version back in

@rubyycheung rubyycheung merged commit 5bb73bd into main Jun 24, 2026
17 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