Skip to content

Premium Analytics: give the post detail email tabs an email header identity - #51260

Merged
dognose24 merged 2 commits into
trunkfrom
wooa7s-1762-email-tab-header-identity
Aug 14, 2026
Merged

Premium Analytics: give the post detail email tabs an email header identity#51260
dognose24 merged 2 commits into
trunkfrom
wooa7s-1762-email-tab-header-identity

Conversation

@dognose24

@dognose24 dognose24 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Per-tab header identity for the post detail page, from WOOA7S-1762 and the updated design mocks:

  • On the Email opens / Email clicks tabs, the shared header now carries an email identity: a brand-tinted envelope tile instead of the featured-image thumbnail, and "Email sent on …" instead of "Post published on …". The title and the performance window stay the post's.
  • The Post traffic tab is unchanged (featured image or type-glyph placeholder, publish wording).

The sent date reuses the publish date: WordPress.com sends the newsletter when the post publishes, and the email stats API exposes no separate send timestamp (verified against stats/opens/emails/{id}/rate, stats/emails/summary — whose date equals the post date — and the timeline endpoint). If a real send timestamp ever lands server-side, only the value feeding the sentence changes.

Out of scope (still on WOOA7S-1762): the "Performance: All time" subtitle wording, which depends on the All time preset work under WOOA7S-1793.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • Build packages/premium-analytics and open the Premium Analytics dashboard.
  • Open a post report for a post that was sent as a newsletter.
  • Post traffic tab: header shows the featured image (or type glyph) and "Post published on ."
  • Email opens / Email clicks tabs: header shows the tinted envelope tile — even when the post has a featured image — and "Email sent on ."
  • pnpm run test routes/post-detail passes.

🤖 Generated with Claude Code

Screenshots

Email opens tab header.

Before After
截圖 2026-08-14 凌晨1 19 18 截圖 2026-08-14 凌晨1 13 41

Email clicks tab header.

Before After
截圖 2026-08-14 凌晨1 19 26 截圖 2026-08-14 凌晨1 13 52

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dognose24
dognose24 requested a review from a team as a code owner August 13, 2026 16:47
@dognose24 dognose24 added the [Status] Needs Review This PR is ready for review. label Aug 13, 2026
@dognose24 dognose24 self-assigned this Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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 or WordPress.com Site Helper), and enable the wooa7s-1762-email-tab-header-identity branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack wooa7s-1762-email-tab-header-identity
bin/jetpack-downloader test jetpack-mu-wpcom-plugin wooa7s-1762-email-tab-header-identity

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

@dognose24
dognose24 requested a review from chihsuan August 13, 2026 16:54
@jp-launch-control

jp-launch-control Bot commented Aug 13, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/premium-analytics/routes/post-detail/config/tabs.ts 9/10 (90.00%) 1.11% 0 💚
projects/packages/premium-analytics/routes/post-detail/components/post-summary-card/post-summary-card.tsx 15/16 (93.75%) 93.75% -8 💚

Full summary · PHP report · JS report

@github-actions

Copy link
Copy Markdown
Contributor

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!

chihsuan
chihsuan previously approved these changes Aug 14, 2026

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! @dognose24 Overall, this is looking good.

Just left a few minor comments.

I also noticed one thing we could consider improving in a follow-up. Currently when page is loading, it show a default description and placeholder image. I think we can considering showing loading spinner or skeleton instead (after skeleton PR is merged).

Screen.Recording.2026-08-14.at.10.37.30.AM.mov

performance window stay the post's. */ }
<PostSummaryCard
summary={ summary }
variant={ activeTab === 'post-traffic' ? 'post' : 'email' }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could we key this off the email tab list instead of excluding post-traffic?

We can exporting EMAIL_TAB_IDS and inverting the check makes the default fail closed:

variant={ EMAIL_TAB_IDS.includes( activeTab ) ? 'email' : 'post' }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 12d0035 — exported EMAIL_TAB_IDS from the tabs config and keyed the variant off it, so a future tab defaults to the post identity unless added to the list.

// weak interactive tokens are the only weak brand pair in the set; the tile
// is not interactive, but the mapping keeps it on theme tokens.
.emailTile {
background: var(--wpds-color-background-interactive-brand-weak-active);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth using --wpds-color-background-surface-brand instead here?

The comment above says the weak interactive tokens are the only weak brand pair, but --wpds-color-background-surface-brand (#ecf0fa) is the non-interactive brand surface.

Screen.Recording.2026-08-14.at.10.50.07.AM.mov

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right — --wpds-color-background-surface-brand is the non-interactive brand surface, my comment had it backwards. Switched the tile background to it (and corrected the comment) in 12d0035.

…brand surface token

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dognose24

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Both nits addressed in 12d0035. Agreed on the loading treatment — once the skeleton PR lands, the header placeholder is a good candidate to adopt it; noted as a follow-up.

@dognose24
dognose24 merged commit 7d65468 into trunk Aug 14, 2026
84 checks passed
@dognose24
dognose24 deleted the wooa7s-1762-email-tab-header-identity branch August 14, 2026 06:07
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Review This PR is ready for review. labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Premium Analytics [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants