Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4d46a79
Update dependency @wordpress/build to v0.13.0 (#48403)
matticbot Apr 30, 2026
8aec736
fix: change category picker icon from gear to tag for clarity (#48391)
allilevine Apr 30, 2026
49ea70e
Write: Keep selected text highlighted while the link popover is open …
allilevine Apr 30, 2026
da72ce5
CRM: Address listview count string replace mismatch (#48396)
tbradsha Apr 30, 2026
b1cb072
Activity Log: Port AL into wp-admin as a native page (#48244)
keoshi Apr 30, 2026
e33dc09
Protect: migrate firewall upgrade prompt button to @wordpress/ui (#48…
lezama Apr 30, 2026
6985c0f
CRM: migrate workflow row Edit button to @wordpress/ui (#48149)
lezama Apr 30, 2026
253c242
CRM: Allow tag export on objects (#48364)
tbradsha Apr 30, 2026
7dfefae
Protect: migrate admin page tabs to @wordpress/ui Tabs (#48277)
CGastrell Apr 30, 2026
3780d70
Components: Migrate remaining Notice consumers to @wordpress/ui (#48173)
vianasw Apr 30, 2026
7b9e261
VideoPress: fix runaway render loop on admin library pagination (#48411)
obenland Apr 30, 2026
ed0a3f8
Write: Add autosave with dirty state tracking and draft recovery (#48…
allilevine Apr 30, 2026
944fb30
Write editor: fix drag-and-drop image upload in image modal (#48393)
allilevine Apr 30, 2026
016eaee
Write: fix image captions not saved to block content (#48395)
allilevine Apr 30, 2026
9387bec
CRM: Harden Mail Delivery settings permissions (#48359)
tbradsha Apr 30, 2026
b30a42e
CRM: Restrict some contact functions to admins (#48358)
tbradsha Apr 30, 2026
2165304
Newsletter abilities: register get-settings + update-settings via Reg…
enejb Apr 30, 2026
4814cae
Write: Prevent editing post content while image/video modal is open (…
allilevine Apr 30, 2026
fb3891f
Stats: register jetpack-stats abilities (#48286)
enejb Apr 30, 2026
37f6199
Fix heading hierarchy in search overlay (#27947) (#48245)
CodeAllNightNDay Apr 30, 2026
3529a1b
[WIP] Search 3.0: store/api helpers for product-shaped filters (wc_st…
kangzj Apr 30, 2026
4e7294d
Search: fix hero section crushed under shared admin-page layout mixin…
adamwoodnz May 1, 2026
4a57d33
phan: Update wpcom stubs (#48442)
matticbot May 1, 2026
f6f167a
Update admin-ui package and use visual prop for Jetpack logo
simison Apr 30, 2026
3b4f6ce
changelogs
simison Apr 30, 2026
dc9b0d1
AdminPage: restore layout overrides for @wordpress/admin-ui 2.0.0
CGastrell Apr 30, 2026
b4915e4
Changelog: use Jetpack plugin Type enum (bugfix)
CGastrell Apr 30, 2026
a04967b
Use default heading level 1
simison May 1, 2026
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
10 changes: 9 additions & 1 deletion .phan/stubs/wpcom-stubs.php
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.

Looks like you're bringing in a bunch of other PRs along with this PR now (e.g. this is from #48442). That seems likely to get confusing later.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* `bin/teamcity-builds/jetpack-stubs/stub-defs.php` and regenerate the stubs
* by triggering the Jetpack Staging → Update WPCOM Stubs job in TeamCity.
*
* Stubs automatically generated from WordPress.com commit b9cdd5655544ee93dbd0e64d835f467279c727e0.
* Stubs automatically generated from WordPress.com commit 0079ea4c26d955b4cfca4d3eb035a2ec06f0bd68.
*/

namespace {
Expand Down Expand Up @@ -1701,6 +1701,14 @@ function get_blog_subscriptions_aggregate_count(?int $blog_id = null, $post_term
function is_message_templates_enabled($blog_id = 0)
{
}
/**
* @param \WP_Post $post
* @param array<int, array{id?: string, network: string, message?: string, is_social_post?: bool}> $items
* @return array<int, array<string, mixed>>
*/
function render_messages_for_networks(\WP_Post $post, array $items): array
{
}
/**
* @param \WP_Post $post
* @param string $network
Expand Down
650 changes: 633 additions & 17 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

31 changes: 24 additions & 7 deletions projects/js-packages/base-styles/admin-page-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@
// <AdminPage> root: .jp-admin-page (added unconditionally by the
// <AdminPage> component from
// @automattic/jetpack-components)
// @wordpress/admin-ui: .admin-ui-page, .admin-ui-page__header
// admin-ui's <Page>: .jp-admin-page__page (className passed through
// by <AdminPage>; admin-ui
// 2.0.0 forwards it onto
// the page's outer node)
// admin-ui's header: <header> element rendered by admin-ui's <Page>
// inside `.jp-admin-page__page` (no class hooks —
// we anchor structurally to the HTML5 element)
// <JetpackFooter>: .jetpack-footer
// Tabs wrapper convention: .jp-admin-page-tabs (consumer-applied div that
// wraps `@wordpress/ui`
// `Tabs.List`; see the
// "Tabs strip" section
// below)

// Implementation note — `postcss-custom-properties` with `preserve: false`:
// several consumer packages in this monorepo (publicize, videopress, search,
Expand Down Expand Up @@ -172,31 +183,37 @@ $jp-breakpoint-mobile: 782px;
}

// ── admin-ui Page internals ───────────────────────────────────────
// admin-ui ships `.admin-ui-page` with `height: 100%`, which fills its
// admin-ui ships its page node with `height: 100%`, which fills its
// parent's computed height. Paired with our flex chain, the element
// becomes a viewport-fitted flex column.
.admin-ui-page {

// admin-ui 2.0.0 moved internals to CSS Modules (no `.admin-ui-page*`
// class hooks anymore). We pass `className="jp-admin-page__page"` from
// <AdminPage>; admin-ui forwards it onto the page's outer node. The
// header is a stable `<header>` element directly inside that node, so
// we anchor to `> header` instead of a class.
.jp-admin-page__page {
flex: 1 1 auto;
min-height: 0;
min-width: 0;
display: flex;
flex-direction: column;
}

.admin-ui-page__header {
.jp-admin-page__page > header {
flex-shrink: 0; // pinned at top of the flex column.
}

// The scrollable middle. <AdminPage> does not pass `hasPadding` to
// admin-ui's <Page>, so `.admin-ui-page__content` is not rendered —
// children drop in as direct descendants of `.admin-ui-page`. Target
// admin-ui's <Page>, so admin-ui's content wrapper is not rendered —
// children drop in as direct descendants of the page node. Target
// anything that isn't the header or the footer.

// `overflow: auto` (both axes) lets any child wider than the column
// (dashboard grids with fixed column widths, wide tables, `100vw`
// descendants) scroll horizontally inside the middle instead of
// dragging the whole window into a horizontal scrollbar.
.admin-ui-page > :not(.admin-ui-page__header):not(.jetpack-footer) {
.jp-admin-page__page > :not(header):not(.jetpack-footer) {
flex: 1 1 auto;
min-height: 0;
min-width: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

admin-page-layout mixin: style hooks for `@wordpress/ui` Tabs hosted in an AdminPage (sticky `.jp-admin-page-tabs` wrapper, inline-padding alignment for tab buttons, header bottom-border/padding suppression when tabs are present).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

admin-page-layout mixin: extend the flex chain into AdminPage's outer Container/Col so DataViews-style consumers can fill their bounded slot and let their own internal scroll handle the table body.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

admin-page-layout mixin: anchor selectors to the new `.jp-admin-page__page` className and the rendered `<header>` element, replacing the `.admin-ui-page*` global classes that admin-ui 2.0.0 dropped when it moved to CSS Modules. Restores the viewport-fitted scroll chain on every consumer (Boost, Protect, VideoPress, Search, Newsletter, Publicize, Backup, Jetpack network admin).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

ToggleControl: forward the `aria-label` prop to the underlying checkbox so consumers can label toggles that have no visible label.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

AdminPage: add `unwrapped` prop to render children directly inside the admin-ui Page, skipping the default Container/Col grid wrap. Use for full-bleed pages (DataViews-based admin surfaces) that own their own scroll/layout model.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

AdminPage: pass a stable `jp-admin-page__page` className to admin-ui's Page so layout overrides survive admin-ui 2.0.0's switch to CSS Modules; pin the header heading level to `<h2>` and center the new `visual` slot to keep the Jetpack logo aligned with the title.
4 changes: 4 additions & 0 deletions projects/js-packages/components/changelog/update-admin-ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

AdminPage: Update to @wordpress/admin-ui 2.0.0 and use the new `visual` prop to render the Jetpack logo alongside the page title.
31 changes: 12 additions & 19 deletions projects/js-packages/components/components/admin-page/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import restApi from '@automattic/jetpack-api';
import { Page } from '@wordpress/admin-ui';
import '@wordpress/admin-ui/build-style/style.css';
import {
__experimentalHStack as HStack, // eslint-disable-line @wordpress/no-unsafe-wp-apis
} from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
import clsx from 'clsx';
import { useEffect, useCallback } from 'react';
Expand Down Expand Up @@ -41,6 +37,7 @@ const AdminPage: FC< AdminPageProps > = ( {
breadcrumbs,
tabs,
showBottomBorder = true,
unwrapped = false,
} ) => {
useEffect( () => {
restApi.setApiRoot( apiRoot );
Expand Down Expand Up @@ -73,31 +70,27 @@ const AdminPage: FC< AdminPageProps > = ( {
}
}, [] );

// Compose the title with logo for the admin-ui Page header.
// Page's Header wraps this in an <h2> tag, so we just pass the content directly.
const composedTitle = title ? (
<HStack spacing={ 2 } justify="left">
{ logo || <JetpackLogo showText={ false } height={ 20 } /> }
<span>{ title }</span>
</HStack>
) : undefined;

// When title or breadcrumbs are provided, use admin-ui Page for the full page layout.
if ( showHeader && ( composedTitle || breadcrumbs ) ) {
if ( showHeader && ( title || breadcrumbs ) ) {
return (
<div className={ rootClassName }>
<Page
ariaLabel={ title }
className="jp-admin-page__page"
visual={ logo || <JetpackLogo showText={ false } height={ 20 } /> }
breadcrumbs={ breadcrumbs }
title={ composedTitle }
title={ title }
subTitle={ subTitle }
actions={ actions }
showSidebarToggle={ false }
>
{ tabs }
<Container fluid horizontalSpacing={ 0 }>
<Col>{ children }</Col>
</Container>
{ unwrapped ? (
children
) : (
<Container fluid horizontalSpacing={ 0 }>
<Col>{ children }</Col>
</Container>
) }
{ showFooter && <JetpackFooter menu={ optionalMenuItems } /> }
</Page>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,36 @@
// or when showBottomBorder is false.
// Ideally admin-ui would expose a prop or CSS custom property for this:
// https://github.com/WordPress/gutenberg/issues/75428
&.without-bottom-border :global(.admin-ui-page__header) {

// Anchor: `.jp-admin-page__page` is the className we pass to admin-ui's
// <Page>; admin-ui 2.0.0 renders the header as a stable <header> element
// directly inside that page node — no class hooks anymore.
&.without-bottom-border :global(.jp-admin-page__page > header) {
border-bottom: none;
}

// Disable sticky header until we make it work better across all pages.
// JETPACK-1386
:global(.admin-ui-page__header) {
:global(.jp-admin-page__page > header) {
position: relative;
z-index: 1;
}

// Normalize admin headers: implementation of admin-ui needs to
// comprehend old wp-admin floating containers, such as Hello Dolly.
:global(.admin-ui-page) {
:global(.jp-admin-page__page) {
clear: both;
}

// admin-ui 2.0.0's header `visual` slot is a 24px grid box but does not
// center its contents. Our JetpackLogo is 20px tall, so without this it
// pins to the top-left of the cell and looks misaligned vs. the title.
// admin-ui ships the slot as `<div aria-hidden="true">` in the header.
// TODO: remove once upstream centers contents in `.header-visual`.
:global(.jp-admin-page__page > header [aria-hidden="true"]) {
place-items: center;
}

.admin-page-header {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ export type AdminPageProps = {
* Hidden when `tabs` is used.
*/
showBottomBorder?: boolean;

/**
* Render `children` directly inside the admin-ui Page, skipping the
* default `<Container fluid horizontalSpacing={0}><Col>{children}</Col></Container>`
* wrap. Use for full-bleed pages (DataViews-based admin surfaces, full-app
* dashboards) that own their own scroll/layout model and don't want the
* outer Container's grid to break their flex chain. Defaults to `false`.
*/
unwrapped?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export interface ToggleControlProps {
/** The label for the toggle. */
label?: ReactNode;

/** Accessible name for the underlying checkbox. Use when no visible `label` is rendered. */
'aria-label'?: string;

/** The size of the toggle. */
size?: 'small' | 'normal';

Expand All @@ -37,6 +40,7 @@ const ToggleControl: FC< ToggleControlProps > = ( {
help,
toggling,
label,
'aria-label': ariaLabel,
size = 'normal',
onChange,
} ) => {
Expand Down Expand Up @@ -67,6 +71,7 @@ const ToggleControl: FC< ToggleControlProps > = ( {
disabled={ disabled }
help={ help }
label={ label }
aria-label={ ariaLabel }
onChange={ handleOnChange }
/>
);
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@automattic/jetpack-script-data": "workspace:*",
"@automattic/number-formatters": "workspace:*",
"@babel/runtime": "^7",
"@wordpress/admin-ui": "1.12.0",
"@wordpress/admin-ui": "2.0.0",
"@wordpress/browserslist-config": "6.44.0",
"@wordpress/components": "32.6.0",
"@wordpress/compose": "7.44.0",
Expand Down
4 changes: 4 additions & 0 deletions projects/js-packages/webpack-config/changelog/update-admin-ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Remove the @wordpress/admin-ui CSS bundle workaround from the default request map.
6 changes: 0 additions & 6 deletions projects/js-packages/webpack-config/src/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ const defaultRequestMap = {
external: 'JetpackConnection',
handle: 'jetpack-connection',
},
// Bundle admin-ui CSS with our assets. The JS side is already handled by the
// DependencyExtractionPlugin's BUNDLED_PACKAGES list, but the CSS subpath import
// doesn't match that exact-match check and would be incorrectly externalized.
'@wordpress/admin-ui/build-style/style.css': {
external: false,
},
};

const DependencyExtractionPlugin = ( { requestMap, ...options } = {} ) => {
Expand Down
15 changes: 15 additions & 0 deletions projects/packages/activity-log/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Files not needed to be distributed.
.babelrc export-ignore
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore

# Files not needed in the production build.
.phpcs.dir.xml production-exclude
/changelog/** production-exclude
/tests/** production-exclude
types.d.ts production-exclude
/src/js/** production-exclude

# Files needed in the production build.
build/** production-include
6 changes: 6 additions & 0 deletions projects/packages/activity-log/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wordpress
node_modules
vendor
jetpack_vendor
.cache
build
13 changes: 13 additions & 0 deletions projects/packages/activity-log/.phan/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command-line arguments will be applied
* after this file is read.
*
* @package automattic/jetpack-activity-log
*/

// Require base config.
require __DIR__ . '/../../../../.phan/config.base.php';

return make_phan_config( dirname( __DIR__ ) );
24 changes: 24 additions & 0 deletions projects/packages/activity-log/.phpcs.dir.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset>

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="jetpack-activity-log" />
</property>
</properties>
</rule>
<rule ref="Jetpack.Functions.I18n">
<properties>
<property name="text_domain" value="jetpack-activity-log" />
</properties>
</rule>

<rule ref="WordPress.Utils.I18nTextDomainFixer">
<properties>
<property name="old_text_domain" type="array" />
<property name="new_text_domain" value="jetpack-activity-log" />
</properties>
</rule>

</ruleset>
33 changes: 33 additions & 0 deletions projects/packages/activity-log/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Activity Log

## UI primitives

When adding React UI in this package, prefer the WordPress Design System
packages in this order:

1. **`@wordpress/ui`** — foundational primitives. Check each component's
Storybook "Status" badge (anything other than "stable" is still in
flux); avoid experimental APIs here.
2. **`@wordpress/components`** — general-purpose legacy library.
Predates the design system. Use only when `@wordpress/ui` doesn't
have a stable equivalent, and still check Status in Storybook.
3. **`@wordpress/dataviews`** — higher-level data presentation (tables,
lists, grids). Already the backbone here. Extend via its
sub-components (`DataViews.Search`, `DataViews.FiltersToggle`,
`DataViews.Layout`, `DataViews.Footer`) before reaching for lower-
level primitives.
4. **`@wordpress/admin-ui`** — page layout primitives, accessed via
`AdminPage` from `@automattic/jetpack-components` (which wraps
admin-ui's `Page`).

Rationale: WordPress is moving new work to `@wordpress/ui`;
`@wordpress/components` is being kept as a legacy fallback. Guidance
from the WordPress Design System P2 (April 2026).

## Design-system lookup

A dedicated MCP server is wired into this project's local Claude Code
config: `@wordpress/design-system-mcp`. It exposes the authoritative
list of stable `@wordpress/ui` + `@wordpress/components` components and
`--wpds-*` design tokens. Prefer querying it over spelunking through
`node_modules/@wordpress/components/src/**` for component metadata.
10 changes: 10 additions & 0 deletions projects/packages/activity-log/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0-alpha - unreleased

Initial release.
Loading