Blocky is a copy of the Core stable theme with a number of templates marked up with Twig Blocks formatting.
The Twig Blocks allow themes that use Blocky as a replacement base theme for Stable (the de-facto. default base theme) to override those marked up templates overriding just targeted sections of code (read Twig extends for further understanding).
Although potentially useful in its' own right I also envisage Blocky being copied and extended in custom base themes to meet peoples needs and as a demonstration of how Twig Extends can be used in alternative Drupal frontend work-flows.
To my knowledge there are no other base themes for Drupal 8 aimed at aiding/demonstrating Twig extends.
Git clone: git clone --branch 8.x-1.x https://git.drupal.org/sandbox/chris_hall_hu_cheng/2646294.git blocky
Project page: Blocky base theme.
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxchris_hall_hu_cheng26...
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
chris_hall_hu_cheng commented@PA robot
Regarding the automatic review script, I did run that myself, a large number of css, line endings, line length etc. points were raised.
Note that this theme starts from a copy of the Core Stable theme however all those files are exactly as in Stable, spending time tidying those would defeat the object of one of the use-cases of Stable (an easy starting point for modified base themes) and also into the possibility of errors.
Putting this back to needs review on that basis as I don't believe I need to do anything on basis of the automated review.
Comment #4
chris_hall_hu_cheng commentedComment #5
rainbowarrayAutomated Review
In this case, the automated review findings are not terribly useful, since the errors reported are for files that are copied directly from core.
Manual Review
Solid profile, Christopher!
I think this is a great concept for theme. Twig blocks rock, and it's great to see a cool demonstration for how to make use of Twig blocks. That said, I don't see why this theme needs to be a duplication of the Stable theme. You're copying all of the CSS and images in Stable, and then overriding core with your versions of those files, but since I don't think you're doing anything different with the CSS and images, that seems like a lot of unnecessary duplication. If I missed something, and there's a good reason for that, glad to know.
However it seems like a simpler solution would be to set Stable as the base theme for Blocky, and then override only the templates where you want to demonstrate Twig blocks. That would make it much more clear what your particular theme is doing versus what Stable does in core in terms of providing a BC layer.
8.x-1.x: check!
I don't see any third-party code or licensing problems with the theme.
No third-party assets or code. All good here.
This seems generally okay. The project page lists which templates now have Twig blocks, which is handy and could be useful in the README. That wouldn't be necessary if Blocky extended Stable and the theme only had the templates that now used Twig blocks. The Twig blocks in the templates don't have code comments, but they're pretty self-explanatory given the block names. Not sure that adding code comments for those would be particularly helpful. So this seems pretty solid.
In reality the unique code for this is the templates with Twig blocks. Everything else is copied and modified as needed from Stable. Those templates do have a sufficient amount of code to review.
The templates are really the primary code for review here, and I don't see anything in the Twig files that looks like an issue.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Final note: Interesting theme! And I do think it is worth considering this for core as well. Hope you can trim this theme down to its essence, as it's a very interesting demo of the power of Twig blocks.
Comment #6
chris_hall_hu_cheng commented@mdrummond Thanks for such a comprehensive review.
Actually now you mention it it is kind of obvious to use Stable as the base for blocky, I agree with everything you have said, and rework to something a lot smaller with just the overriding templates :)
Chris
Comment #7
chris_hall_hu_cheng commentedI have taken onboard the sensible suggestions of @mdrummond and changed the theme to sub-theme Stable and just include the overridden templates.
Comment #8
chris_hall_hu_cheng commentedComment #9
ericpughManual Review
This review uses the Project Application Review Template.
Hope that's helpful.
Comment #10
chris_hall_hu_cheng commented@ericpugh, thanks for the review :)
Will correct the typo and good call on the composer.json file, just started using composer (as replacement for Drush make) with D8.
Regarding the logo. stable doesn't have one, so I don't think this theme should either. I guess you had site branding block placed. My aim is to make it work exactly the same as Stable (with the ability to override Twig blocks).
Re the StarterKit, not sure that is appropriate. Both Stable and Classy provide consistent base themes allowing Drupal core to carry on evolving markup without breaking existing themes. Blocky is supposed to be a drop in replacement for stable with Twig block markup, not really a Starter theme like Omega or Bootstrap theme. Also extends (and any experiments with embed, include etc.) start making sense once you have new content types etc. I am working on an example that uses Blocky as a base for a Revealjs theme and Drupal content management for the slides (this would be standalone though). I will update the documentation to explain the intentions a little more clearly.
Agreed, about the templates, tend to be overriding as needed, some of the views templates are probably useful candidates for block markup for sure.
Comment #11
hesnvabr commentedYou create a following files in your theme:-
html.twig.html
page.twig.html
node.twig.html
block.twig.html
comment.twig.html
search_result.twig.html
I think you forget to create block.liberaries.yml file.This file is necessary in D8 theme.
Comment #12
chris_hall_hu_cheng commented@pranavbabbar this theme has the core Stable theme as its' sub-theme so only needs to override selected files, everything else will come from Stable.
Comment #13
chris_hall_hu_cheng commentedI have added a composer.json (as suggested by @ericpugh) and also a License.
Comment #14
Binu Varghese commentedAs part of Project application checklist - https://www.drupal.org/node/1587704
It says - under section 4. Licensing checks
4.1 Ensure the top directory of the repository does not contain a ‘LICENSE.txt’ (or similar) file.
"Do not include a LICENSE.txt file in your repository. Drupal.org will add the appropriate version automatically during packaging."
Please remove it from your repository.
Comment #15
klausiThe license file says GPLv2+, so that is the same as on drupal.org. Removing the license file is surely not an application blocker, anything else that you found or should this be RTBC instead?
Comment #16
Binu Varghese commentedlooks RTBC to me then..
Comment #17
mlncn commentedThanks for your contribution, chris_hall_hu_cheng! You are now a vetted Git user. You can promote this to a full project.
When you create new projects (typically as a sandbox to start) you can then promote them to a full project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process, especially my slowness in approving following review. We know it's broken and are trying to fix it.