Skip to content

Activity Log: default to Table layout and fix free-tier upsell layout#48417

Closed
ilonagl wants to merge 1 commit into
trunkfrom
claude/sharp-wu-0a51bd
Closed

Activity Log: default to Table layout and fix free-tier upsell layout#48417
ilonagl wants to merge 1 commit into
trunkfrom
claude/sharp-wu-0a51bd

Conversation

@ilonagl
Copy link
Copy Markdown
Contributor

@ilonagl ilonagl commented Apr 30, 2026

Follow-up to #48244.

Proposed changes

  • Default the Activity Log page to the Table layout. DEFAULT_VIEW.type was 'activity'; flip it to 'table' and use the table-side fields / layout already declared in DEFAULT_LAYOUTS.table. Existing visitors keep whatever they had — usePersistentView only falls back to the new default for fresh sessions or after the user clicks "Reset view".
  • Fix the free-tier upsell callout layout. On a fresh JN install the UpsellCallout was rendering with the illustration on top of the copy (default block flow) instead of the side-by-side row layout upsell-callout.scss prescribes. Forward the stylesheet from the main entry style.scss via @use so the rules ride the same chunk as the wrapper styles (DataViews CSS, .jp-activity-log__dataviews-wrapper, etc.) instead of relying on a side-effect import from UpsellCallout.tsx that wasn't reaching the deployed bundle. The JS-side import is dropped to avoid a double emit.

Related product discussion/links

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. Visit admin.php?page=jetpack-activity-log on a Jetpack-connected, non-multisite, manage_options user.

Default layout — paid tier (Backup-enabled site):

  1. In DevTools → Application → Local Storage, delete any jetpack-activity-log:view:* entry (or use a fresh browser profile).
  2. Reload the page. The DataViews surface should render as a Table with three columns — Date & time / Event / User — not the vertical Activity timeline.
  3. Open the cog popover → confirm the layout switcher shows Table selected. Switching to Activity should still work and surface the timeline + day grouping. Switching back to Table should return to step 2's layout.
  4. After any layout change, refresh — the choice persists via localStorage.

Default layout — free tier (no Backup plan, e.g. fresh JN site):

  1. Same steps as 1–2: the table renders with three columns. Search / filter / cog toolbar is hidden (free tier intentionally strips the toolbar via <DataViews.Layout />), pagination is absent, and the table caps at 20 rows.

Upsell callout layout (free tier, viewport ≥ 782px):

  1. Scroll to the upsell callout below the table. The illustration should sit on the left with the title / paragraphs / Upgrade button on the right, vertically centered — not stacked.
  2. Resize the browser below 782px (or use DevTools' device toolbar). The layout flips to column-reverse: copy on top, illustration below.
  3. DevTools → Elements → inspect .jp-activity-log__upsell-callout and confirm display: flex and flex-direction: row (or column-reverse on narrow viewports) are computed — i.e. the rules from upsell-callout.scss reach the page.

Regression spot-checks (existing PR #48244 behavior):

  1. Reset view (cog → Reset view) on a paid-tier site after switching to Activity layout — confirm the view returns to the new Table default and the cog "modified" indicator clears.
  2. The Activity layout's day-group headers (Apr 30, 2026) still render when the user explicitly switches to that layout via the cog.

- 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the claude/sharp-wu-0a51bd branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack claude/sharp-wu-0a51bd

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: May 5, 2026
    • Code freeze: May 4, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@ilonagl
Copy link
Copy Markdown
Contributor Author

ilonagl commented Apr 30, 2026

Closed by branch rename — superseded by #48418 with identical content.

@jp-launch-control
Copy link
Copy Markdown

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Activity Log [Package] Activity Log [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant