Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 242 additions & 10 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

23 changes: 0 additions & 23 deletions projects/packages/newsletter/_inc/components/newsletter-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,6 @@ body.jetpack_page_jetpack-newsletter {
}
}

// Tabs row: sticks at the top of the body wrapper (which itself starts
// directly below the sticky page header), so the bar stays in view while
// the panel content scrolls underneath. The wrapper carries the
// full-width separator + inline padding while the nested `Tabs.List`
// keeps its native `width: fit-content` so the animated active-tab
// indicator slides smoothly between tabs.
// The selector mirrors admin-ui's
// `.admin-ui-page > :not(.admin-ui-page__header):not(.jetpack-footer) > *`
// rule so the `flex: 0 0 auto` here outweighs the `flex: 1 1 auto`
// admin-ui sprays across body-wrapper children. Without that boost the
// tabs row collapses to ~24px and the tab buttons clip out of view.
.admin-ui-page > :not(.admin-ui-page__header):not(.jetpack-footer) > .jetpack-newsletter-page__tabs-row {
background: var(--wpds-color-bg-surface-neutral-strong, #fff);
border-bottom: 1px solid var(--wpds-color-stroke-surface-neutral, #e0e0e0);
box-sizing: border-box;
flex: 0 0 auto;
padding-inline: $jetpack-newsletter-inset;
position: sticky;
top: 0;
width: 100%;
z-index: 9;
}

.jetpack-newsletter-page__content--padded {
padding: $jetpack-newsletter-inset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ export default function NewsletterPage( {
>
{ subscribersEnabled ? (
<Tabs.Root value={ activeTab } onValueChange={ onTabChange }>
{ /* Wrapper carries the full-width bottom border. The Tabs.List
inside keeps its native `width: fit-content` so the
animated active-tab indicator slides smoothly. */ }
<div className="jetpack-newsletter-page__tabs-row">
<div className="jp-admin-page-tabs jp-admin-page-tabs--minimal">
<Tabs.List variant="minimal">
<Tabs.Tab value="subscribers">{ __( 'Subscribers', 'jetpack-newsletter' ) }</Tabs.Tab>
<Tabs.Tab value="settings">{ __( 'Settings', 'jetpack-newsletter' ) }</Tabs.Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Newsletter: Normalize page tabs onto shared minimal variant + jp-admin-page-tabs--minimal wrapper modifier; drop bespoke jetpack-newsletter-page__tabs-row class. Bump @wordpress/ui to 0.13.0.
2 changes: 1 addition & 1 deletion projects/packages/newsletter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@wordpress/primitives": "4.44.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0",
"debug": "4.4.3"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/newsletter/routes/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@wordpress/notices": "5.44.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0"
},
"route": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/scan/_inc/components/scan-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ScanPage( { activeTab, children }: Props ): JSX.Element
actions={ headerActions }
>
<Tabs.Root value={ activeTab } onValueChange={ onTabChange }>
<div className="jp-admin-page-tabs">
<div className="jp-admin-page-tabs jp-admin-page-tabs--minimal">
<Tabs.List variant="minimal">
<Tabs.Tab value="active">{ __( 'Active threats', 'jetpack-scan-page' ) }</Tabs.Tab>
<Tabs.Tab value="history">{ __( 'History', 'jetpack-scan-page' ) }</Tabs.Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Scan: Normalize page tabs onto shared minimal variant + jp-admin-page-tabs--minimal wrapper modifier. Bump @wordpress/ui to 0.13.0.
2 changes: 1 addition & 1 deletion projects/packages/scan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@wordpress/notices": "5.44.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/scan/routes/index/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@wordpress/notices": "5.44.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0"
"@wordpress/ui": "0.13.0"
},
"route": {
"path": "/",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Search: Normalize page tabs onto shared minimal variant + jp-admin-page-tabs--minimal wrapper modifier. Bump @wordpress/ui to 0.13.0.
2 changes: 1 addition & 1 deletion projects/packages/search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@wordpress/icons": "12.2.0",
"@wordpress/interactivity": "6.44.0",
"@wordpress/server-side-render": "6.20.0",
"@wordpress/ui": "0.12.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0",
"@wordpress/viewport": "6.44.0",
"clsx": "2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default function DashboardPage( { isLoading = false } ) {
handleLocalNoticeDismissClick={ handleLocalNoticeDismissClick }
/>
<Tabs.Root value={ activeTab } onValueChange={ handleTabChange }>
<div className="jp-admin-page-tabs">
<div className="jp-admin-page-tabs jp-admin-page-tabs--minimal">
<Tabs.List variant="minimal">
<Tabs.Tab value="plan-usage">{ __( 'Plan & Usage', 'jetpack-search-pkg' ) }</Tabs.Tab>
<Tabs.Tab value="settings">{ __( 'Settings', 'jetpack-search-pkg' ) }</Tabs.Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
@use "scss/variables";
@use "scss/rna-styles";

// Body-scoped to beat the `body.jetpack_page_jetpack-search`-prefixed rules
// from `@automattic/jetpack-base-styles/admin-page-layout` on specificity.
body.jetpack_page_jetpack-search .jp-search-dashboard-page {
// Make `<Tabs.Tab>` actually use its design token. `@wordpress/ui` declares
// `font-size: var(--wpds-typography-font-size-md)` inside `@layer
// wp-ui-components`, but wp-admin core ships an unlayered
// `button { font-size: inherit }` reset that wins over any layered rule —
// so the tab silently inherits 16px from its surrounding context instead
// of the 13px the token specifies. Re-applying the token from an
// unlayered selector lets the design system land as intended (tab text
// smaller than the 15px page title — visual hierarchy restored).
.jp-admin-page-tabs [role="tab"] {
font-size: var(--wpds-typography-font-size-md, 13px);
}

// Align the first tab's content edge with the page header's start.
// admin-ui's page header sits at padding-inline 2xl (24px). The shared
// `.jp-admin-page-tabs` wrapper adds only 8px (designed for the default
// <Tabs.Tab> which ships with padding-inline lg = 16px, so 8 + 16 = 24
// matches the header). With `variant="minimal"`, <Tabs.Tab> has 0 inline
// padding, so the wrapper has to provide the full 2xl itself to keep
// the first tab flush with the header content edge across all widths.
.jp-admin-page-tabs {
padding-inline: var(--wpds-dimension-padding-2xl, 24px);
}
}

#jp-search-dashboard {
color: variables.$black;
font-size: 16px;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

VideoPress: Migrate dashboard tabs from default to minimal variant; align via shared jp-admin-page-tabs--minimal wrapper modifier. Bump @wordpress/ui to 0.13.0.
2 changes: 1 addition & 1 deletion projects/packages/videopress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@wordpress/notices": "5.44.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0",
"clsx": "2.1.1",
"debug": "4.4.3",
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/routes/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"@wordpress/route": "0.10.0",
"@wordpress/ui": "0.11.0"
"@wordpress/ui": "0.13.0"
},
"route": {
"path": "/library",
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/routes/overview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@wordpress/icons": "12.2.0",
"@wordpress/route": "0.10.0",
"@wordpress/theme": "0.11.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0"
},
"route": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/routes/settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"@wordpress/route": "0.10.0",
"@wordpress/ui": "0.11.0"
"@wordpress/ui": "0.13.0"
},
"route": {
"path": "/settings",
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/routes/video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@wordpress/i18n": "6.17.0",
"@wordpress/icons": "12.2.0",
"@wordpress/route": "0.10.0",
"@wordpress/ui": "0.11.0"
"@wordpress/ui": "0.13.0"
},
"route": {
"path": "/video/$id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,4 @@ body.jetpack_page_jetpack-videopress {
}
}

// Match the design-system default-variant Tabs (Storybook reference).
// We pair `<Tabs.List>` (no variant) with the canonical 16px per-tab inline
// padding — `admin-page-layout` would otherwise bump it to 24px to line the
// first tab up with the page-title edge. To keep that alignment, offset the
// tablist itself by the missing 8px so the first tab's text still starts at
// the page-header inline padding (8px tablist + 16px tab = 24px). The
// hairline lives on `.jp-admin-page-tabs` and still spans the full width.
.jp-admin-page-tabs {

[role="tablist"] {
padding-inline-start: 8px;
}

[role="tab"] {
padding-inline: var(--wpds-dimension-padding-lg);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const TAB_PATHS: Record< DashboardTab, string > = {
*/
export default function DashboardTabs() {
return (
<div className="jp-admin-page-tabs">
<Tabs.List>
<div className="jp-admin-page-tabs jp-admin-page-tabs--minimal">
<Tabs.List variant="minimal">
<Tabs.Tab value="overview">{ __( 'Overview', 'jetpack-videopress-pkg' ) }</Tabs.Tab>
<Tabs.Tab value="library">{ __( 'Library', 'jetpack-videopress-pkg' ) }</Tabs.Tab>
<Tabs.Tab value="settings">{ __( 'Settings', 'jetpack-videopress-pkg' ) }</Tabs.Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Protect: Migrate page tabs from default to minimal variant; align via shared jp-admin-page-tabs--minimal wrapper modifier. Bump @wordpress/ui to 0.13.0.
2 changes: 1 addition & 1 deletion projects/plugins/protect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"@wordpress/icons": "12.2.0",
"@wordpress/ui": "0.11.0",
"@wordpress/ui": "0.13.0",
"@wordpress/url": "4.44.0",
"camelize": "1.0.1",
"clsx": "2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ const ProtectApp = () => {
>
{ notice && <Notice floating={ true } dismissable={ true } { ...notice } /> }
<Tabs.Root ref={ tabsRootRef } value={ activeTab } onValueChange={ onValueChange }>
<div className="jp-admin-page-tabs">
<Tabs.List>
<div className="jp-admin-page-tabs jp-admin-page-tabs--minimal">
<Tabs.List variant="minimal">
<Tabs.Tab value="scan">{ scanLabel }</Tabs.Tab>
<Tabs.Tab value="firewall">{ __( 'Firewall', 'jetpack-protect' ) }</Tabs.Tab>
<Tabs.Tab value="settings">{ __( 'Settings', 'jetpack-protect' ) }</Tabs.Tab>
Expand Down
Loading