Conversation
- Flip DEFAULT_VIEW.type from 'activity' to 'table' so new visitors land on the Date / Event / User columns instead of the timeline. Existing localStorage-persisted views are preserved by usePersistentView. - Forward upsell-callout.scss from the main entry style.scss via @use instead of relying on the side-effect import in UpsellCallout.tsx, so the rules land in the same chunk as the wrapper styles and the flex layout (image left, copy right on >= 782px) actually applies. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
…pgrade tooltips
- Add FreeTierToolbar that mirrors the DataViews default toolbar shape:
disabled SearchControl + disabled funnel button on the left, the real
DataViews.ViewConfig (cog) on the right. Each disabled affordance is
wrapped in a Tooltip explaining the upgrade requirement.
- Extend DateRangePicker with `disabled` + `disabledTooltipText` props.
When disabled, the trigger renders as a non-interactive Button (no
Dropdown / popover) wrapped in the upgrade tooltip — same hover target
and label as the paid trigger so the surface stays visually stable
across tiers.
- Mount the picker in AdminPage `actions` on both tiers; pass
`disabled={!hasActivityLogsAccess}` so the free tier sees the disabled
variant alongside the title/subtitle, matching the paid layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…abled> `<SearchControl>` from @wordpress/components destructures `disabled` out of restProps before forwarding to its StyledInputControl, so the prop was being silently dropped — leaving a fully functional input underneath the upgrade tooltip. Wrap it in a `<fieldset disabled>` instead, which natively disables every form control in its subtree regardless of what the wrapping component filters out, and reset the fieldset's default chrome so the layout doesn't shift. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ath the table The free tier caps the table at 20 rows and renders the upsell callout directly below it, but `.dataviews-layout__container`'s `overflow: auto` plus the wrapper's `flex: 1 1 auto` were giving the table its own scrollbar inside the page's middle column — pushing the upsell below the fold and making it look detached. Add a `--free-tier` modifier on the wrapper that drops the flex-grow and disarms the layout container's overflow, so the events list and the upsell render as one continuous block and the page's outer scroll column is the only one the user ever sees. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit's `--free-tier` rules were getting overruled by `jetpack-admin-page-layout`'s `.admin-ui-page > :not(.admin-ui-page__header):not(.jetpack-footer) > *` selector (one class + two `:not()`s outweighs our single class), which force-applies `flex: 1 1 auto` to every direct child of the scroll column and the same chain forces `.dataviews-wrapper` into a flex-grow fill. Bump our overrides with `!important` so the wrapper actually sizes to content and the inner scroll surface is disarmed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Card chrome: 1px border, 4px radius, 24/32px padding so the callout reads as a contained card instead of a full-bleed banner. - Reorder children (content first, image second) so on `flex-direction: row` the copy sits on the left and the illustration on the right — the column-reverse mobile fallback still keeps the copy on top. - Tighten title (20px / 12px gaps) and combine the two upgrade paragraphs into one so the layout matches the new product spec. - Update copy: "Track every action with Activity logs" / "site events" language / "Upgrade plan" CTA. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrap the free-tier DataViews + UpsellCallout pair in a single `.jp-activity-log__inner` div so `jetpack-admin-page-layout`'s `.admin-ui-page > :not(.admin-ui-page__header):not(.jetpack-footer) > *` chain (which force-applies `flex: 1 1 auto; flex-direction: column` to every direct child of the page's scroll column) lands on the inner wrapper instead of competing with our actual content. With the chain absorbed there, DataViews and the UpsellCallout are grandchildren and stack naturally — no specificity fight, no `!important` overrides. That structural change unlocks the new visual: cap `.dataviews-layout__container` at 280px and apply a `mask-image` linear gradient to its bottom edge so the table dissolves into the upsell card rather than colliding with it. The inner wrapper carries a local `overflow: auto` so a short viewport can still reveal the full upsell. Drops all four `!important` declarations from `src/js/style.scss` (the cascade fight they were patching no longer happens) and lets the upsell card's `flex-direction: row` rule at >=782px win on its own specificity, fixing the side-by-side image/copy layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…DataViews UI Per @simison's PR review: replicating DataViews' toolbar shape in `free-tier-toolbar.scss` will diverge the moment upstream changes anything in `@wordpress/dataviews`, and DataViews exposes no native prop for disabling its built-in `Search` / `FiltersToggle`. Switch to the alternative @simison suggested — leave the original DataViews UI in place and disable functionality with an overlay — which keeps the free-tier surface visually pixel-identical to paid, for free. Drop `FreeTierToolbar.tsx` and `free-tier-toolbar.scss` entirely. On free tier, render `<DataViews />` self-closing so its `DefaultUI` ships the real toolbar, then a single `useEffect` finds the `.dataviews__search` cluster and attaches `aria-disabled="true"`, a `title` for the upgrade nudge, and `tabindex="-1"` on every focusable descendant. CSS keyed on `[aria-disabled="true"]` dims the cluster, sets `cursor: not-allowed`, and applies `pointer-events: none` to the children so clicks fall through to the cluster (keeping it hoverable for the browser-native title tooltip). The cog (`.dataviews__view-actions`'s right-hand stack) sits outside the cluster, so the view-config popover stays usable. We avoid the `inert` attribute here even though it would be the crispest way to neutralize a subtree: Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge would never show. Keeping the cluster non-inert (just with non-functional children) restores the tooltip cross-browser. A `MutationObserver` re-applies the attributes after DataViews remounts the toolbar so React's render cycle doesn't strip them. Net effect: a single CSS hook (`.dataviews__search[aria-disabled]`) remains as a contact point with upstream, used purely to express the disabled state — no padding/gap/flex replication. If upstream renames the class, the controls degrade to "non-dimmed but still hoverable" rather than to "fake-disabled but functional", which is the safer failure mode. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
We should also update the illustration to match Jetpack's branding. |
| return; | ||
| } | ||
|
|
||
| if ( cluster.getAttribute( 'aria-disabled' ) !== 'true' ) { |
There was a problem hiding this comment.
Recommend to just set "inert" attribute in the wrapper or overlay which doesn't let clicks/interactions through. Anything else like done here is prone to be fragile and bug prone.
There was a problem hiding this comment.
inert won't let the tooltip work on Firefox.
| const tooltipText = __( 'Upgrade your plan to use this feature.', 'jetpack-activity-log' ); | ||
|
|
||
| const apply = ( root: ParentNode ) => { | ||
| const cluster = root.querySelector< HTMLElement >( '.dataviews__search' ); |
There was a problem hiding this comment.
This selector will go away eventually and we can't rely on it as a stable API.
| // cursor, and shuts off pointer events on the controls inside so | ||
| // clicks fall through to the cluster (keeping it hoverable for the | ||
| // browser-native title tooltip). | ||
| .dataviews__search[aria-disabled="true"] { |
There was a problem hiding this comment.
We can't rely on these selectors as stable API and in future it won't be there.
@keoshi do we have the illustration that we can update this to? |
|
@ilonagl Not yet, we'll have to create it. Or modify this one. |
…ion) (#48531) * Activity Log: revert free-tier search overlay to use inert Per #48527 (and the original PR #48418 review): the `aria-disabled` + `tabindex="-1"` + `pointer-events: none` triple was chosen to keep the `title` upgrade tooltip working in Firefox. We're accepting that tradeoff and going back to the cleaner `inert` attribute, which blocks pointer + keyboard interaction and hides descendants from the a11y tree in one shot. Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge won't appear there — accepted per the issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: refresh free-tier upsell illustration + lowercase title - Swap the upsell callout illustration for the Jetpack-branded version (per #48418 (comment)). Filename kept as `activity-logs-callout-illustration.svg` so the webpack import in `UpsellCallout.tsx` resolves untouched. - Lowercase "activity logs" in the upsell title — sentence case to match Jetpack copy conventions. - Drop the inert-revert changelog from the previous commit; that change has no user-visible behavior shift, so a single user-benefit entry covering the visible refresh suffices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: deep-link Manage backup action to Calypso restore flow The DataViews "Manage backup" row action was a disabled placeholder waiting for a future Backup wp-admin page. Wire it up to open Calypso's Backup restore flow for the row's rewind point in a new tab — `https://wordpress.com/backup/{calypsoSlug}/restore/{rewindId}` — which gives users an actionable path today without waiting on the in-progress port. - `actions.tsx`: read `calypsoSlug` from Initial_State at module load, render the action only when the row is rewindable AND has a `rewindId` AND a slug is available, and on click `window.open` the Calypso URL with `noopener,noreferrer`. Also accept an optional `tracks` handle and emit a `jetpack_activity_log_manage_backup_click` event. - `index.tsx`: pass `tracks` through to `useActivityActions`, and drop the "Coming soon" tooltip MutationObserver effect — the action is no longer disabled so the textContent-matching DOM hack is obsolete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: point Manage backup at cloud.jetpack.com instead of WPCOM Jetpack Cloud (cloud.jetpack.com) is the Jetpack-branded analog of the Calypso Backup flow and is what we want users to land on from a Jetpack admin surface. Swap the deep-link host accordingly: `https://cloud.jetpack.com/backup/{calypsoSlug}/restore/{rewindId}`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: rename action to "Restore backup", flag link as temporary - Label "Manage backup" → "Restore backup" — the button opens the Backup restore flow, so the label should describe that. - Tracks event renamed in lockstep: jetpack_activity_log_manage_backup_click → jetpack_activity_log_restore_backup_click. - Document in the hook's docblock that the cloud.jetpack.com deep-link is a stop-gap until the Backup wp-admin port (#48236) lands. After that ships, every row action here should point at the in-admin Backup page instead of cloud.jetpack.com so users stay inside their own wp-admin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ion) (#48531) * Activity Log: revert free-tier search overlay to use inert Per #48527 (and the original PR #48418 review): the `aria-disabled` + `tabindex="-1"` + `pointer-events: none` triple was chosen to keep the `title` upgrade tooltip working in Firefox. We're accepting that tradeoff and going back to the cleaner `inert` attribute, which blocks pointer + keyboard interaction and hides descendants from the a11y tree in one shot. Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge won't appear there — accepted per the issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: refresh free-tier upsell illustration + lowercase title - Swap the upsell callout illustration for the Jetpack-branded version (per Automattic/jetpack#48418 (comment)). Filename kept as `activity-logs-callout-illustration.svg` so the webpack import in `UpsellCallout.tsx` resolves untouched. - Lowercase "activity logs" in the upsell title — sentence case to match Jetpack copy conventions. - Drop the inert-revert changelog from the previous commit; that change has no user-visible behavior shift, so a single user-benefit entry covering the visible refresh suffices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: deep-link Manage backup action to Calypso restore flow The DataViews "Manage backup" row action was a disabled placeholder waiting for a future Backup wp-admin page. Wire it up to open Calypso's Backup restore flow for the row's rewind point in a new tab — `https://wordpress.com/backup/{calypsoSlug}/restore/{rewindId}` — which gives users an actionable path today without waiting on the in-progress port. - `actions.tsx`: read `calypsoSlug` from Initial_State at module load, render the action only when the row is rewindable AND has a `rewindId` AND a slug is available, and on click `window.open` the Calypso URL with `noopener,noreferrer`. Also accept an optional `tracks` handle and emit a `jetpack_activity_log_manage_backup_click` event. - `index.tsx`: pass `tracks` through to `useActivityActions`, and drop the "Coming soon" tooltip MutationObserver effect — the action is no longer disabled so the textContent-matching DOM hack is obsolete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: point Manage backup at cloud.jetpack.com instead of WPCOM Jetpack Cloud (cloud.jetpack.com) is the Jetpack-branded analog of the Calypso Backup flow and is what we want users to land on from a Jetpack admin surface. Swap the deep-link host accordingly: `https://cloud.jetpack.com/backup/{calypsoSlug}/restore/{rewindId}`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: rename action to "Restore backup", flag link as temporary - Label "Manage backup" → "Restore backup" — the button opens the Backup restore flow, so the label should describe that. - Tracks event renamed in lockstep: jetpack_activity_log_manage_backup_click → jetpack_activity_log_restore_backup_click. - Document in the hook's docblock that the cloud.jetpack.com deep-link is a stop-gap until the Backup wp-admin port (#48236) lands. After that ships, every row action here should point at the in-admin Backup page instead of cloud.jetpack.com so users stay inside their own wp-admin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/25447243760 Upstream-Ref: Automattic/jetpack@ab3cad2
…ion) (#48531) * Activity Log: revert free-tier search overlay to use inert Per #48527 (and the original PR #48418 review): the `aria-disabled` + `tabindex="-1"` + `pointer-events: none` triple was chosen to keep the `title` upgrade tooltip working in Firefox. We're accepting that tradeoff and going back to the cleaner `inert` attribute, which blocks pointer + keyboard interaction and hides descendants from the a11y tree in one shot. Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge won't appear there — accepted per the issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: refresh free-tier upsell illustration + lowercase title - Swap the upsell callout illustration for the Jetpack-branded version (per Automattic/jetpack#48418 (comment)). Filename kept as `activity-logs-callout-illustration.svg` so the webpack import in `UpsellCallout.tsx` resolves untouched. - Lowercase "activity logs" in the upsell title — sentence case to match Jetpack copy conventions. - Drop the inert-revert changelog from the previous commit; that change has no user-visible behavior shift, so a single user-benefit entry covering the visible refresh suffices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: deep-link Manage backup action to Calypso restore flow The DataViews "Manage backup" row action was a disabled placeholder waiting for a future Backup wp-admin page. Wire it up to open Calypso's Backup restore flow for the row's rewind point in a new tab — `https://wordpress.com/backup/{calypsoSlug}/restore/{rewindId}` — which gives users an actionable path today without waiting on the in-progress port. - `actions.tsx`: read `calypsoSlug` from Initial_State at module load, render the action only when the row is rewindable AND has a `rewindId` AND a slug is available, and on click `window.open` the Calypso URL with `noopener,noreferrer`. Also accept an optional `tracks` handle and emit a `jetpack_activity_log_manage_backup_click` event. - `index.tsx`: pass `tracks` through to `useActivityActions`, and drop the "Coming soon" tooltip MutationObserver effect — the action is no longer disabled so the textContent-matching DOM hack is obsolete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: point Manage backup at cloud.jetpack.com instead of WPCOM Jetpack Cloud (cloud.jetpack.com) is the Jetpack-branded analog of the Calypso Backup flow and is what we want users to land on from a Jetpack admin surface. Swap the deep-link host accordingly: `https://cloud.jetpack.com/backup/{calypsoSlug}/restore/{rewindId}`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: rename action to "Restore backup", flag link as temporary - Label "Manage backup" → "Restore backup" — the button opens the Backup restore flow, so the label should describe that. - Tracks event renamed in lockstep: jetpack_activity_log_manage_backup_click → jetpack_activity_log_restore_backup_click. - Document in the hook's docblock that the cloud.jetpack.com deep-link is a stop-gap until the Backup wp-admin port (#48236) lands. After that ships, every row action here should point at the in-admin Backup page instead of cloud.jetpack.com so users stay inside their own wp-admin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/25447243760 Upstream-Ref: Automattic/jetpack@ab3cad2
…ion) (#48531) * Activity Log: revert free-tier search overlay to use inert Per #48527 (and the original PR #48418 review): the `aria-disabled` + `tabindex="-1"` + `pointer-events: none` triple was chosen to keep the `title` upgrade tooltip working in Firefox. We're accepting that tradeoff and going back to the cleaner `inert` attribute, which blocks pointer + keyboard interaction and hides descendants from the a11y tree in one shot. Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge won't appear there — accepted per the issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: refresh free-tier upsell illustration + lowercase title - Swap the upsell callout illustration for the Jetpack-branded version (per Automattic/jetpack#48418 (comment)). Filename kept as `activity-logs-callout-illustration.svg` so the webpack import in `UpsellCallout.tsx` resolves untouched. - Lowercase "activity logs" in the upsell title — sentence case to match Jetpack copy conventions. - Drop the inert-revert changelog from the previous commit; that change has no user-visible behavior shift, so a single user-benefit entry covering the visible refresh suffices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: deep-link Manage backup action to Calypso restore flow The DataViews "Manage backup" row action was a disabled placeholder waiting for a future Backup wp-admin page. Wire it up to open Calypso's Backup restore flow for the row's rewind point in a new tab — `https://wordpress.com/backup/{calypsoSlug}/restore/{rewindId}` — which gives users an actionable path today without waiting on the in-progress port. - `actions.tsx`: read `calypsoSlug` from Initial_State at module load, render the action only when the row is rewindable AND has a `rewindId` AND a slug is available, and on click `window.open` the Calypso URL with `noopener,noreferrer`. Also accept an optional `tracks` handle and emit a `jetpack_activity_log_manage_backup_click` event. - `index.tsx`: pass `tracks` through to `useActivityActions`, and drop the "Coming soon" tooltip MutationObserver effect — the action is no longer disabled so the textContent-matching DOM hack is obsolete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: point Manage backup at cloud.jetpack.com instead of WPCOM Jetpack Cloud (cloud.jetpack.com) is the Jetpack-branded analog of the Calypso Backup flow and is what we want users to land on from a Jetpack admin surface. Swap the deep-link host accordingly: `https://cloud.jetpack.com/backup/{calypsoSlug}/restore/{rewindId}`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: rename action to "Restore backup", flag link as temporary - Label "Manage backup" → "Restore backup" — the button opens the Backup restore flow, so the label should describe that. - Tracks event renamed in lockstep: jetpack_activity_log_manage_backup_click → jetpack_activity_log_restore_backup_click. - Document in the hook's docblock that the cloud.jetpack.com deep-link is a stop-gap until the Backup wp-admin port (#48236) lands. After that ships, every row action here should point at the in-admin Backup page instead of cloud.jetpack.com so users stay inside their own wp-admin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/25447243760 Upstream-Ref: Automattic/jetpack@ab3cad2
…ion) (#48531) * Activity Log: revert free-tier search overlay to use inert Per #48527 (and the original PR #48418 review): the `aria-disabled` + `tabindex="-1"` + `pointer-events: none` triple was chosen to keep the `title` upgrade tooltip working in Firefox. We're accepting that tradeoff and going back to the cleaner `inert` attribute, which blocks pointer + keyboard interaction and hides descendants from the a11y tree in one shot. Firefox suppresses `title` tooltips inside an inert subtree, so the upgrade nudge won't appear there — accepted per the issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: refresh free-tier upsell illustration + lowercase title - Swap the upsell callout illustration for the Jetpack-branded version (per #48418 (comment)). Filename kept as `activity-logs-callout-illustration.svg` so the webpack import in `UpsellCallout.tsx` resolves untouched. - Lowercase "activity logs" in the upsell title — sentence case to match Jetpack copy conventions. - Drop the inert-revert changelog from the previous commit; that change has no user-visible behavior shift, so a single user-benefit entry covering the visible refresh suffices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: deep-link Manage backup action to Calypso restore flow The DataViews "Manage backup" row action was a disabled placeholder waiting for a future Backup wp-admin page. Wire it up to open Calypso's Backup restore flow for the row's rewind point in a new tab — `https://wordpress.com/backup/{calypsoSlug}/restore/{rewindId}` — which gives users an actionable path today without waiting on the in-progress port. - `actions.tsx`: read `calypsoSlug` from Initial_State at module load, render the action only when the row is rewindable AND has a `rewindId` AND a slug is available, and on click `window.open` the Calypso URL with `noopener,noreferrer`. Also accept an optional `tracks` handle and emit a `jetpack_activity_log_manage_backup_click` event. - `index.tsx`: pass `tracks` through to `useActivityActions`, and drop the "Coming soon" tooltip MutationObserver effect — the action is no longer disabled so the textContent-matching DOM hack is obsolete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: point Manage backup at cloud.jetpack.com instead of WPCOM Jetpack Cloud (cloud.jetpack.com) is the Jetpack-branded analog of the Calypso Backup flow and is what we want users to land on from a Jetpack admin surface. Swap the deep-link host accordingly: `https://cloud.jetpack.com/backup/{calypsoSlug}/restore/{rewindId}`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Activity Log: rename action to "Restore backup", flag link as temporary - Label "Manage backup" → "Restore backup" — the button opens the Backup restore flow, so the label should describe that. - Tracks event renamed in lockstep: jetpack_activity_log_manage_backup_click → jetpack_activity_log_restore_backup_click. - Document in the hook's docblock that the cloud.jetpack.com deep-link is a stop-gap until the Backup wp-admin port (#48236) lands. After that ships, every row action here should point at the in-admin Backup page instead of cloud.jetpack.com so users stay inside their own wp-admin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follow-up to #48244.
Proposed changes
DEFAULT_VIEW.typewas'activity'; flip it to'table'and use the table-sidefields/layoutalready declared inDEFAULT_LAYOUTS.table. Existing visitors keep whatever they had —usePersistentViewonly falls back to the new default for fresh sessions or after the user clicks "Reset view"..jp-activity-log__innerwrapper between.jp-activity-log__dataviews-wrapperand DataViews/UpsellCallout absorbsjetpack-admin-page-layout's.admin-ui-page > :not(...):not(...) > *chain, which would otherwise force every direct child toflex: 1 1 auto; flex-direction: columnand prevent the upsell from sitting at content height alongside the table..dataviews-layout__containeris capped at 280px and given amask-image: linear-gradient(...)so the bottom edge of the events list dissolves into the upsell card.!importantoverrides previously added to fight the cascade are gone — the new structure wins on specificity alone.FreeTierToolbarapproach) would diverge upstream the moment@wordpress/dataviewsevolves. Switch to the alternative they suggested — leave the original DataViews UI in place and disable functionality with an overlay:<DataViews />self-closing so DataViews ships its ownDefaultUI(search + filter toggle + cog).useEffectfinds.dataviews__searchand appliesaria-disabled="true", atitlefor the upgrade nudge, andtabindex="-1"on every focusable descendant. CSS keyed on[aria-disabled="true"]dims the cluster, setscursor: not-allowed, and appliespointer-events: noneto the children so clicks fall through to the cluster and the browser-native title tooltip fires on hover..dataviews__view-actions's right-hand stack) sits outside the cluster, so the view-config popover stays functional.inertattribute because Firefox suppressestitletooltips inside an inert subtree. AMutationObserverre-applies the attributes after DataViews remounts the toolbar so React's render cycle doesn't strip them.FreeTierToolbar.tsxandfree-tier-toolbar.scssentirely. The only remaining contact point with an upstream class is.dataviews__search[aria-disabled="true"]— a single, narrow CSS hook that degrades safely (controls undimmed but still hoverable) if upstream renames the class.DateRangePickergainsdisabled+disabledTooltipTextprops. Whendisabled, it short-circuits the<Dropdown>and renders just a non-interactive<Button>(same trigger markup, same label) wrapped in the upgrade tooltip — so the AdminPage header looks identical across tiers.Related product discussion/links
client/dashboard/sites/logs-activity/Does this pull request change what data or activity we track or use?
No.
Testing instructions
Setup: pull this branch,
jetpack install plugins/jetpack,jetpack build packages/activity-log. Visitadmin.php?page=jetpack-activity-logon a Jetpack-connected, non-multisite,manage_optionsuser.Default layout — paid tier (Backup-enabled site):
jetpack-activity-log:view:*entry (or use a fresh browser profile).Default layout — free tier (no Backup plan, e.g. fresh JN site):
not-allowedcursor on hover. Click them → nothing happens. Hover → "Upgrade your plan to use this feature." appears as a native browser tooltip. Tab through the page → focus skips them. The cog on the right is enabled and opens the view-config popover (perPage selector locked to 20).titleinsideinertsubtrees, hence thearia-disabled+tabindex="-1"overlay rather thaninert.)Free-tier table fade + upsell card layout:
.jp-activity-log__upsell-calloutand confirmdisplay: flexandflex-direction: row(orcolumn-reverseon narrow viewports) are computed —grep -n '!important' projects/packages/activity-log/src/js/style.scssreturns nothing.Server-side gating (security boundary):
wp.apiFetch({ path: '/jetpack/v4/activity-log/list?text_search=foo' })). The response should still be the 20 most recent events overall —REST_Controller::get_activity_log()stripstext_search,after,before,group, andnot_groupand clampsnumberto 20 /pageto 1 whenhas_activity_logs_access()isfalse.Regression spot-checks (existing PR #48244 behavior):
Apr 30, 2026) still render when the user explicitly switches to that layout via the cog.useProductCheckoutWorkflowtojetpack_security_t1_yearlyand the post-checkoutrefresh_accessnonce still drops the cached access flag.