Skip to content

Conversation

@jasperf
Copy link
Contributor

@jasperf jasperf commented Sep 16, 2025

This pull request introduces a new "Expertise Detail Advantages" block for the Thyra theme, including its backend logic, field definitions, Blade template, and editor styles. It also adds custom block categories for improved organization in the WordPress block editor and provides documentation updates on best practices for asset loading in Blade templates. Additionally, brand color variables are added to the main and editor CSS files for consistent theme styling.

New Block Implementation

  • Added the ExpertiseDetailAdvantages ACF block class in app/Blocks/ExpertiseDetailAdvantages.php, defining block properties, supported features, and preview/example data.
  • Created the corresponding ACF field group in app/Fields/ExpertiseDetailAdvantages.php, including pill text, main title, description, and a repeater for listing advantages with selectable icons.
  • Implemented the Blade template for the block in resources/views/blocks/expertise-detail-advantages.blade.php, rendering the block with dynamic content and conditional icon loading using Vite::asset().

Editor and Theme Styling

  • Added T3CH brand color variables to both resources/css/app.css and resources/css/editor.css for consistent design. [1] [2]
  • Included custom editor styles for the new block in resources/css/editor.css to improve readability and match the frontend appearance.

Block Editor Organization

  • Registered custom block categories (thyra-expertise, thyra-general, thyra-home) in app/setup.php for better block organization in the WordPress editor.

Documentation and Best Practices

  • Updated documentation in .github/copilot-instructions.md and CLAUDE.md to clarify asset loading best practices in Blade templates, emphasizing the use of Blade conditionals and Vite::asset() instead of @php blocks. [1] [2]

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