-
-
Notifications
You must be signed in to change notification settings - Fork 803
Fix hero image issue and marked 16 as preview #9586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,14 +137,14 @@ export const DocArticleNavigation: FC<DocArticleNavigationProps> = ({ | |
| fullWidth={!hasVersions} | ||
| onClick={toggleProductSwitcher} | ||
| > | ||
| {activeProduct?.title} | ||
| <ProductSwitcherLabel>{activeProduct?.title}</ProductSwitcherLabel> | ||
| <IconContainer $size={14}> | ||
| <Icon {...Grid2IconSvg} /> | ||
| </IconContainer> | ||
| </ProductSwitcherButton> | ||
| {hasVersions && ( | ||
| <ProductSwitcherButton onClick={toggleVersionSwitcher}> | ||
| {activeVersion?.title} | ||
| <ProductSwitcherLabel>{activeVersion?.title}</ProductSwitcherLabel> | ||
| <IconContainer $size={14}> | ||
| {versionSwitcherOpen ? ( | ||
| <Icon {...ChevronUpIconSvg} /> | ||
|
|
@@ -319,6 +319,14 @@ type EnhancedItem = Item & { | |
| fullpath: string; | ||
| }; | ||
|
|
||
| const ProductSwitcherLabel = styled.span` | ||
| flex: 1 1 auto; | ||
| min-width: 0; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| `; | ||
|
|
||
| const ProductSwitcherButton = styled.button<{ readonly fullWidth?: boolean }>` | ||
| display: flex; | ||
| flex: 0 0 auto; | ||
|
|
@@ -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; | ||
|
Comment on lines
322
to
340
|
||
| padding-right: 8px; | ||
| padding-left: 8px; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toLocaleDateStringis being called during render to formatpost.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 buildingposts) or specify a fixedtimeZone(e.g. UTC) when formatting here to keep the output deterministic.