Skip to content

Give each content activity line its own style - #811

Draft
ilicfilip wants to merge 3 commits into
developfrom
filip/graph-line-styles
Draft

ilicfilip wants to merge 3 commits into
developfrom
filip/graph-line-styles

Conversation

@ilicfilip

@ilicfilip ilicfilip commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Implements https://github.com/ProgressPlanner/progress-planner-pro/issues/199

What this does

The content activity graph drew published, updated and deleted as three solid lines, which were hard to tell apart. Following Mijke's design:

Series Line Colour (unchanged)
published solid --prpl-graph-color-2
updated dotted --prpl-graph-color-3
deleted dashed --prpl-graph-color-4
  • Each legend label now has a sample of its line underneath it. The sample fades when the series is hidden.
  • prpl-chart-line takes an optional lineStyle (solid / dotted / dashed) per series in dataArgs. The default is solid, so other uses of the component don't change.
  • No new colour names; nothing changes in branding-api.

Notes for design

  • Mijke's design doesn't give dash or gap sizes, so these are matched to the mockup. Dots are round, 1.5 line-widths wide (a thin dotted line reads lighter than a solid one) and 1.75 dot-widths apart. Dashes are three line-widths long with a two line-width gap. The solid and dashed lines render at about 2px.
  • Already different from the mockup before this PR, and left as they are: the "show:" label is lowercase, the legend squares have a white ring, and the chart has grid lines.

Testing

  1. Open Progress Planner and find the Content activity widget.
  2. Check the three line styles in the chart and in the legend.
  3. Click a legend label: its line disappears and its sample fades. Click again to bring it back.
  4. Check at a narrow width.

Checked in the browser on the Zonnet brand at 1400px and 420px; the console is clean. wp-scripts lint-js and composer check-cs pass.

Screenshots

Screenshot 2026-11-25 at 11 23 34

The content activity graph drew published, updated and deleted as three
solid lines, which were hard to tell apart. Updated is now dotted and
deleted dashed; published stays solid. Each legend label shows a sample
of its line, which fades when the series is hidden.

The line chart reads an optional lineStyle (solid, dotted or dashed)
per series. Colours are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Test on Playground
Test this pull request on the Playground
or download the zip

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Plugin readme preview

Open preview · Commit d717a48

35 passed · 0 warnings · 2 notes

Notes (2)
  • screenshot-8.png has no caption in the Screenshots section.
  • screenshot-9.png has no caption in the Screenshots section.
Passed checks (35)
  • 144 / 150 characters in the short description.
  • Plugin name header recognized.
  • License header recognized: GPL3+.
  • 4 tags accepted within the five-tag limit.
  • Description is within the parser’s word limit.
  • Installation is within the parser’s word limit.
  • Faq is within the parser’s word limit.
  • Changelog is within the parser’s word limit.
  • Tested up to 7.1, the latest WordPress major release.
  • Stable tag is declared: 1.10.1.
  • The PHP Version header is declared: 1.10.1.
  • Stable tag matches the PHP Version header: 1.10.1.
  • The readme “Requires at least” value is valid: 6.7.
  • The PHP “Requires at least” header is a numeric version: 6.7.
  • “Requires at least” matches between the readme and PHP header: 6.7.
  • The readme “Requires PHP” value is valid: 7.4.
  • The PHP “Requires PHP” header is a numeric version: 7.4.
  • “Requires PHP” matches between the readme and PHP header: 7.4.
  • “Tested up to” 7.1 meets the minimum WordPress version 6.7.
  • Installation content is present.
  • FAQ content is present.
  • Changelog content is present.
  • Screenshot captions are present.
  • The first changelog release matches Stable tag: 1.10.1.
  • The first changelog release matches PHP Version: 1.10.1.
  • Banner image loaded.
  • Plugin icon loaded.
  • Screenshot 1 has a matching image and caption.
  • Screenshot 2 has a matching image and caption.
  • Screenshot 3 has a matching image and caption.
  • Screenshot 4 has a matching image and caption.
  • Screenshot 5 has a matching image and caption.
  • Screenshot 6 has a matching image and caption.
  • Screenshot 7 has a matching image and caption.
  • Plugin PHP header loaded.

Readme and PHP-header checks only; this does not test plugin runtime compatibility.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
10 0 10

⚠️ Warnings (10)

📁 classes/suggested-tasks/data-collector/class-unpublished-content.php (1 warning)
📍 Line 🔖 Check 💬 Message
103 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
📁 classes/suggested-tasks/providers/class-content-review.php (4 warnings)
📍 Line 🔖 Check 💬 Message
232 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
377 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
381 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
388 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
📁 classes/activities/class-query.php (2 warnings)
📍 Line 🔖 Check 💬 Message
71 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58.
163 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153.
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
📍 Line 🔖 Check 💬 Message
111 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98.
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
📍 Line 🔖 Check 💬 Message
108 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106.
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
📍 Line 🔖 Check 💬 Message
120 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@github-actions

Copy link
Copy Markdown
Contributor

✅ Code Coverage Report

Metric Value
Total Coverage 35.07% 📉
Base Coverage 35.07%
Difference 📈 0.00%

⚠️ Coverage below recommended 40% threshold

🎉 Great job maintaining/improving code coverage!

ℹ️ About this report
  • All tests run in a single job with Xdebug coverage
  • Security tests excluded from coverage to prevent output issues
  • Coverage calculated from line coverage percentages

ilicfilip and others added 2 commits November 25, 2026 11:18
Thin 2px dots spaced two line-widths apart read lighter than the solid
and dashed lines. Dots are now 1.5 line-widths wide and 1.75 dot-widths
apart, matching the design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line under each legend label was as wide as the widest label, so it
ran past shorter words. It is now positioned under its own label and
matches its width.

Translated labels are longer: in Dutch the legend was 25px wider than
the widget and ran past its edge. The legend items are now grouped and
wrap as one block, so with long translations the "show:" label moves to
its own line and the three items stay together on the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ilicfilip

Copy link
Copy Markdown
Collaborator Author

Review pass

Re-checked this PR against pro#199 and Mijke's mockups, and had the code reviewed again.

No changes needed.

  • Solid / dotted / dashed lines, legend line samples, and the translated layouts (NL, DE, FR) all match.
  • The "show:" label stays lowercase on purpose. The mockups have "Show:", but changing the string would break the existing translations.
  • Minor, not changed: the dotted legend line can run 1–2px past its label because of the round line ends. It isn't visible at normal size.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant