WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
310 stars 44 forks source link

Added subfolder to initial theme state to eliminate render error #652

Closed pbking closed 1 month ago

pbking commented 1 month ago

To test:

Load the Metadata Modal window with the browser console open.

Note that no errors are shown. (There should be no other changes.)

image
pbking commented 1 month ago

I think we should consider getting the data on the parent and share the data down, so that we may avoid repeatedly fetching the theme data, what do you think? (For another time, not now)

I'm unconcerned about the performance of repeated calls. I would only want to refactor if it makes the code simpler or better since it ultimately doesn't effect the user's experience. That said, I do think that consolidating all of the data fetching logic (into resolvers) and cacheing that so that it's not fetched every time would both improve the code and minimize the data.

vcanales commented 1 month ago

I'm unconcerned about the performance of repeated calls. I would only want to refactor if it makes the code simpler or better since it ultimately doesn't effect the user's experience.

Yeah, as you say, my concern is not about performance, but about the repetition of code in multiple children of a component that could do the fetching for them.