-
Notifications
You must be signed in to change notification settings - Fork 7
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 global header block #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think are the pros/cons of doing it this way instead of creating a plugin or mu-plugin to register these blocks?
pro: each site gets to pick and choose which components, blocks, etc it wants to use con: components that get used on all sites still have to be included by other code this way felt more natural, since i've been thinking of repo tools more like a library that provides a set of tools & reusable components, rather than a plugin that has context of where/how it'll be used. i don't feel too strongly though. |
I was thinking of this like a library too, but one specifically for tools for repo management. I was not envisioning that this would ever get installed anywhere on production.
I think you could still do this if it was an mu-plugin. Rather than having all of the blocks automatically load, you could have a function like I'm not entirely opposed to doing it this way, but it feels... unconventional, and might be confusing down the road. Plus what I said about not anticipating it being installed on production. |
Ah, ok, I think that's a good distinction to make 👍🏻 but then where would we put it? meta.svn/.../mu-plugins/pub ? I guess we could create a The more repos we do ghat with, though, the more friction there'll be when making changes that affect all envs. That might be an acceptable tradeoff though. How does that sound? Any better ideas?
👍🏻 |
🤔 If we had a GH repo, we could sync it to dotorg.svn instead of meta.svn (so that the GH repo is the source of truth for the code, and we wouldn't get Trac tickets about it)
Yeah, I could see that becoming a problem eventually. My inclination would be to cross that bridge when we come to it. I guess one thing we could consider doing would be to have the repo be How does that sound? |
Doh, yes, 💯
👍🏻
Yeah, I like that idea 👍🏻 |
Can you create that repo and add team permissions? |
replaced by WordPress/wporg-mu-plugins#4 |
Maybe one way to eventually deal with that would be to create a monorepo for wordpress.org code. Not all of meta, though, but only the stuff for the sites in the multisite instance. But then, to avoid cluttering local envs with irrelevant code, each env could do a sparse checkout, and only pull the relevant subdirectories. Although, at that point, it might be better to just have one env for the entire w.org multisite. Not all of meta still, though, just the w.org multisite. |
this is a rough sketch of how
repo-tools
could contain the global header, with all themes could include in various waysinterconnected with WordPress/wporg-news-2021#20
see #6
if this sounds good, i'll add the rest