Skip to content

tasks: include withTooltips prop in dashboard-pie-chart spec#34

Merged
dognose24 merged 1 commit into
trunkfrom
tools/pie-chart-task-add-withtooltips
May 15, 2026
Merged

tasks: include withTooltips prop in dashboard-pie-chart spec#34
dognose24 merged 1 commit into
trunkfrom
tools/pie-chart-task-add-withtooltips

Conversation

@dognose24
Copy link
Copy Markdown
Owner

Fixes RSM-3271

Proposed changes

Update projects/packages/premium-analytics/tasks/dashboard-pie-chart.md's Implementation section so the PieChartUnresponsive example includes the withTooltips prop. Without it the chart skips its mouse handlers and never mounts the visx tooltip portal, so the hover acceptance check (added in PR #28 / RSM-3217's DoD bundle) fails on toBeVisible() before the regression injection can even run.

Two edits, plus a one-line rationale:

  • Rendering JSX example — adds withTooltips to the inline snippet.
  • Final stage.tsx body — adds withTooltips to the full file example so an agent following the spec verbatim produces matching code.
  • Inline rationale — one sentence above the JSX explaining why the prop is required (so a contributor reading the spec knows it's load-bearing, not stylistic).

How was this discovered

Sandbox run of /premium-analytics-implement-task for the pie-chart task (PR #30): Step 4 verify-ui failed on the first attempt because .visx-tooltip never appeared. The agent diagnosed it correctly (PieChartUnresponsive defaults to withTooltips={false}), added the prop manually, and proceeded. The spec should have it in the first place so unattended runs don't need that out-of-band recovery.

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

No — task spec / docs only, no code or behavior change.

Testing instructions

This is a docs-only update to a task spec. Read through projects/packages/premium-analytics/tasks/dashboard-pie-chart.md and confirm both the Rendering snippet and the final stage.tsx example carry withTooltips, plus the one-line note explaining it.

Related

…g example

The hover acceptance check added in PR #28 (RSM-3217's DoD bundle) asserts `.visx-tooltip` content. `PieChartUnresponsive` defaults to `withTooltips={false}` — no mouse handlers, no tooltip portal — so without the prop the spec fails on toBeVisible before the regression injection can even run.

Observed in the dashboard-pie-chart sandbox run (PR #30): Step 4 verify-ui failed initially, agent had to diagnose visx defaults and add the prop manually before the suite went green. Fixing the spec makes the task reproducible without that out-of-band recovery.

Updates both the Rendering JSX example and the final `stage.tsx` body to include `withTooltips`, plus a one-line note explaining why it's required.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

@copilot review

@github-actions
Copy link
Copy Markdown

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!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Premium Analytics dashboard pie chart task spec so agents and contributors include the withTooltips prop required for the existing hover/tooltip Playwright acceptance check to run correctly.

Changes:

  • Add a short rationale explaining why withTooltips is required for the hover acceptance check.
  • Update both the inline JSX snippet and the full stage.tsx example to pass withTooltips to PieChartUnresponsive.
  • Add a changelogger entry noting this is an internal/spec update (no user-facing package change).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
projects/packages/premium-analytics/tasks/dashboard-pie-chart.md Updates the task’s rendering examples and adds a rationale so pie-chart-tooltip.spec.ts can exercise the tooltip/hover behavior.
projects/packages/premium-analytics/changelog/add-pie-chart-task-withtooltips Records the internal tooling/spec update in the package changelogger format.

@dognose24 dognose24 merged commit ee0c263 into trunk May 15, 2026
60 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants