Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive template sharing feature for the OneDesign plugin, enabling templates to be shared across connected sites along with their associated patterns and template parts. The implementation includes a new Templates post type, REST API endpoints for template management, utility functions for template processing, and a React-based admin interface for template management.
Key changes:
- Added template sharing functionality with Templates post type and REST endpoints
- Implemented utility classes for constants management and common functions
- Added comprehensive template library UI with site selection and template management
- Fixed release workflow and improved code organization by separating Patterns and Templates REST classes
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.js | Added templates-library entry point for new template management interface |
| uninstall.php | Enhanced cleanup to remove template-related options and posts on uninstall |
| languages/onedesign.pot | Updated translation file with new template-related strings and corrected URLs |
| inc/helpers/custom-functions.php | Added template parsing utility function for extracting blocks, template parts, and patterns |
| inc/classes/rest/class-templates.php | New REST API class for template sharing endpoints including apply, remove, and sync operations |
| inc/classes/rest/class-patterns.php | Extracted patterns-specific REST functionality from main REST class |
| inc/classes/post-type/class-template.php | New Templates post type registration |
| inc/classes/plugin-configs/class-constants.php | New constants management class for better code organization |
| inc/classes/class-utils.php | New utility class with site management and template processing functions |
| inc/classes/class-settings.php | Added Templates submenu and redirect handling for template management |
| inc/classes/class-rest.php | Refactored to instantiate separate Patterns and Templates REST classes |
| inc/classes/class-plugin.php | Added Template post type initialization |
| inc/classes/class-hooks.php | Enhanced with template creation logic and block type restrictions |
| inc/classes/class-cpt-restriction.php | Extended restrictions to include Templates post type |
| inc/classes/class-assets.php | Added template library script and style enqueuing |
| composer.json | Added pot generation script and custom functions autoloading |
| assets/src/* | New React components and utilities for template management interface |
| .github/workflows/release_on_tag.yml | Fixed release workflow to include uninstall.php and corrected title format |
| .eslintrc | Added TemplateLibraryData global for ESLint |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Utsav Patel <75293077+up1512001@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
The Copilot review focuses on removing PHP function return types & parameter return types, which are supported as of 8.0+. |
|
Closing this PR in favor of #19 |
Uh oh!
There was an error while loading. Please reload this page.