Fix hero image issue and marked 16 as preview#9586
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the website docs/blog pipeline to properly surface preview documentation (v16) and fix missing blog hero/author images.
Changes:
- Mark v16 docs as preview (config + UI warning banner) and adjust stable version pointers to v15 where appropriate.
- Improve product/version switcher label truncation to handle longer titles.
- Sync blog assets into
public/images/blogand enrich blog list metadata (author image + formatted date).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
website/src/docs/docs.json |
Updates product titles, stable version selection, and adds preview metadata for v16 docs. |
website/src/components/articles/doc-article.tsx |
Adds isPreview detection from version config and displays a preview warning banner. |
website/src/components/articles/doc-article-navigation.tsx |
Adds truncation styling for switcher labels and adjusts button sizing. |
website/scripts/sync-doc-assets.ts |
Extends asset sync to include blog assets into public/images/blog (excluding markdown). |
website/lib/docs.ts |
Extends DocsVersion type to support optional preview. |
website/lib/doc-page-view.tsx |
Adds isPreview detection and preview warning banner in the Next docs view. |
website/lib/blog-list-page.tsx |
Populates author image URL and formats dates for blog list entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -328,7 +336,7 @@ const ProductSwitcherButton = styled.button<{ readonly fullWidth?: boolean }>` | |||
| box-sizing: border-box; | |||
| border-radius: var(--button-border-radius); | |||
| border: 2px solid ${THEME_COLORS.primaryButtonBorder}; | |||
| min-width: 62px; | |||
| min-width: 0; | |||
| height: 38px; | |||
There was a problem hiding this comment.
The version titles now include longer strings like "v16 (preview)", but only the switcher button label gets ellipsis styling. The version dropdown (ProductVersionDialog) still uses a fixed narrow width, so these titles are likely to wrap/overflow and degrade the UI. Consider widening the dropdown or applying truncation/auto-sizing styles there as well.
| date: post.date | ||
| ? new Date(post.date).toLocaleDateString("en-US", { | ||
| year: "numeric", | ||
| month: "long", | ||
| day: "2-digit", | ||
| }) | ||
| : "", |
There was a problem hiding this comment.
toLocaleDateString is being called during render to format post.date. In Next.js this can cause SSR/client hydration mismatches and off-by-one dates depending on server vs client timezone. Consider formatting dates in the data layer (when building posts) or specify a fixed timeZone (e.g. UTC) when formatting here to keep the output deterministic.
No description provided.