Skip to content

Release/Patterns #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Jul 17, 2025
Merged

Release/Patterns #74

merged 64 commits into from
Jul 17, 2025

Conversation

khleomix
Copy link
Contributor

@khleomix khleomix commented Jul 16, 2025

Closes

WDSBT-241

Link to test

Test locally in your WordPress environment.

Description

  1. #WDSBT-241 – This PR introduces dynamic registration of block pattern categories:
    • The theme now automatically scans the patterns/ directory for subfolders and registers each as a block pattern category.
    • The folder name is used as the category slug, and a human-friendly label is generated.
    • Pattern files placed in these subfolders and using the correct Categories header will appear in the block editor under the appropriate category.
    • No manual code changes are needed to add new pattern categories—just add a subfolder to patterns/.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

N/A – No visual changes to the frontend, but patterns will now be categorized in the block editor.

AI Assistance

  • 🤖 This project was developed with the help of a LLM/AI such as Cursor, Gemini, etc.

Added to documentation?

  • 📜 README.md
  • 📓 ClickUp
  • 🙅 No documentation needed

Added tests?

  • 👍 Yes
  • 🙅 No, because they aren't needed
  • 🙋 No, because I need help

Testing Instructions

  1. In your theme, create a new subfolder under patterns/ (e.g., patterns/cards/).
  2. Add a pattern PHP file to that subfolder, and set the Categories header to the folder name (e.g., Categories: cards).
  3. In the WordPress block editor, open the Patterns inserter.
  4. Confirm that a new category appears matching the subfolder name, and that your pattern is listed under it.
  5. Repeat with additional subfolders to confirm dynamic registration.

Reviewer's Testing Checklist

As a reviewer, please verify that the relevant testing criteria are fulfilled and confirmed before approving this Pull Request.

  • Visual Regression Testing: Ensure that existing functionality is not negatively impacted by the changes.
  • Cross-Browser Compatibility: Test on major browsers (Chrome, Firefox, Safari) to ensure compatibility.
  • Mobile Responsiveness: Confirm that the changes are responsive and functional on various mobile devices.
  • Theme Compatibility: Ensure that the changes do not adversely affect the site's theme and styling.
  • Linting: Check that the code passes all linting checks (PHPCS, ESLint, SassLint). Check if PR passes code quality check.
  • Accessibility Testing: Validate that the changes comply with accessibility standards. Run npm run a11y.
  • Security Best Practices: Ensure that the code follows WordPress security best practices. Check if PR passes security check.
  • Documentation: Ensure that any new features or changes are appropriately documented in the README.md or Confluence.
  • Post-Deployment Tasks: Check if there are any tasks that need to be performed after deployment.

[optional] Additional Reviewer Notes or Considerations?

@khleomix khleomix self-assigned this Jul 16, 2025
@thatmitchcanter
Copy link
Contributor

@khleomix khleomix marked this pull request as ready for review July 16, 2025 23:18
Copy link
Contributor

@thatmitchcanter thatmitchcanter left a comment

Choose a reason for hiding this comment

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

This is a LARGE PR, and I've spot checked it and it looks OK from what I can tell - let's make sure we test afterward to ensure that it works well. Thanks @khleomix - approved!

@thatmitchcanter thatmitchcanter merged commit 4600529 into main Jul 17, 2025
6 checks passed
@thatmitchcanter thatmitchcanter deleted the release/patterns branch July 17, 2025 18:00
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.

5 participants