Skip to content

Hotfix/patterns #75

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 3 commits into from
Jul 18, 2025
Merged

Hotfix/patterns #75

merged 3 commits into from
Jul 18, 2025

Conversation

khleomix
Copy link
Contributor

Closes

N/A

Link to test

Test locally in your WordPress admin under Tools > WDSBT Settings.

Description

  • Pattern registration function cleanup and linting errors fix.
  • Improve developer experience for block pattern/category registration by:
    • Adding a "Flush object cache and transients" button to the Theme Options page.
    • When used, this button flushes the block pattern registry, clears the WordPress object cache, and deletes all transients.
    • Injects a JavaScript event to notify open block editor tabs to refresh their pattern/category cache.
    • Displays a clear admin notice explaining WordPress’s caching limitations and the need to switch themes or clear all caches for new pattern categories to appear immediately.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

N/A – No visual changes to the frontend, but new admin UI and notices are visible in the Theme Options page.

image

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. Go to Tools > WDSBT Settings in the WordPress admin.
  2. Add a new pattern or pattern category in the /patterns folder.
  3. Click the "Flush object cache and transients" button.
  4. Open or reload the block editor and check if new patterns/categories appear.
  5. If not, try switching to another theme and back, or clear all caches, then check again.
  6. Confirm that the admin notice explains the caching limitation.

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 17, 2025
Copy link
Contributor

@lindseywb lindseywb left a comment

Choose a reason for hiding this comment

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

LGTM

@khleomix khleomix merged commit 158a93e into main Jul 18, 2025
6 checks passed
@khleomix khleomix deleted the hotfix/patterns branch July 18, 2025 14:53
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.

2 participants