| #288 | use_branding_block_in-2005546-288.patch | 44.38 KB | hussainweb |
| #284 | Screen Shot 2015-09-02 at 01.23.02.png | 64.85 KB | emma.maria |
| #284 | Screen Shot 2015-09-02 at 01.22.57.png | 84.98 KB | emma.maria |
| #284 | Screen Shot 2015-09-02 at 01.22.49.png | 147.77 KB | emma.maria |
| #283 | Screen Shot 2015-09-01 at 11.47.55 AM.png | 67.39 KB | rainbowarray |
| #282 | 2005546-282-use-branding-block.patch | 44.38 KB | rainbowarray |
| #280 | interdiff.txt | 1.38 KB | wim leers |
| #279 | interdiff-2005546-276-279.txt | 1.09 KB | rainbowarray |
| #279 | 2005546-279-use-branding-block.patch | 45.05 KB | rainbowarray |
| #276 | interdiff-2005546-272-273.txt | 1.18 KB | rainbowarray |
| #276 | 2005546-273-use-branding-block.patch | 44.8 KB | rainbowarray |
| #274 | 2005546-272-use-branding-block.patch | 43.8 KB | rainbowarray |
| #268 | 2005546-268-use-branding-block.patch | 44.82 KB | rainbowarray |
| #266 | interdiff-230-to-265.txt | 13.19 KB | wim leers |
| #265 | interdiff-2005546-263-265.txt | 850 bytes | rainbowarray |
| #265 | 2005546-265-use-branding-block.patch | 44.4 KB | rainbowarray |
| #263 | interdiff-2005546-261-263.txt | 734 bytes | rainbowarray |
| #263 | 2005546-263-use-branding-block.patch | 44.39 KB | rainbowarray |
| #261 | interdiff-2005546-259-261.txt | 5.35 KB | rainbowarray |
| #261 | 2005546-261-use-branding-block.patch | 44.39 KB | rainbowarray |
| #260 | 2005546-259-use-branding-block.patch | 39.04 KB | rainbowarray |
| #260 | interdiff-2005546-256-259.txt | 3.5 KB | rainbowarray |
| #256 | interdiff-2005546-253-256.txt | 1.18 KB | rainbowarray |
| #256 | 2005546-256-use-branding-block.patch | 35.54 KB | rainbowarray |
| #253 | interdiff-2005546-250-253.txt | 1.45 KB | rainbowarray |
| #253 | 2005546-253-use-branding-block.patch | 34.97 KB | rainbowarray |
| #250 | 2005546-250-use-branding-block.patch | 33.52 KB | rainbowarray |
| #245 | user-branding-2005546-230.patch | 33.43 KB | madhavvyas |
| #236 | branding-ie11.gif | 666.26 KB | joelpittet |
| #236 | branding-ie9.gif | 909.06 KB | joelpittet |
| #235 | branding-search.gif | 84.75 KB | joelpittet |
| #233 | branding-search.gif | 57.79 KB | joelpittet |
| #233 | branding-slogan.gif | 50.27 KB | joelpittet |
| #232 | branding-desktop.gif | 59.48 KB | joelpittet |
| #231 | branding-mobile.gif | 112.52 KB | joelpittet |
| #231 | branding.gif | 30.46 KB | joelpittet |
| #230 | interdiff.txt | 2.19 KB | lauriii |
| #230 | use_branding_block_in-2005546-229.patch | 33.54 KB | lauriii |
| #223 | 2005546-223-use-branding-block.patch | 33.27 KB | rainbowarray |
| #223 | interdiff-2005546-222-223.txt | 716 bytes | rainbowarray |
| #222 | interdiff-2005546-219-222.txt | 935 bytes | rainbowarray |
| #222 | 2005546-222-use-branding-block.patch | 32.72 KB | rainbowarray |
| #219 | interdiff-2005546-217-219.txt | 429 bytes | rainbowarray |
| #219 | 2005546-219-use-branding-block.patch | 32.51 KB | rainbowarray |
| #218 | branding-block.png | 9.94 KB | rteijeiro |
| #217 | interdiff.txt | 1.14 KB | rteijeiro |
| #217 | use_branding_block_in-2005546-217.patch | 32.53 KB | rteijeiro |
| #217 | logo-block.png | 10.14 KB | rteijeiro |
| #217 | logo-block-config.png | 49.25 KB | rteijeiro |
| #216 | use_branding_block_in-2005546-216.patch | 32.47 KB | wmortada |
| #216 | interdiff-2005546-214-216.txt | 496 bytes | wmortada |
| #214 | interdiff-2005546-206-214.txt | 714 bytes | wmortada |
| #214 | use_branding_block_in-2005546-214.patch | 32.47 KB | wmortada |
| #210 | v2-mobile.jpg | 24.6 KB | hog |
| #210 | v2-tablet.jpg | 38.77 KB | hog |
| #210 | v2-desktop.jpg | 66.67 KB | hog |
| #210 | v1-mobile.jpg | 28.7 KB | hog |
| #210 | v1-tablet.jpg | 44.14 KB | hog |
| #210 | v1-desktop.jpg | 79.01 KB | hog |
| #206 | use_branding_block_in-2005546-206.patch | 33.16 KB | lauriii |
| #203 | use_branding_block_in-2005546-203.patch | 32.74 KB | emma.maria |
| #203 | interdiff-203-181.txt | 1.84 KB | emma.maria |
| #201 | Selection_001.jpg | 81.09 KB | hog |
| #199 | Screen Shot 2015-07-23 at 11.34.32.png | 33.49 KB | emma.maria |
| #195 | interdiff.txt | 33.68 KB | hog |
| #195 | use_branding_block_in-2005546-195.patch | 33.51 KB | hog |
| #191 | mobil-small-screen-header.jpg | 22.69 KB | hog |
| #191 | mobile-screen-header.jpg | 28.66 KB | hog |
| #191 | tablet-screen-header.jpg | 44.33 KB | hog |
| #191 | big-screen-header.jpg | 72.13 KB | hog |
| #191 | interdiff.txt | 1.77 KB | hog |
| #191 | 2005546-191.patch | 1.62 KB | hog |
| #183 | Home_tester_-_2015-06-22_11.27.12.png | 34.41 KB | bill richardson |
| #181 | interdiff-181-173.txt | 6.02 KB | emma.maria |
| #181 | site-branding-block-with-others-mobile.png | 50.16 KB | emma.maria |
| #181 | site-branding-block-with-others-tablet.png | 59.72 KB | emma.maria |
| #181 | site-branding-block-with-others-desktop.png | 64.8 KB | emma.maria |
| #181 | site-branding-block-mobile.png | 41.03 KB | emma.maria |
| #181 | site-branding-block-tablet.png | 53.66 KB | emma.maria |
| #181 | site-branding-block-desktop.png | 56.2 KB | emma.maria |
| #181 | use_branding_block_in-2005546-181.patch | 32.86 KB | emma.maria |
| #176 | Screen Shot 2015-06-02 at 22.04.12.png | 60.62 KB | alexpott |
| #173 | use_branding_block_in-2005546-173.patch | 30.47 KB | lauriii |
| #173 | interdiff.txt | 1.36 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.48.png | 29.66 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.50.png | 39.44 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.27.png | 30.2 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.29.png | 39.81 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.18.png | 39.03 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.13.png | 48.65 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.25.57.png | 38.29 KB | lauriii |
| #171 | Screen Shot 2015-06-02 at 21.26.00.png | 47.88 KB | lauriii |
| #171 | interdiff.txt | 1.36 KB | lauriii |
| #171 | use_branding_block_in-2005546-171.patch | 30.48 KB | lauriii |
| #165 | interdiff.txt | 616 bytes | joelpittet |
| #165 | modify_regions_to-2005546-165.patch | 30.24 KB | joelpittet |
| #165 | interdiff.txt | 616 bytes | joelpittet |
| #163 | interdiff.txt | 928 bytes | zetagraph |
| #163 | modify_regions_to-2005546-163.patch | 30.26 KB | zetagraph |
| #161 | interdiff.txt | 2.55 KB | zetagraph |
| #161 | modify_regions_to-2005546-161.patch | 29.53 KB | zetagraph |
| #157 | interdiff.txt | 28.75 KB | joelpittet |
| #157 | modify_regions_to-2005546-157.patch | 28.6 KB | joelpittet |
| #154 | interdiff.txt | 1.83 KB | joelpittet |
| #154 | modify_regions_to-2005546-154.patch | 30.96 KB | joelpittet |
| #152 | modify_regions_to-2005546-151.patch | 30.46 KB | joelpittet |
| #152 | interdiff.txt | 3.06 KB | joelpittet |
| #148 | modify_regions_to-2005546-148.patch | 31.42 KB | joelpittet |
| #148 | interdiff.txt | 3.73 KB | joelpittet |
| #146 | Screen Shot 2015-05-13 at 3.07.40 PM.png | 293.45 KB | mark.labrecque |
| #145 | modify_regions_to-2005546-145.patch | 32.92 KB | joelpittet |
| #145 | interdiff.txt | 1.54 KB | joelpittet |
| #142 | Screen Shot 2015-05-12 at 13.07.50.png | 87 KB | emma.maria |
| #141 | Screen Shot 2015-05-12 at 12.08.55.png | 689.28 KB | emma.maria |
| #141 | Screen Shot 2015-05-12 at 12.08.31.png | 916.62 KB | emma.maria |
| #141 | Screen Shot 2015-05-12 at 12.08.23.png | 589.56 KB | emma.maria |
| #141 | Screen Shot 2015-05-12 at 12.08.18.png | 683.52 KB | emma.maria |
| #139 | diff.jpg | 91.57 KB | lauriii |
| #139 | Screen Shot 2015-05-12 at 00.24.38.png | 62.3 KB | lauriii |
| #139 | Screen Shot 2015-05-12 at 00.24.40.png | 60.37 KB | lauriii |
| #138 | interdiff.txt | 6.06 KB | joelpittet |
| #138 | modify_regions_to-2005546-138.patch | 33.43 KB | joelpittet |
| #137 | modify_regions_to-2005546-137.patch | 32.01 KB | joelpittet |
| #137 | interdiff.txt | 1.19 KB | joelpittet |
| #134 | interdiff.txt | 27.82 KB | joelpittet |
| #134 | modify_regions_to-2005546-134.patch | 32.35 KB | joelpittet |
| #132 | modify_regions_to-2005546-132.patch | 45.78 KB | joelpittet |
| #128 | modify_regions_to-2005546-128.patch | 45.72 KB | siva_epari |
| #125 | modify_regions_to-2005546-125.patch | 45.72 KB | siva_epari |
| #125 | interdiff-119-125.txt | 1.56 KB | siva_epari |
| #123 | modify_regions_to-2005546-123.patch | 45.03 KB | siva_epari |
| #123 | interdiff-119-123.txt | 1.56 KB | siva_epari |
| #119 | modify_regions_to-2005546-119.patch | 45.03 KB | siva_epari |
| #109 | interdiff.txt | 3.55 KB | manuel garcia |
| #109 | 2005546-109.patch | 42.64 KB | manuel garcia |
| #105 | interdiff.txt | 2.62 KB | manuel garcia |
| #105 | 2005546-105.patch | 42.49 KB | manuel garcia |
| #103 | interdiff.txt | 7.93 KB | manuel garcia |
| #103 | 2005546-103.patch | 40.74 KB | manuel garcia |
| #101 | interdiff.txt | 635 bytes | manuel garcia |
| #101 | 2005546-100.patch | 34.07 KB | manuel garcia |
| #98 | interdiff.txt | 2.31 KB | manuel garcia |
| #98 | 2005546-98.patch | 33.7 KB | manuel garcia |
| #96 | interdiff.txt | 667 bytes | manuel garcia |
| #96 | 2005546-96.patch | 31.39 KB | manuel garcia |
| #92 | interdiff.txt | 1.52 KB | manuel garcia |
| #92 | 2005546-92.patch | 32.04 KB | manuel garcia |
| #90 | 2005546-90.patch | 31.46 KB | manuel garcia |
| #87 | interdiff-2005546-87.txt | 548 bytes | lokapujya |
| #87 | 2005546-87.patch | 32.22 KB | lokapujya |
| #85 | 2005546-85.patch | 32.22 KB | lokapujya |
| #79 | interdiff-1991442-79.txt | 501 bytes | lokapujya |
| #79 | 1991442-79.patch | 32.12 KB | lokapujya |
| #76 | 2005546-interdiff-75.txt | 702 bytes | rpayanm |
| #76 | 2005546-76.patch | 32.11 KB | rpayanm |
| #73 | 2005546-73.patch | 32.12 KB | rpayanm |
| #67 | 2005546-67.patch | 33.02 KB | rpayanm |
| #58 | interdiff.txt | 2.04 KB | star-szr |
| #58 | 2005546-58.patch | 33.91 KB | star-szr |
| #57 | 2005546-57-after-patch.png | 9.35 KB | star-szr |
| #57 | 2005546-57-before-patch.png | 14.37 KB | star-szr |
| #55 | interdiff-2005546-51-55.txt | 2.06 KB | rainbowarray |
| #55 | header-region-branding-block-2005546-55.patch | 32.91 KB | rainbowarray |
| #51 | header-region-branding-block-2005546-51.patch | 32.34 KB | rainbowarray |
| #48 | interdiff-2005546-41-48.txt | 4.2 KB | rainbowarray |
| #48 | header-region-branding-block-2005546-48.patch | 32.31 KB | rainbowarray |
| #41 | interdiff-2005546-40-41.txt | 6.71 KB | rainbowarray |
| #41 | header-region-branding-block-2005546-41.patch | 30.61 KB | rainbowarray |
| #40 | interdiff-2005546-37-40.txt | 2.62 KB | rainbowarray |
| #40 | header-region-branding-block-2005546-40.patch | 36.04 KB | rainbowarray |
| #37 | interdiff-2005546-34-37.txt | 3.93 KB | rainbowarray |
| #37 | header-region-branding-block-2005546-37.patch | 35.68 KB | rainbowarray |
| #34 | interdiff-2005546-31-34.txt | 4.47 KB | rainbowarray |
| #34 | header-region-branding-block-2005546-34.patch | 35.36 KB | rainbowarray |
| #31 | interdiff-2005546-27-31.txt | 9.78 KB | rainbowarray |
| #31 | header-region-branding-block-2005546-31.patch | 33.05 KB | rainbowarray |
| #28 | site-branding-block-after.png | 32.11 KB | rainbowarray |
| #28 | site-branding-elements-before.png | 32.06 KB | rainbowarray |
| #27 | interdiff-2005546-26-27.txt | 19.7 KB | rainbowarray |
| #27 | header-region-branding-block-2005546-27.patch | 23.27 KB | rainbowarray |
| #26 | header-region-branding-block-2005546-26.patch | 15.77 KB | rainbowarray |
| #20 | header-region-branding-block-20.patch | 14.82 KB | rainbowarray |
| #19 | header-region-branding-block-19.patch | 14.16 KB | rainbowarray |
| #17 | d7_big.png | 22.84 KB | hosef |
| #17 | d7_small.png | 13.31 KB | hosef |
| #17 | d8_nopatch_big.png | 25.97 KB | hosef |
| #17 | d8_nopatch_small.png | 22.92 KB | hosef |
| #17 | d8_patch_blocks_big.png | 21.23 KB | hosef |
| #17 | d8_patch_blocks_sm.png | 16.26 KB | hosef |
| #17 | d8_patch_long_elements_big.png | 30.82 KB | hosef |
| #17 | d8_patch_manyblocks_mid.png | 23.48 KB | hosef |
| #17 | d8_patch_noblocks_big.png | 9.08 KB | hosef |
| #17 | d8_patch_noblocks_small.png | 5.13 KB | hosef |
| #17 | 2005546-modify-bartik-for-site-elements-17.patch | 18.71 KB | hosef |
| #17 | interdiff.txt | 6.47 KB | hosef |
| #16 | NoBlocks.png | 18.87 KB | lokapujya |
| #16 | With the 3 blocks.png | 18.69 KB | lokapujya |
| #6 | 2005546-modify-bartik-for-site-elements-6.patch | 16.94 KB | hosef |
| #6 | interdiff.txt | 417 bytes | hosef |
| #5 | 2005546-modify-bartik-for-site-elements-5.patch | 16.94 KB | hosef |
| #5 | interdiff.txt | 15.14 KB | hosef |
| #1 | 2005546-modify-bartik-for-site-elements.patch | 4.27 KB | lokapujya |
Comments
Comment #1
lokapujyaThis removes the site elements from the template file and adds the blocks to the installation profile. Changes the header to be floated left.
Comment #2
lokapujyaThis needs to be updated to position the slogan under the site name. Also, we need to figure out what should happen with the html markup that is currently removed by this patch.
Comment #3
hosef commentedShould we add a "header-left" region and rename "header" to "header-right"? We could then put the new blocks in "header-left" and the old header region would be left unchanged for the most part.
Comment #4
tim.plunkettIf you split header, it should be
header_firstandheader_second, not left/right, to work best with RTL.Comment #5
hosef commentedHere is an updated patch which is almost done.
Some things to note:
1. it will not work without the patch from http://drupal.org/node/1053648#comment-7465426 already commited to the branch.
2. it is a work in progress.
3. It needs to be tested in IE and in a RTL language.
Comment #6
hosef commentedOk, fail. New patch.
Comment #7
tim.plunkettCan we get some before and after?
Comment #8
oadaeh commentedUpdating status.
Comment #10
lokapujyaOne minor issue left over from my original patch: bartik.page_site_slogan status should be 1, not 3
Comment #11
tim.plunkettCan you decouple this from the other issue? This would most likely need to go in first.
Comment #11.0
tim.plunkettuse # link
Comment #11.1
lokapujyakeep a reference to the blocks issue, so the reason for the change is understood.
Comment #11.2
lokapujyaDecouple this issue.
Comment #12
lokapujyaIf we put this in first, then the blocks won't be available and the header will be empty.
Comment #13
tim.plunkettSo? If nothing is in it, nothing should change. This should just add a place for those blocks to eventually go.
Comment #13.0
tim.plunkettreorganizing
Comment #14
lokapujyaThis issue does two things:
Comment #15
tim.plunkettRight, but all of this is optional. If I disable the blocks, nothing should look broken.
Even if the other issue went in first, we'd still want screenshots of how it looks with no blocks in the new region.
Comment #16
lokapujyaSo that we have a screenshot to talk about, with Patch from #6 (and the patch from the other issue), I get:

With the placed blocks, I get:
Comment #17
hosef commentedOk, here is a new patch and a bunch of pictures(there are a lot of pictures).
For reference, I have screenshots of D7 and D8 before the patch is applied:
Here is with the patch and with the blocks placed:
Here are screenshots with no blocks in either header region:
One thing to note is that having long element, or lots of blocks in the header regions can mess up the layout:
Also, the layout is actually broken in RTL, but that is because most of Bartik is broken in RTL. I made it look as good as I could, but further work on that should be done in an issue specifically to fix Bartik in RTL.
I tested on my Galaxy S2, and it looks ok in both landscape and portrait mode, but we should test it on some other devices also.
It is broken in IE8 as it does not support media queries.
Finally, I tested installing Drupal with this patch, but not the patch that creates the blocks, applied and the installer fails in that scenario.
Comment #17.0
hosef commentedClarify the scope of this issue.
Comment #18
Jeff Burnz commentedDue to changes in the approach in #1053648: Convert site elements (site name, slogan, site logo) into blocks this patch is likely to be significantly simplified, keep an eye on that issue. This could be postponed, however momentum is clearly behind the new approach, looks like its getting close.
Comment #19
rainbowarrayThis patch will definitely fail, but it's a rewrite of the above work given the changes that have been done in #1053648: Convert site elements (site name, slogan, site logo) into blocks to create a site branding block.
Since that part is already handled, the two things this patch does is:
The only way this patch might work is if you install the patch from #1053648: Convert site elements (site name, slogan, site logo) into blocks first. Once that's committed, you can skip that step of course.
If you're using Bartik, you'll see your site branding disappear after installing this patch. You'd have to reinstall the site to see the branding by default. You could also manually add a branding block to header_first on the Block Layouts page.
I've been trying to keep the markup largely the same from what it is was before this patch in order to simplify testing. I think we certainly could do further cleanup of the markup in a followup Dreammarkup issue.
I did make a couple slight changes. Right now, Bartik will simply inherit branding.html.twig. That means the site branding elements will use classes rather than an id on each element. If there's a really really good reason to use an id for these elements, we could override this, but it seems unnecessary and unwise unless there's some JS that targets those elements, which seems unlikely.
The other thing that Bartik's markup did was to switch the wrapper for the site name to h1 if there was no other title on the page. I suppose we could add that back in, either as an override or in system's branding block. Since branding blocks can appear in any region, however, I think you'd want some sort of logic that an h1 should only be used if in the header_first region or something like that. You wouldn't want h1 elements littered all over the page.
The only other thing specific to Bartik's template was adding in a visually-hidden class to the branding elements if they were turned off on the global appearance or theme settings page. Personally I'd like to see those controls removed in a follow-up issue. Since the branding block allows the name, logo and slogan to be turned on and off, I think it doesn't make sense to override that from the appearance page. If the branding block has the name turned off, the block should honor that, not just hide it. I believe there was an accessibility reason for using visually-hidden, but I think that made a lot more sense when the name, logo and slogan were hard-coded into the template rather than showing up based on block controls.
For the record, I also think it's really wasteful for the CSS to duplicate the region-header-first, region-header-second styles for every single rule. I guess it boils down to whether we want those classes duplicated in every CSS declaration, or if we would want to add a region-header class to region-header-first and region-header-second, probably through a preprocess function in bartik.theme. I'm not a fan of either, so I went with duplicating the class decorations in the CSS for the sake of expediency.
Comment #20
rainbowarrayUsually helps if I do git add for the new yml file that installs the branding block.
Comment #22
Jeff Burnz commentedSuggest using attribute selectors such as
[class*="region-header-"]instead of duplicating selectors, we could as you say inject a common class, not sure if we need to or not at this stage, it might depend how #1869476: Convert global menus (primary links, secondary links) into blocks pans out.Comment #23
rainbowarrayGreat idea, I like it!
Comment #24
star-szrOne thing to mention based on the most recent patch:
Unless we're wrapping markup around page.header_first there's no need for the if tag in cases like this.
Comment #25
rainbowarrayI'll keep that in mind!
Hoping to draft up a new patch for this tonight now that #1053648: Convert site elements (site name, slogan, site logo) into blocks is in.
Comment #26
rainbowarrayThis is primarily just a reroll, so that there's a clean starting point for future patches.
I'll be working on a new patch from here.
Comment #27
rainbowarrayHere's the real meat and potatoes.
I used the suggestion from Jeff in #22 to simplify some of the CSS. I also have this working for site maintenance page as well as the regular page template, and for system/Stark as well as Bartik.
The other big thing in this patch is that I've done my best to remove the feature checkboxes for logo, name and slogan from the appearance Global Settings page as well as the theme settings page.
One really big thing to note in terms of the affects on existing themes already out there:
The variables for the site slogan, name and logo are still being sent to the page template variables, even if they aren't controlled by toggles to turn them on and off. That's probably good, as there could in theory be other reasons to use those variables. But more importantly, this should **not** break existing themes that use those variables. The logo, slogan and and name will still show up.
What will change is the sort of dev sites most core folk are using that probably have Bartik turned on by default. The slogan, logo and name will disappear from those installs when they pull down the latest dev version, unless they do a reinstall (which auto-installs a site branding block) or they add a site branding block. While that might be a surprising disappearance, I don't think that completely breaks those sites. And from my experience, I have to do reinstalls now and then anyhow.
The one thing I didn't tackle in this patch was tests. I'm guessing there are tests to check if the logo toggle feature works, for example. My guess is that if those tests exist, they will break. But that's good, as it helps me to find those tests!
Anyhow, good chance this will take a few tries to get into decent shape. Feedback welcome!
Comment #28
rainbowarrayHere are before and after screenshots. The branding elements look visually identical from when variables were in the template to when a site branding block is used.
Comment #30
rainbowarrayNow I know what tests this breaks so I can fix those. Yay!
The errors with the system branding block test surprise me. Would a difference in markup for Bartik affect that or does it test system/Stark?
Comment #31
rainbowarrayThis should have fewer test failures. I fixed the tests that were based on placing blocks in a header region: changed those to header_second region which is the equivalent of the previous header region.
There are a few other test errors I might need assistance with.
There are some language errors that look like they're connected with the site slogan. I didn't think I changed the config names for site name and site slogan, but maybe something is going on there?
There are also some tests related to the h1 wrapped around the site name, which isn't in this new template.
Previously Bartik and I think Stark too tested if a page title was defined: if not, it wrapped the site name in an h1. We discussed this on a Twig call and decided that wasn't needed. It would be very difficult to reproduce: you wouldn't want every site branding block to have an h1, and blocks are no longer aware of their regions (as far as I know), so I don't think we could just say use an h1 if the block is in the header_first region. So that's kind of tricky.
Once some more tests pass, it will be easier to see what's still broken.
Comment #34
rainbowarrayFound a few more test bugs. Some will probably still pop up.
Comment #35
joelpittetThere is lots of nice cleanups in that. Good work, here's a reviews on some nitpickery and a few questions and duplicates.
Duplicate?
Same question about the string vs int yaml values.
two space tabs here.
This is a duplicate.
This type of selector looks messy but maybe it was recommended? Just my opinion.
Space missing at end.
Probably don't need the extra new lines here.
I don't know yaml that well but noticed you were changing other values. Should this be an int too?
Comment #37
rainbowarrayFixed the issue 1, 3, 4 and 6. Tried to fix extra lines in 7, although I'm not precisely sure which lines were the extra ones.
For items 2 and 8, I'm trying to match the block config file with the block config schema file. I used an example file for the block module, but I'm honestly not sure if I'm doing it right. Making corrections based on what Testbot says, and I found a couple more to correct. label_display says string in the schema file, but I'm honestly not sure why.
I think a lot of the test failures stem from the fact that the test is expecting site elements to be in the template. I think I need to add a default site branding block before the assertion. So I need to figure out how to do that next.
Comment #39
joelpittetNice work you shaved off 2 fails, and #7 was the lines I was refereing too, sorry needed more context.
You should exclude .idea from your global ~/.gitignore or inside .git/info/exclude file.
Comment #40
rainbowarrayThis should fix the test fails in ThemeTest and LanguageUILanguageNegotiationTest. Needed to place a site branding block to make those work. Also removed the stupid .idea file that snuck in there.
Comment #41
rainbowarrayRealized config files that installed site branding block were in the wrong place. Moved to standard profile. Looks like Stark doesn't need a separate config file in the minimal profile. We'll see if this works. Schema files not needed either.
Comment #44
joelpittetAwesome!! It's showing up now on install and switching to stark, woot:)
Comment #45
joelpittetThe fails on the PageTitle test are due to these tests @ line 98:
And the ThemeTest.php exception is because it can't find it, which I think is because you are placing the block(
$this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first'));) after you make the request for the page($this->drupalGet('');).Hope that helps cull some errors.
Comment #46
Jeff Burnz commentedRegardign selectors like
[class*="region-header-"] .block-menu li aI'm not overly worried about what they look like, more that they work, and are not over-specified (which is something Bartik has always suffered from). I tend to use that form of attribute selector quite a lot mainly because it's reliable, which for me trumps other forms that may look more elegant.Comment #47
joelpittet@Jeff Burnz, I'm coming around to that syntax and my concern stems mostly from years of IE emotional abuse(Some call it experience...). Likely IE9+ has gotten rid of their bugs, though I've avoided that syntax due to previous IE bugs and knowing I could "get by" without it. So let's leave it in there and I'll just tag this for some ie testing at the end.
Keep up the great work @mdrummond!
Comment #48
rainbowarrayMore attempts at fixing the tests. Thanks for the review and the suggestions, joelpittet!
Comment #51
rainbowarrayHere's a reroll, as there was a change to theme.inc. Posting this so the next interdiff is clean.
Comment #52
joelpittettestbot engage.
Comment #55
rainbowarrayThis patch should fix the config translation UI test and the page title test. I still can't figure out the Block UI Test, though. Having troubles running tests on my local install (not sure why), so if anybody could help debug that test, it would be very much appreciated.
Comment #57
star-szrI didn't think this variable would be available in the maintenance page template, so I tested manually and took before & after screenshots to demonstrate:
Before
After
Comment #58
star-szrThis should fix those test failures/exceptions. Adds the block module to Drupal\config_translation\Tests\ConfigTranslationUiTest and Drupal\system\Tests\System\PageTitleTest and fixes a silly xpath thing. xpath--
@mdrummond, not sure what issue you were having running the tests locally but wanted to mention that you should have twig_debug off when running tests.
Comment #59
joelpittetI may be really confused, but since this patch actually places the block by default, do we need all the block placed code in here at all? Sorry for my ignorance.
Also, neutralizing @Cottser's xpath karma. Because without it we have to care about whitespace way too much.
xpath++
:P
Comment #60
dawehnerJust a quick idea in order to let people still do hard work in templates. Write a twig extension which allows you to render an arbitrary block somewhere. These blocks would be also cachable...
Comment #61
rainbowarrayI think it's time to revive this from the grave. Doing some similar work in #1869476: Convert global menus (primary links, secondary links) into blocks.
Comment #62
rainbowarrayI haven't checked, but I will bet a lot of money we need a reroll on this one.
Comment #63
rainbowarrayAnyone want to help with a reroll on this? Otherwise I'll try to look at this soon.
Comment #64
wim leersYes, let's get this moving forward again. I'll provide reviews.
Comment #65
wim leersComment #66
rpayanmComment #67
rpayanmPlease review it for something I did wrong :)
This patch will fail, there is a conflict that is not how to solve :(
Greetings...
Comment #69
lokapujyaWhere did that code under: // Add a test block.
come from?
Comment #70
rpayanmfrom old file core/modules/block/lib/Drupal/block/Tests/BlockTest.php
Comment #71
rpayanmComment #72
lokapujyaIt was part of testBlockRehash() which was removed. So, we can get rid of it. Was moved to testBlockCacheTags() which uses sidebar_first instead of header region, so testBlockCacheTags() won't need any changes.
Comment #73
rpayanmThen let me try...
Comment #75
lokapujyaThis shouldn't change.
Comment #76
rpayanmComment #78
lokapujyause provider instead: see https://www.drupal.org/node/1991442
Comment #79
lokapujyawrong patch name, but right patch.
Comment #81
Jeff Burnz commentedI think we will need new regions for #507488: Convert page elements (local tasks, actions) into blocks and #2289917: Convert "messages" page element into blocks, postpone or forge ahead and do new followups?
Comment #82
rainbowarrayI don't think those issues are interdependent on each other. I believe in messages we were looking on taking care of the new region within that issue. I can't remember where we were at for title, tabs and actions. But I'd rather handle the regions separately for each of those, rather than making one mega-patch which is harder to review and has more dependencies.
Comment #83
lokapujyaShould this be removed?
Comment #84
joelpittet@lokapujya yes I believe it should. The reroll may have caught some changes from #1869476: Convert global menus (primary links, secondary links) into blocks
Comment #85
lokapujyaDid #83 (removed that whole block of code). Get the reroll a little closer.
Comment #87
lokapujyaOne more fail down. Maybe this test shouldn't be so delicate. Searching for the nth row seems fragile. But, that's another issue.
Comment #89
manuel garcia commentedComment #90
manuel garcia commentedstyle.css on Bartik is gone, which has been split into different files. So I've had to hunt down line by line every change and reroll that part manually, it probably could use some more eyes on that part to check that I didn't miss anything, and that we're still ok there.
Ive just ran a clean install with the attached patch applied, the block isn't showing up in its place, so that needs to be done. The site branding block is available to be added through the block layout ui in
admin/structure/block. Once enabled it looks fine to me although I haven't done a one to one comparison.In any case, find attached #87 rerolled =)
Comment #92
manuel garcia commentedComment #93
wim leersShould this also be using the the "classy" tag?
Comment #94
manuel garcia commentedI'm guessing yes.
Comment #96
manuel garcia commentedAdded config schema for the
system_branding_block, this should get rid of some of the failing tests.Comment #98
manuel garcia commentedI've made the changes to the classy templates
page.html.twigandmaintenance-page.html.twigthat we did to core's. This is something we should do sooner or later, and will get rid of some of the failing tests.Comment #99
davidhernandezDon't think this is Bartik specific.
If you need to modify page template, make sure you get all of them. I don't check the whole patch, but there is also the install-page template, Seven has one, etc.
Comment #101
manuel garcia commentedAttached a patch just adding missing comments for the new regions on classy page.html.twig (no need for rerunning the tests...)
Very true @davidhernandez ... I've taken a look, and both install-page.html.twig and maintenance-page.html.twig on seven have this in them:
So this begs the question... what to do about this?
site_namewith this patch is a part of a block that includes the logo, the site name and the slogan... any clues?Comment #102
fabianx commentedWell, you never ever put that code back that you removed ...
So there is nothing placing those things in the regions ...
I think I would leave the code for now and just add the new regions for usage later?
Or maybe a template_preprocess_region__header_one?
( you need to register that first )
Comment #103
manuel garcia commented@Fabianx I'm not sure I follow your comment (#102)...
Here is some more progress on this:
SystemBrandingBlock::build(), getting only the logo.url instead of the whole logo config, and sanitizing the site name, like we were doing ontheme.inc.logo,site_nameandsite_sloganfromtheme.inc'stemplate_preprocess_page(), removed associated comments on core's template files, and introduced justsite_nameintoseven_preprocess_install_pageandseven_preprocess_maintenance_page, where they are still necessary.Let's see what the test bot thinks about this one...
Comment #105
manuel garcia commentedThis should fix a lot of them failing tests... I could use input on whether this is the right path, etc.
Also, I spent some time trying to fix
LanguageUILanguageNegotiationTest, but I apparently I'm not the one to fix this one... any pointers?Comment #107
wim leersWhy this change?
I don't think this is the right change?
color_preprocess_page()in HEAD overwrites whattemplate_preprocess_page()set as the value for$variables['logo'].But… we're modifying
template_preprocess_pager()to no longer set that. So it's pointless for the color module to overwrite it, because it won't be output anyway.If we want to keep color module modifying the logo, then we should make it alter the block that contains the logo.
Cleaner & simpler, good :)
Let's make it even simpler:
80 cols.
If we're putting these regions next to each other… then why bother having two of these regions?
Let's omit the "Page" — just "Site Branding" is sufficient, isn't it?
Woah, what? Do we ever do this? You're using a clever selector to match both
.region-header-firstand.region-header-secondin one go.But not only does that look odd/confusing, it also means we match
.region-header-foobarbaz, plus it's very likely also bad for performance. Let's be explicit?(Also, if it turns out a single header region is sufficient, these changes can even be reverted.)
Another reason for not having two header regions: the cognitive dissonance between
#headercontaining "header first", and "header second" not appearing anywhere in this template…Here they are adjacent too.
In conclusion, it looks like the main reason for having two header regions is that Bartik currently floats the header to the right, but you need some things (logo + site name + slogan) to float to the left. But everywhere, we have both header regions adjacent. Which makes me think that what we really should change is Bartik's CSS. Or… use "header" everywhere, but in Bartik add "left header" and "right header".
Of course, I'm no themer, so I defer to the collective themers' thinking to make a decision here.
Comment #108
mortendk commentedjust to chime in quickly.
Using * selectors in css is maybe not always the way we wanna go, unless theres a really really good reason for it ;)
use
.region-header-name, .region-header-othername, .region-header-yetanothername { ... }instead.Comment #109
manuel garcia commentedThanks @Wim Leers for the review! My answers to your points on #107:
1. I don't know, was part of the reroll... perhaps someone else knows the answer?
2. You're right. And actually the logo is just now a transparent svg so removing the preprocess all together, I don't believe we need to be altering the logo any longer? I've tested it without it and it looks fine on different colors. The attached patch removes this function.
3. True, done.
4. Done.
5. Again part of the reroll.
6. Done.
7. I agree, they're stil there because of the reroll. There are a lot more like this on
core/themes/bartik/css/components/header.css. We should clean these up.8. Yes.
9. Again, part of the reroll.
As for the regions we are introducing, as it stands now in the patch, these are not my call, and I do agree they don't make much sense at the moment. Having a
header_first,header_second, and then just plainheaderis confusing.I'm not sure whether this was discussed earlier on, if there is a consensus on it or whether we should do this now.
I see two regions, like you said, left and right. Although in today's world we named them first and second rather than by their desktop layout. I think the Bartik team should chip in on this so we can move this patch forward, without causing a mess...
Once we've cleared out how to deal with the header regions, we'll tackle cleaning up the css selectors that are in the patch.
On another front, only one failing test w00t!
Comment #110
wim leers#109.1: let's remove that hunk then and see what happens?
RE:
header_first/header_second: looks like this is indeed coming from a long time ago. Pinging @mdrummond to review this.Comment #111
manuel garcia commentedOK, I've done some more digging about #109.1, and it makes sense, since the patch removes 'logo' as a default feature here on
ThemeHandler:So unless we remove that check, the logo would never appear...
Comment #113
rainbowarrayYes, header first and and header second is so we can handle the layout in Bartik, so it's fine if those are specific to Bartik.
Using header first and header second is preferable to header left and header right because on smaller viewports, there's a good chance those aren't floated to the left and right. That's the same naming pattern used elsewhere (at least from my memory).
Comment #114
wim leersOk, so let's do that. If you could do that, @Manuel Garcia, or @mdrummond, I'd be happy to provide reviews!
Absolutely!
I also think this is at major since it affects the TX significantly.
Comment #115
manuel garcia commented#2398451: Clean up "layout" CSS in Bartik landed... trying to reroll this.
Comment #116
manuel garcia commentedCan't do this at the moment, unassigning myself until I find some quite time...
Comment #117
rainbowarrayI may have some time available to work on core again, so I'll see if I can familiarize myself with this again. This at the top of my list of the things I want to see get into core.
Bumping to major as per Wim's comment.
Comment #118
wim leers#117: YAY! :) I'll support you in any way I can: patch reviews in this issue, but also being the person to bounce ideas off if you need that :)
Comment #119
siva_epari commentedPatch rerolled
Comment #120
jeroentComment #123
siva_epari commentedFixed some bugs.
Comment #125
siva_epari commentedSorry. Uploaded wrong patch.
Comment #126
wim leersThanks for the rerolls & bugfixes!
The next step here is to remove the distinction between
header_firstandheader_second, and only haveheader. Just like HEAD. That also means less change in this patch.See #107, #110, #113.
Comment #127
lewisnymanInstead of using this selector, we should add a common class that these divs share. That would be closer to our CSS standards
I think this CSS should go in the header.css and other relevant files. We are trying to move towards having all the CSS for one component in the same file. See: #2398451: Clean up "layout" CSS in Bartik
We should always include the leading 0 when writing decimal units.
Comment #128
siva_epari commentedFirst a reroll.
Comment #129
manuel garcia commentedhttps://www.drupal.org/contributor-tasks/update-allowed-beta
Comment #130
emma.mariaFiring testbot to test the patch in #128.
Comment #132
joelpittetHere's a re-roll again from #125
Working on removing the header_left and header_right regions as mentioned a few times by @Wim Leers above.
Comment #134
joelpittetThis should fix the errors (mostly related to String -> SafeMarkup).
Also removes most of the CSS that looks like it got re-rolled in by accident (may need more CSS). Yet most of it's not needed anyways.
Comment #136
davidhernandez:D!
Comment #137
joelpittetThis should resolve the last few test failures... small possibility it may make things worse. Let's roll the dice;)
Comment #138
joelpittetThis fixes a bizarre broken test and the need for that cache tag addition in the test because we aren't using absolute URLs for the branding front links.
Weird!
Comment #139
lauriiiThere is still some regression on the visuals
Comment #140
wim leerslauriii++
Hrm, I don't see how this functionality is being retained?
This is a good change; the branding block in HEAD is wrong in this way; it should've been using
path()all along.Great, but now these docs in
(install|maintenance)-page.html.twigare outdated:Comment #141
emma.mariaFor some reason the first 4 steps of the installer have lost the Drupal logo when you apply the patch in #138.
Missing the Drupal page title
It's back!!!!
Comment #142
emma.mariaAlso as Classy and Stark do not set blocks, we have lost the 'Site Branding' showing on install in those themes. What should we do about this if anything? If we lose the branding we will need to update the screenshots for those themes as part of this issue.

Comment #143
davidhernandezSome of the regression is because Stark and Classy automatically had site name in the default page template as a variable. To not have a visual regression, we'd have to treat Stark and/or Classy like real themes and add a default block configuration so they are there by default when installed. Technically, we don't have to do that, if we don't consider them necessary parts of the "product".
Tagging for product manager feedback, to see if it is ok to leave it out or not.
Comment #144
jibranComment #145
joelpittetThis doesn't fix everything but should fix the visual regressions from @lauriii in #139
Need to fix fix this, likely with a
hook_block_view_BASE_BLOCK_ID_alteror somethingThis may be related to what @emma.maria was seeing in the installer.
Comment #146
mark.labrecqueThe logo still is not appearing on the installer, as evidence by the attached screenshot. It appears by inspecting markup that the "page-title" element is missing entirely from the output.
Comment #147
lewisnymanSounds like it needs work
Comment #148
joelpittet@Wim Leers helped with the color module issue, it was quite broken in head, this should make it kinda work.
I also opened this #2488364: hook_block_view_alter doesn't get the $build array from the build() function because of trying to fix that issue.
Also this should fix the broken maintenance/install pages, went a bit overboard and didn't need to convert them.
Comment #150
joelpittetFound this issue while testing things yesterday #2259567: Support SVG files for theme logo setting
Comment #151
davidhernandezI discussed this a bit with webchick. Not having Stark and Classy set blocks by default is fine. Just make sure the branding block is set by the minimal install profile so it is there after install.
Comment #152
joelpittetMoar fix. Leaving the variables in the template so they can be used for other purposes and fixes the installer sitename/wordmark.
Comment #154
joelpittetWe aren't using features to turn that variable on and off as it's now in the block so don't need the conditions.
Also maybe a follow-up but we can remove the code duplication for the branding block in the maintenance/install pages by doing
{% include 'block--system-branding-block.html.twig' %}Comment #157
joelpittetWhoops I forgot to return the $build in that color #pre_render.
Put the variable docs back in the templates. The variables are back mostly so we have some BC left in.
Comment #158
wim leersNo more remarks. Manually tested. Works great.
The only reason I'm not RTBC'ing is because of @lauriii's visual regression testing in #139.
Comment #159
emma.mariaI will add the CSS fixes for Bartik, this patch visually is far from ready :)
Comment #160
zetagraph commentedTaking this from Emma, she gave me some pointers, will look into visual regressions
Comment #161
zetagraph commentedCleaned up the header styles, removed redundant margins in header branding. Floated branding to the left and the search to the right (opposite for RTL). Also added region--header.htm.twig with a clearfix class.
Comment #162
zetagraph commentedComment #163
zetagraph commentedAdding the missing region--header.html.twig
Comment #164
lauriiiNew line should be added to end of this file :)
Comment #165
joelpittetHere's that fix. The CSS is really the only thing that needs review FWIU.
Comment #166
wim leersComment #167
joelpittetBetter title?
Comment #168
fabianx commentedMuch better!
Comment #169
lauriiiThere is still some visual regression especially on anonymous users. I have tried to point the reasoning for that:
So the branding block has smaller font size because there is .region-header .block { font-size: 0.857em; } so we need to override that for .region-header .branding.
RTL is missing the change
This is missing changes for the RTL. This also visually breaks the branding block on anonymous users because there is no padding on the top.
One new line from the end of file missing
Comment #170
lauriiiWill fix this
Comment #171
lauriiiI still didn't test bartik with mobile.
Before:

After:

Before:

After:

Before:

After:

Before:

After:

Comment #173
lauriiiInterdiff for the previous patch and reroll
Comment #174
bill richardson commentedTested in English and Arabic -- branding block displays logo,etc without any visible differences - ready to commit.
Comment #175
davidhernandezThere is some backwards compatibility in this, but given some of the variable changes and the very significant changes to the page templates, there should be a change record.
Comment #176
alexpottAfter standard install it looks like this...

... looks like something went wrong with the reroll - or it's alexpott error :(
Needs works for #175 anyway - good call @davidhernandez
Comment #177
alexpottInterestingly I only see #176 in Chrome (on a Mac) and not Firefox and only for anonymous users. No amount of cache clearing on anything fixes it.
Comment #178
joelpittetToo many floats! The branding is floating left and the contents are also floating left.
Comment #179
bill richardson commentedAlso having issues in Chrome as anonymous user -- I think solution is to give the branding block a width in css, rather than there being any extra floating left properties.
Comment #180
emma.mariaI have noticed a lot of problems with the CSS which are causing all of these visual regressions. Mobile styles are missing from within Branding, plus no one tested adding a second block to the header which is super important as we are adding multiple behaviours to blocks in the header. I am currently working on a patch to fix everything and will post a patch tomorrow (Sunday).
@alexpott I have noticed what you have posted in #176 too, it's definitely not an @alexpott error.
@bill richardson we can't put a width on the branding block, people need to add any length of title / logo / slogan which will need to span as wide as needed.
@joelpittet I'm working on fixing the many floats.
Note for review: I have added test instructions for this issue for Bartik, due to the added complexity to the block layout behaviour in the header
Comment #181
emma.mariaI have overhauled the markup and CSS for Bartik.
Main points to take note when reviewing:
If you have any questions about the CSS choices I've made, please let me know. I've spent many hours today working things out :)
Also there is an issue open to properly clean up the CSS for the header in Bartik here #2466983: Clean up the "header" component in Bartik, so code can also be fixed there to speed this issue up.
Screenshots
Branding block on it's own
Branding block with Search block and Powered by block
I also checked the RTL styles before creating the patch and they seem fine.
Patch and interdiff attached.
Comment #182
wim leersWow, thanks for the amazing work, Emma!
I don't think I'm qualified to review this anymore, so deferring to folks with stronger theming/CSS skills.
Comment #183
bill richardson commentedIf site slogan not added - name is not properly aligned.
image supplied to show issue
Comment #184
dcrocks commentedActually, vertical alignment of site title with logo changes with screen width in #181 as well, both alone and with other blocks.
Comment #185
bill richardson commentedComment #186
emma.maria@dcrocks The current design has the site title sitting around the middle for desktop and then top aligned for tablet and mobile.
@bill richardson Ack I haven't accounted for the slogan not being present when I did the middle alignment site title styling so it sits at the bottom of the container currently. This needs work.
Bartik really needs screenshots comparing before and after and taking into considerations how the new markup affects alignment per my notes in #141.
Comment #187
bill richardson commentedWould be happy to rtbc this - leave any small cosmetic changes to normal issue 2466983 ( clean up the "header" component in Bartik)
Comment #188
emma.mariaNo it's not ready.
I don't want visual regressions committed for Bartik. Plus Bartik needs screenshots of all the scenarios with everything looking great to be signed off. This was a huge markup and CSS change for Bartik so it's being committed without bugs.
Plus @davidhernandez has pointed out that this issue needs a change record.
Comment #189
rainbowarrayTwo things:
1) Bartik uses .site-branding__text while the maintenance page uses .site-branding-text. Is it possible to have maintenance page use site-branding__text as well?
2) This is an issue that is probably larger than this patch, but there's a mix of px and em in a number of places. It would be great if this could be more consistent. If I had my druthers, I'd use em in media queries and rem everywhere else. Although with a postprocessor with a pxtoem conversion, having everything as px in css is handy. That's not an option here, though. Anyhow, like I said, my guess is that this is a mix throughout the css codebase, and we may not have enough time normalize this.
Markup and CSS looks good to me at first glance. I might need to look through more carefully to better understand how things have changed as styles have been moved into the component css file (which is great by the way).
Nice work!
Comment #190
lewisnyman@mdrummond
1) This decision probably deserves a wider discussion on what 'site-branding-text' actually means as a visual component. It feels like a follow up to me if that's ok with you.
2) #2298015: [policy] Document when we should use each CSS unit
Comment #191
hog commentedSome changes for header blocks theming.
Comment #192
bill richardson commentedIs patch 191 to be applied after patch 181 ?
Comment #193
hog commented181 patch was in branch as seen, because i could not apply 181 patch.
Comment #194
bill richardson commentedHog --- patch 181 has not been commited yet --- so not sure which branch you are working from.
There is another issue 2466983 to fix header in Bartik , maybe that was the issue you wanted to post to.
Comment #195
hog commentedNew patch with 181.
Comment #196
andypostlooks re-roll, cleaned attached files
Comment #197
bill richardson commentedThere is still a problem, when no slogan used , the title is not in the correct position.
Comment #198
emma.mariaComment #199
emma.mariaThe patch in #191 adds back CSS code removed in previous patches, plus the selectors also do not exist in the markup anymore.
The patch in #195 also introduces visual regressions for eg.

I will fix these things up plus fix the issues addressed in #189 and #197.
Comment #200
hog commented@bill richardson, emma.maria
1. Title must be in center of the logo?
2. Logo, site name, site slogan - always in the left of header?
Comment #201
hog commentedSo, after applying 181 path i see this structure:
It's right?
Comment #202
bill richardson commentedHog -- did you clear cache and enable branding block in header region.
The only changes required after patch 181 are some small css changes to correct placement of title with / or without slogan.
Comment #203
emma.mariaI have fixed visual issues that were missed or introduced by myself in #181. These were very small cosmetic fixes and did not require an overhaul of the code.
Comment #204
emma.maria@mdrummond : I checked the Maintenance page. The maintenance page markup needs a huge overhaul in general with it's markup and CSS and I feel like that can be worked on in a follow up issue. The maintenance page also does not load the branding block so it's sort of out of scope to this issue.
Comment #206
lauriiiRerolled the patch
Comment #207
bill richardson commentedPatch 206 displays logo,etc as a block and title / slogan retain the correct positions.
Comment #209
lewisnymanThe only thing I noticed when manually testing this patch was that there is a blank space about the header. You can only see it when anonymous as the toolbar covers it up. This is because the header region has a top margin. Using padding instead should fix this.
Comment #210
hog commentedNow i see regression on the desktop when slogan missing.






Comment #211
emma.mariaChanging individually printed fields (logo, title, slogan) to be contained within one block will definitely create some visual differences with layouts, especially when printing more than one component in the header. There can be visual bugs in the patches but not everything can be classified as a visual regression, we are overhauling the header markup, behaviour and CSS plus adding a new branding block.
I will add screenshots comparing before and after plus justifying the visual differences we have between them. The header looks so so so(!) much better now and I am very happy with the progress.
The patch needs to be fixed one more time though.
@lauriii has accidentally included changes to maintainers.txt in the patch. This is the only file that needs to be removed.
Comment #212
emma.mariaChanging individually printed fields (logo, title, slogan) to be contained within one block will definitely create some visual differences with layouts, especially when printing more than one component in the header. There can be visual bugs in the patches but not everything can be classified as a visual regression, we are overhauling the header markup, behaviour and CSS plus adding a new branding block.
I will add screenshots comparing before and after plus justifying the visual differences we have between them. The header looks so so so(!) much better now and I am very happy with the progress.
The patch needs to be fixed one more time though.
@lauriii has accidentally included changes to maintainers.txt in the patch. This is the only file that needs to be removed.
Comment #213
jibran@lauriii nice way to make it official ;-)
Comment #214
wmortada commentedI have removed the offending file from the patch and attach an updated patch and interdiff.
Comment #215
lauriiiWe still need upgrade path for this :(
Extra line before return is nice :)
Comment #216
wmortada commentedI've added the extra line.
Comment #217
rteijeiro commentedFixed a few nits. It looks nice!
Tested adding and removing branding elements. No issues found.
Check the screenshots:
LOGO BLOCK
LOGO BLOCK CONFIG
Comment #218
rteijeiro commentedJust found a small issue when not logged in. It appears a small black gap on the top. Not sure if it has something to do with what @lewisnyman reported in #209
Back to needs work, sadly :(
Comment #219
rainbowarrayThis should fix the black space at the top of anonymous pages. It sounds like that's the last blocker to RTBC for this. There are some other visual changes, but Emma Maria said she would document the reasons for those. I think that would be good to get in here.
Comment #220
rainbowarrayBring it, Testbot.
Comment #221
lauriiiWe want to get rid of the variables on page.html.twig so we should a test whether we're creating the page for installer/maintenance page and only then add the variables. After doing that we can get rid of $site_config = \Drupal::config('system.site'); on normal page load.
Comment #222
rainbowarrayThis removes the page variables except on maintenance and install pages. It is entirely possible that makes something go kaboom.
And that is why we love Testbot.
Comment #223
rainbowarrayAlso removing unneeded $site_config. Thanks Laurii!
Comment #226
lauriiiWe can move the $site_config to the second if. No need for two separated ifs
Comment #227
lauriiiComment #228
tstoecklerWe have a
template_preprocess_maintenance_page()(which calls out totemplate_preprocess_page()) so wouldn't it make more sense to simply move these there?Comment #229
wim leers#228 sounds like a great idea.
Comment #230
lauriiiFixed tests and addressed open feedback. I was thinking of the upgrade path but its going to be quite useless for the custom themes because of all the unknowns.
Comment #231
joelpittetThis is looking really good from the code huge +1. And the look of it in the browser it's good too. (There is a slight but nice visual change to the position, but it's better aligned with other elements so +1 to that change)
Comment #232
joelpittetBetter deskop screencast

Comment #233
joelpittetSlogan is awesome and emoji's work:D
Slogan

Edit: Search was user-error.
Comment #234
emma.mariaThis issue might solve also #2466983: Clean up the "header" component in Bartik
Comment #235
joelpittetThere was no issue with the search at all. There is a bug in the Blocks UI that makes impossible to drag and drop between regions sometimes. I'll go look for an issue for that.
Anyways the search is fine:)
Comment #236
joelpittetHere is IE9 and IE11 other than emoji fail it's looking fine.
IE 9

IE 11

Comment #237
joelpittetHere's a draft CR. Feel free to update as you see fit. https://www.drupal.org/node/2544012
Comment #238
wim leers#233++
CR looks great.
I think this means this really needs just an upgrade path now, and then it can be RTBC?
Comment #239
dcrocks commentedProbably shouldn't mention region names in the CR as they might change. If a theme doesn't have the correctly named region the block is placed in the default region or disabled.
Comment #240
andypostthe block should be saved as disabled into properly named region
Comment #241
bill richardson commentedsee #238.#240 -- setting to needs work.
Comment #242
lauriiiComment #243
dcrocks commentedre: #240, Blocks are listed 'disabled' if they are not assigned to a region. Are you saying to create an issue to give blocks an enabled/disabled status as part of their configuration?
re: #238, Given the number of user files that might refer to the replaced variables, how do you safely provide an upgrade path?
And the patch no longer applies and needs a re-roll.
Shouldn't this go in before beta?
Comment #244
tim.plunkett#240, that's #2513534: Remove the 'disabled' region from Block UI, please stay in scope here.
Comment #245
madhavvyas commentedPatch re rolled for comment 230
Comment #247
vermauv commentedComment #250
rainbowarrayErrors in the reroll. Here's a fresh one. Thanks for the effort, madhavvyas.
Comment #251
rainbowarrayIf we're going to have an upgrade path, it seems as if it should do the following:
For each enabled theme:
1) Is there a branding block already placed in a region? If so, do nothing.
2) If a branding block has not been placed, is there a region named 'header'? If not, do nothing.
3) If there is a header region, prepare a branding block. Check the theme appearance settings for the toggles for logo, site name and slogan. Apply those settings to a new branding block and place it in that region.
----
Honesty, I'm not sure how many sites will fit the criteria where an upgrade path would prove useful. Promoting the change notice so those with d8 sites can make sure a branding block gets placed may be a better option. This is a change people will notice, and they will want to take action. If we can smooth out that process for the few where that would be helpful, okay, but it will not be possible to create an upgrade path that will result in zero disruption.
Comment #253
rainbowarrayThis should fix the config test errors.
Comment #254
rainbowarrayThere's a good example of how we can do the upgrade path in https://www.drupal.org/node/507488?page=1#comment-10250371 for #507488: Convert page elements (local tasks, actions) into blocks.
Comment #256
rainbowarrayFixing the exceptions by requiring the block module in the broken tests.
Comment #257
rainbowarrayComment #258
bill richardson commentedHappy with patch - just needs an update path.
Comment #259
rainbowarrayHere's a first shot at the upgrade path. We'll still need tests for this upgrade path.
I adapted the upgrade path in #507488: Convert page elements (local tasks, actions) into blocks since it is very similar. Since both need a helper function for creating blocks, I didn't put the update number into the function title. Creating a separate helper function for both patches seems redundant.
The upgrade path I've added is simpler than what I described in #251, rightly or wrongly. Feedback welcome.
Comment #260
rainbowarrayHere are the files. Blergh.
Comment #261
rainbowarrayHere is the upgrade path tests, again based off of the work in #507488: Convert page elements (local tasks, actions) into blocks.
Comment #263
rainbowarrayFixing test exceptions.
Comment #265
rainbowarraySlogan is empty by default, so the test logic was backwards.
Comment #266
wim leersThis was ready in #238 (the patch in #230 was ready, and Joël Pittet did extensive visual regression tests in #231–#237). All that was left, was an upgrade path. I reviewed the interdiffs here, and also am posting a patch-230-to-patch-265 interdiff directly, to make it clear what happened in those last 30 comments. As you can see, no CSS or template changes since #230.
I also manually tested the upgrade path, and experienced no problems.
Thanks for pushing this to the finish line, @mdrummond!
The indentation of the quoted lines under
$values = [is a bit off: indented two spaces too many. Can be fixed on commit.Nit: missing
\nbetween these two lines. Can be fixed on commit.Comment #268
rainbowarrayReroll due to new system update number. Should be fine to move back to RTBC once the patch is green.
Comment #269
wim leersComment #270
lauriiiThis is colliding with #507488: Convert page elements (local tasks, actions) into blocks which is also RTBC. If possible commit the local tasks one first because it has almost 500 comments and then reroll this one.
Comment #272
rainbowarrayDoing a straight-up reroll, but this is going to require some refactoring, because the big change was the addition of the following:
I thought the process layer was removed, but anyhow, this needs to affect the variables in the block template now, rather than the page template, since those variables are no longer in that template.
I think I remember seeing the issue that led to this change. I'll track it down to better understand this.
Comment #273
rainbowarrayOkay, there was just one line changed by #2557871: Remove all usages SafeMarkup::checkPlain() from template preprocess functions and attributes that was removing a SafeMarkup::checkPlain() around getting the site name from site config. I'll double-check the patch to see where that code got moved. We should be able to remove the _process chunk.
Comment #274
rainbowarrayForgot to post the reroll patch.
Comment #275
rainbowarrayOkay, we had removed that whole chunk before, and we weren't using that checkPlain call anywhere else, so this should get us back in shape.
If this is green, should be fine to move back to RTBC. Ideally we'd want https://www.drupal.org/node/507488 to get in first, then reroll this hopefully one last time to fix the update number.
Comment #276
rainbowarrayAnd here's the correct patch.
Comment #279
rainbowarrayFixing the update path test.
Comment #280
wim leers#268 -> #279 patch-based interdiff attached. No actual changes besides catering for
UpdatePathTestBasechanges andSafeMarkupchanges.… but … after a fresh install, the branding block now sits on the right-hand side instead of the left :( So, seems like some of the CSS in HEAD has changed. So unfortunately not back to RTBC.
Comment #281
emma.mariaHmmm I will take a look at whats going on visually.
Comment #282
rainbowarrayHere's a reroll since https://www.drupal.org/node/507488 got in.
Comment #283
rainbowarrayJust tested this on simplytest.me. Branding block is right where it is supposed to be.
Comment #284
emma.mariaI visually tested with simplytest.me all looks fine :)



I am going to do the honours and set this to RTBC :D
Comment #285
Bojhan commentedWhoo, lets do this! :) Thanks.
Couldnt reproduce the issue from Wim
Comment #286
wim leersI'm pretty sure now it was a browser cache problem: Chrome frequently seems to need a *double* hard refresh (Cmd/Ctrl+R) to actually refresh CSS/JS. It indeed works perfectly :)
Comment #288
hussainwebRerolled.
Comment #290
hussainwebCan someone verify if
GET http://ec2-54-191-110-230.us-west-2.compute.amazonaws.com/checkout/update.php/results returned 0 (0 bytes).is a valid failure? I don't think this has anything to do with this issue and could be random. Also, I see the test on DrupalCI has passed.Comment #292
rainbowarrayLooks like a random failure. Triggered a re-test. Thanks for the reroll!
Comment #293
rainbowarrayYay, patch is green! Moving back to RTBC.
Comment #294
catchIsn't it up to page manager to also have an update? Do any sites just turn off block module and leave it like that? Won't custom themes need updating whether block is updated or not?
Patch looks great otherwise. Assigning to webchick in case she wants to take this one.
Comment #296
webchick#294 is a valid question, but we could massage this message more in a normal follow-up, methinks.
I'm not exactly sure why this is assigned to me, but if all the folks who've commented on this so far don't have any complaints, not sure I would either. :) This also falls under the class of one of those kinds of patches that a) is completing pre-existing work, and b) would be vastly better to get in prior to RC, so I'm generally +1.
I clicked around with this a bit manually. The upgrade path works, you see the contextual links hover as expected (unfortunately you can't configure any of the relevant settings such as site logo and name; instead the block config directs you to elsewhere, but that's not a new problem). Too bad we don't have quick edit there, but one step at a time. ;) Also installed minimal and the branding block is there in Stark as well. Yay!
The one issue I did find is that when switching from Bartik to Classy as your front-end theme, the site branding block goes away. I talked to mdrummond about this and he said that's a Classy-specific thing, since Classy doesn't enable any blocks. There's an issue to discuss this further at #2562987: Enable blocks in testing profile and/or Classy. Depending on your POV, this is either a regression from HEAD, in that people using Classy now have to do some manual futzing to get something that used to show up automatically to show up. Or, it's a good thing, because it makes the behaviour of blocks consistent throughout.
I kind of lean more towards the former (it's weird that Stark of all things gets this right but Classy (which is supposed to be the "do more for you" theme) doesn't, but since we have a dedicated follow-up to discuss it, I think that's fine to punt for now.
Anyway, can't find anything else to complain about here, sooooo...!
Committed and pushed to 8.0.x. YEAH! Great work on this one, folks!!
Comment #297
dcrocks commented"SiteBrandingConvertedIntoBlockUpdateTest.php" is a cut and paste and then modify copy of "LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php" and unfortunately still kept the same documentation comments of the latter, eg.:
/**
* Tests the upgrade path for local actions/tasks being converted into blocks.
*
* @see https://www.drupal.org/node/507488
That file is giving errors on a patch I am working on for #2513526: Rename the menu regions. I can fix those comments there while I try to fix my problem there unless that is a no-no.
Comment #298
davidhernandezSure, unless you think it is too out of scope for the other issue. In that case, the comment change can be done in a separate issue.
Comment #299
longwaveI opened #2566579: Use sentence case for branding block label as "Site Branding" looks inconsistent to me when compared to the other block labels.
Comment #300
dcrocks commentedre: #298 Ok, this s trivial so I'll make changes in my patch.
Comment #301
wim leersThis line sadly means that any D8 site that already existed will get a branding block (yay!) that is marked to not ever be cached (boo!).
This line simply does not belong here. So… it looks like we need a new update function that takes the site branding block and removes this setting.
Comment #302
dcrocks commentedFrom my comment in #297, I ended up not having to touch that code so I created a followup. Are there other thing that might get stuck in there?
Comment #303
webchickLet's get a follow-up for that upgrade path issue but AFAIK we can just delete the line as long as it happens in the next few days. We only support upgrade path from version X to version Y, not HEAD to HEAD, and there hasn't been a new core release since this was committed.
Comment #304
dcrocks commentedAdded #301 to #2567077: Followup to Use a Branding Block docs - 2005546