-
Notifications
You must be signed in to change notification settings - Fork 22
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
QnA #79
Comments
I have checked commit history and MIT added since beginning and I don't know why. We can change it back to
As best practise, we need to generate different CSS files for different template so that we can avoid loading CSS which is not needed to different files. For example, homepage CSS may not be needed on single or archive pages. It helps to improve performance. Because of that we are not using default
Final build CSS files only used in front-end and never going to use for development purpose. We have source files for development.
We are doing development using OOP concepts. We are using PHP autoloader functionality to avoid using including class files manually. Also, because of autoloader, class files only loaded when it going to use. PHP autoloader implementation is not complex. Also having separate files for different functionalities will keep functions.php file code minimal.
We are creating
No reason. It's remaining to add
Agree on this. It should be Note: This is base theme so it might feel that few functionalities may not require abstraction or wrapper. For example, for autoloading or additional methods to enqueue JS/CSS files. But it's required when more features and functionalities implemented in theme. Also, if theme features are basic and required minimal development then we can remove codes which may not needed. @RahiDroid @manishsongirkar Request you to share your thoughts on above questions. cc: @OpuRockey |
@chandrapatel @manishsongirkar Requesting your 👀 on this, please. |
@nitun @OpuRockey Created an issue for adding the |
Hi @RahiDroid you can fix and merge that license issue. |
I believe we can dual-license the code if we want. Since code in Dual License Example - https://github.com/arnavyc/dual-licensed-mit-apache |
👋 So a couple thoughts on the above -- On 2 -- While I can certainly understand that there can be an advantage of sharding out styles into multiple files for the load time of an initial page view, that wasn't my question. Specifically for the styles that are global and going to be loaded on every page, why not just use the existing WordPress standard of the theme's On 3 -- Is there a reason to not provide a documented place in the configuration / build scripts where this could be modified to generate CSS output more in line with WordPress's coding styles? Especially for future maintenance where developers that aren't running a full build environment of the theme may need to rapidly identify where styles are coming from and make modifications in the WP Customizer's Custom CSS editor, having the build tools generate human-readable output can be incredibly useful, so I'd strongly encourage a documented option for how to modify the compression level of the build tools used. Also, I believe that the perf benefits of minifying are far less on http/2 due to the hpack compression and such? On 4 -- While an autoloader system may not be "complex" to many, to be clear I had initially described it as "more complex" -- which I believe we can all agree compared to keeping the bulk of the functionality in the So my point is that it is a trade-off, and that trade-off needs to be acknowledged. There is added complexity here, and it's just a question of whether that trade-off is merited, and whether the goals and wins from it (a more minimal functions.php file, avoiding explicitly including files, sharding of functionality into smaller files) are worth the tradeoffs from consistency across sites, added complexity, and the maintenance load going forward. On 5 -- I still have concerns regarding the added complexity here, as well as being unsure as to the (largely theoretical) perf impacts of pulling in extra files (which may likely be mitigated by opcache) versus explicitly stating the parameters in the code where it's used, but thank you for the explanation of your rationale here. A couple other questions I'd had --
edit: undid the # before the numbers above, apologies for xref'ing other issues! |
Hi @georgestephanis 👋 Appreciate you taking the time and sharing your thoughts on this. On 2 -- I still think that having all my stylesheets placed in the same place is more convenient than having to toggle between the assets folder and the On 3 -- If you're talking about the customizer's custom CSS editor, you should be able to track back the source of a ruleset using the developer tools and then override in the editor. Or, if you were referring to the On 4 -- Default/core themes like TwentyTwentyOne are kept very lean and plain, however, while developing complex themes, things get crazy cluttered and messy quite easily as the codebase grows, and navigating through the codebase becomes a lot difficult. I believe you're hinting toward the autoloader functionality being complex and not something that one would easily be able to understand at a first look; I agree with you. I think the trade-off is worth it, the segregation of the classes isn't very different from what's being done in the WordPress core themes as well. I think the only difference is the autoloading functionality here, which adds the complexity you mentioned but also provides really good benefits. Other thoughts
Thank you so much for all the suggestions and feedback @georgestephanis ! 🙂 |
Hello
I got some questions regarding the blank theme from the partner.
ack
through the codebase and finds where resources are registered, and I'm not sure I understand the advantage when it's only used three or four times.Thanks
CC: @chandrapatel
The text was updated successfully, but these errors were encountered: