Skip to content
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

Add layout to fingerprint to enable layout-level Magewire components #147

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gerrits-ecommerce
Copy link

@gerrits-ecommerce gerrits-ecommerce commented Mar 18, 2024

This makes it possible to define a Magewire component in a page_layout file, configure a category (or CMS page, etc.) to use this layout file, and have the component function as expected.

This functionality can be tested using the module below:
reproduction.zip

In the current Magewire codebase; if you configure a category to use the test layout that this module defines and load that category the initial render will succeed, but any changes will result in a 404 error because the Magewire Module cannot be found in the default catalog_category_view template.

With this change the module will function.

@gerrits-ecommerce
Copy link
Author

gerrits-ecommerce commented Mar 18, 2024

As Willem and I already discussed on the Hyva Slack I'm not 100% sure what the performance impact of this change will be. My local testing seems to indicate the impact is minimal to none. But if anyone with more expertise in this area has additional input I'd be happy to hear that.

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.

1 participant