-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Revise folder structure on themes made with blocks #36548
Comments
Huge fan of this suggestion. +100 |
I disagree with changing the existing folders for one point only and that is the existing themes and existing documentation. I agree that having a pattern folder is a good idea, but then again the same problems with the naming as in #34550 will happen, and some developers will feel limited by this. Please consider that developers have been developing these types of themes for the past year, and changing the folder structure now is too late. |
I totally agree with @carolinan here. |
I can't comment on the technical solution, which seeing from the comments is definitely welcome. But today, Beta 1 of WordPress 5.9 is being released and this is a Feature, which should have been proposed and merged before November 9th. @mtias you referenced to #34550, an issue that - to my understanding - addresses the same problem. It was opened in September. May I ask you why today we are putting this in a list of "Must Haves"? I am trying to understand the process better and help whenever possible, by also reviewing my team time allocation. Thanks! |
The volume of current block themes out there pales in comparison to what we'll see over the next year once it's released in core, so I think we should consider this a good time to evaluate our decisions so far if we can improve upon them without much disruption. We can retain aliases and ensure everything still works while establishing a better structure for the years to come. One of the main points of having an extended period of testing with the plugin is so we can have the space to evaluate what works, what doesn't, and what can be improved. @francescamarano I think it's in must-haves to give visibility to the fact we need to acknowledge a decision. My sentiment on this is not super strong, but I'd like us to consider it fully. The auto-loading pattern suggestion is also not a requirement for 5.9, it's there to give context of a separate issue that is worth streamlining and considering widely. |
I'm suggesting to remove completely the needs to use any directory names in particular and let the theme developer to chose the one that works well for him/her, so Also for the other 2 points, please, do not add other folders names, there is already a way in core to find the right file for the right purpose, don't add others, otherwise we are at the starting point. You have 2 solution, one already in core to find files and one to use theme.json to declare the files to use, pattern, alternative theme.json etc, like you do in block.json for the assets css and js. I also want to notice that I rised an issue before #34550 about |
Sad but true 💔 Thanks for the clarification, I appreciate it! |
I think the required changes for this issue for 5.9 are done. Styles and patterns should be explored later post 5.9. Let me know if we want to close this for now or move it out of the must-haves. |
I'll remove it from the board if the required changes for 5.9 are done. We ought to keep the issue open or open a new one if there's more work to be done. |
@overclokk sorry missed the ping — this had enough consensus for making the name updates. The discussion about not using folders is a separate thing. The point about theme.json providing the boundary is not correct because theme.json can be used by non-block themes, and will be more usable in the future as it allows to consolidate defining palettes, controlling block supports, etc. There's a chance that template parts could support a |
I did not see any consensus, only a decision without a discussion.
It is not a separate thing, it is the same as using folders, I do not see any difference.
Who said boundary? I like the theme.json, but are the hardcoded things I hate most.
Why not doing it now, there is no issue about open this possibility to developers, you can have Also in this view folder ( The same for different version of |
I believe that all suggestions in the issue description has been solved, can this be closed? |
We are on the cusp of establishing a new organization of theme files that can help creators orient themselves. This is a relatively minor issue, all things considered, but it can still have fundamental implications for the experience of building themes and its perceived simplicity, so we should act now in accordance.
(There is a related discussion in #34550 that also raises some good points.)
I'm suggesting:
/block-
folders to their simpler and more direct/templates
and/parts
(or maybe/sections
for the latter, though we can discuss this one at a later stage). Keep compatibility with “block-” prefixes as aliases. If there's a really strong desire to preserve/block-
at least rename/block-template-parts
to/block-parts
./styles
folder to allow different theme.json files, both as variations and as context providers (mapping to theme hierarchy)./patterns
folder that automatically loads pattern files contained inside.wp:pattern
.The text was updated successfully, but these errors were encountered: