Skip to content

Theme: Show how often each pattern was favorited on My patterns - #820

Open
obenland wants to merge 1 commit into
trunkfrom
claude/gh-pattern-directory-694
Open

obenland wants to merge 1 commit into
trunkfrom
claude/gh-pattern-directory-694

Conversation

@obenland

@obenland obenland commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fixes #694

The My patterns grid puts an Edit link where the other pattern grids show the favorite button, so authors can no longer see how many times their patterns were favorited, which the previous theme showed.

This adds the favorite button with its count (the same block the other grids use) beside the Edit link on each card. It shows on every card, drafts included, as the single-pattern view does; hiding it on unpublished patterns would be an easy follow-up if preferred.

Testing

  • bin/check (composer lint, CSS/JS lint, PHPUnit, JS unit tests): all pass.
  • No regression test: the change is block markup in a pattern file, which the PHPUnit suite does not render.
  • Manually: log in with an account that has patterns, open My patterns, and check that each card shows a heart and count next to Edit, at desktop and phone widths.

Screenshots

Before After
Before After
Before, 390px After, 390px

Props benniledl, ryelle.

Opened by the wporg bug pipeline, unattended. Risk: needs-review.


Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added a favorite button and count beside each pattern’s title, alongside the existing Edit button.

The My patterns grid put the Edit link where other grids show the
favorite button, so authors lost sight of how many times their patterns
were favorited. Add the favorite button with its count next to the Edit
link, as on the other pattern grids.

Fixes #694.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBAW4t1v2qZd7urPiP85ra
Copilot AI lite review requested due to automatic review settings November 18, 2026 04:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pattern title row now includes a favorite button with its count beside the existing Edit button.

Changes: My Patterns favorites

Layer / File(s) Summary
Add favorite count to title row
public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php
The title row groups the Edit button with a small-variant favorite button that displays its count. The group uses a non-wrapping flex layout with a spacing-10 gap.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: ryelle, ekamran

Merge Risk: Minimal · up to f2a82

The My patterns cards now show a favorite count beside the Edit link. I found no concrete defect, so this looks safe to merge. A quick manual check that each card shows its own count would be a sensible final confirmation.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the My patterns grid now shows how often each pattern was favorited. The change matches the raw summary, which adds a favorite button with its count beside Edit on eac…
Description check Passed The description states the problem, the fix, and the linked issue (Fixes #694). It explains that the favorite button with its count now appears beside Edit on each card, and it covers drafts. It inclu…
Linked Issues check Passed Issue #694 asks that authors see the like or star count of their own patterns on My patterns, as the old theme showed. At the reviewed head, _grid-mine.php adds a wporg/favorite-button block with `s…
Out of Scope Changes check Passed The whole-PR diff against the merge base changes only public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php (+9/-3). All changes are in the My patterns card footer. They…
Full details: Title check

Explanation

The title names the main change: the My patterns grid now shows how often each pattern was favorited. The change matches the raw summary, which adds a favorite button with its count beside Edit on each card. The title is concise, specific, and has no vague terms.

Full details: Description check

Explanation

The description states the problem, the fix, and the linked issue (Fixes #694). It explains that the favorite button with its count now appears beside Edit on each card, and it covers drafts. It includes testing steps, a manual test plan, and before/after screenshots. It lists props. It does not include the template's explicit 'How to test' numbered steps, but its Testing section covers the same information. It is mostly complete.

Full details: Linked Issues check

Explanation

Issue #694 asks that authors see the like or star count of their own patterns on My patterns, as the old theme showed. At the reviewed head, _grid-mine.php adds a wporg/favorite-button block with showCount: true to each card in the post-template loop, inside a new flex group beside the existing Edit button. This displays the favorite count for each of the author's patterns, including drafts. The PR description states that the same block is used in the other pattern grids. This review did not inspect those other grids, so the count behavior relies on the existing block implementation. The change is template markup only. No acceptance criteria or exclusions were specified in the linked issue or the PR objectives. No automated regression test was added, and the PR states that the PHPUnit suite does not render pattern files. The issue has no explicit test requirement, so this does not cause a failure.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base changes only public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php (+9/-3). All changes are in the My patterns card footer. They add the favorite button with count, wrap it with the Edit button in a flex group, and keep the Edit button markup. These changes directly implement #694. No unrelated changes were found.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c6ad01e9-8671-4e99-8c34-945ea076185e
Commits

Reviewing files that changed from the base of the PR and between c62ba13 and f2a828c.

Files selected for processing: 1

  • public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

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.

Sum of likes/stars in my patterns

3 participants