Problem/Motivation
Currently the region names for footer are:
footer_firstcolumn: 'Footer first column'
footer_secondcolumn: 'Footer second column'
footer_thirdcolumn: 'Footer third column'
footer_fourthcolumn: 'Footer fourth column'
footer: Footer
It does not make sense to have variants of footer for the first 4 regions and then just plain footer for the last region. Also we should avoid naming regions based on their layout for responsive regions. Also footer needs to fit more in with other region naming conventions where we have used first, second etc.
As discussed here #2398471: Clean up the "footer" component in Bartik in comments 8, 9 and 12.
The new proposed markup and regions for Bartik's footer are as follows....
<div class="site-footer__wrapper">
<footer class="site-footer">
{% if page.footer_first or page.footer_second or page.footer_third or page.footer_fourth %}
<div class="site-footer__top clearfix">
{{ page.footer_first }}
{{ page.footer_second }}
{{ page.footer_third }}
{{ page.footer_fourth }}
</div>
{% endif %}
{% if page.footer_fifth %}
<div class="site-footer__bottom role="contentinfo">
{{ page.footer_fifth }}
</div>
{% endif %}
</footer>
</div>
Markup work is covered in this issue #2398471: Clean up the "footer" component in Bartik but region work was taken out as it is a more delicate topic to be dealt with separately.
Proposed resolution
Replace the existing footer regions with...
footer first
footer second
footer third
footer fourth
footer fifth
Remaining tasks
Write a patch
Write a change record for the name changes, see here for a similar region name changing issue draft.
Review the patch - code review
Review the patch - visual review of Bartik + screenshots
Review the change record
User interface changes
API changes
Test instructions
Apply the patch
Reinstall Drupal 8 on your computer
Then test the new regions and provide screenshots.
Beta phase evaluation
Issue category | Task because this is part of the cleanup of Bartik. The current region names confuse some and do not make sense now that Bartik is responsive. |
---|---|
Unfrozen changes | Unfrozen because it's related to themes. We want Bartik to be a good theme example and this work will contribute to that. |
Prioritized changes | The main goal of this issue is usability. The column regions are wrongly named as columns do not exist on mobile devices. And we shouldn't have a region called only 'footer' amongst other regions that exist in the footer. The names do not make sense and should have standardised names. |
Disruption | Disruptive for people who currently use the Bartik theme, but we are keeping all of the regions in the same configuration plus added a change record. |
Comment | File | Size | Author |
---|---|---|---|
#50 | after footer rename.png | 32.77 KB | emma.maria |
#50 | before footer rename.png | 35.03 KB | emma.maria |
#43 | rename-footer-regions-in-bartik-2402639-43.patch | 11.83 KB | lakshminp |
#36 | Bildschirmfoto 2015-01-19 um 00.19.21.png | 13.77 KB | dernetzjaeger |
#36 | Bildschirmfoto 2015-01-19 um 00.18.42.png | 68.35 KB | dernetzjaeger |
Comments
Comment #1
kporras07 CreditAttribution: kporras07 commentedAttaching patch with proposed solution.
Regions name changes
Footer first column becomes Footer first
Footer second column becomes Footer second
Footer third column becomes Footer third
Footer fourth column becomes Footer fourth
Footer column becomes Footer fifth
This will also have an impact on any Bartik subthemes, and be most apparent on admin/structure/block, and in the configuration settings for placing individual blocks in regions.
(Change record taken from here and modified)
Comment #2
kporras07 CreditAttribution: kporras07 commentedComment #4
nitvirus CreditAttribution: nitvirus commentedComment #5
nitvirus CreditAttribution: nitvirus commentedHi,
I have attached the patch file for renaming the footer section in bartik theme.
files changed:
1. core/themes/bartik/bartik.info.yml
2. core/themes/bartik/css/layout.css
3. core/themes/bartik/templates/page.html.twig
Regions named changed:
Footer first column becomes Footer first
Footer second column becomes Footer second
Footer third column becomes Footer third
Footer fourth column becomes Footer fourth
Footer column becomes Footer fifth
Comment #6
nitvirus CreditAttribution: nitvirus commentedChanged the status from needs work to needs review.
Comment #8
nitvirus CreditAttribution: nitvirus commentedThis patch shouldn't have failed. applying for retesting.
Comment #11
emma.mariaThe patch will fail as the region names for footer have been changed and the tests are looking for the original names.
Also...
This patch should only contain region renaming work in the CSS, templates and info file. Markup around the regions is being worked on in #2398471: Clean up the "footer" component in Bartik.
Comment #12
nitvirus CreditAttribution: nitvirus commentedThanks for the reply Emma,
Could you help me a bit, how can this patch be accepted. I suppose I need to remve the css changes from the patch and then upload a new patch.
Thanks for the help.
Comment #13
emma.mariaYes apply your patch in #5 to Core and put back the original selectors that you changed in your first patch, which I highlighted in #11. Then create and upload a new patch from that work.
Comment #14
nitvirus CreditAttribution: nitvirus commentedThanksfor the reply emma. Would be uploading the patch
Comment #15
nitvirus CreditAttribution: nitvirus commentedUploading the patch again. Keeping my fingers crossed.
Thanks,
nitvirus
Comment #16
lauriiiComment #18
Katiemouse CreditAttribution: Katiemouse commentedPrevious patch by @nitvirus does not apply, so I am going to reroll.
Comment #19
Katiemouse CreditAttribution: Katiemouse commentedHi this is my rerolled version of the patch, it is the exact same as @nitvirus'. I have made no functional changes :)
Comment #21
rhysmdnz CreditAttribution: rhysmdnz commentedHi, I updated the tests to use the new region name
Comment #23
Katiemouse CreditAttribution: Katiemouse commentedHi I have tried to fix some of the errors from the previous patch :)
Comment #25
emma.mariaAs we have renamed the regions there will be tests based on the old names that will now fail.
The content so far in the patch is great, we just need to work on getting the tests passing now :)
Comment #26
saki007sterComment #27
Prashant.cAdding patch for renaming Bartik footer regions.
Comment #28
saki007ster@Prashant.c The patch in comment # 23 does same we need to update the test cases for renaming the footer regions. See @emma.maria 's comment #25 .
Comment #29
piyuesh23 CreditAttribution: piyuesh23 commentedComment #30
piyuesh23 CreditAttribution: piyuesh23 commentedComment #31
llbbl CreditAttribution: llbbl commented@saki007ster I don't see any test cases that need to be updated, did you mean to say that we need to add some new ones for renaming the footer regions? The closest one I found was testThemeTableFooter() in core/modules/system/src/Tests/Theme/TableTest.php. Sorry I wanted to help with this one but unsure exactly what needs to be done.
Comment #32
lakshminp CreditAttribution: lakshminp commentedupdated block placements and other CSS parts(layout, typography, colors module support etc).
Comment #33
gippy CreditAttribution: gippy commentedAfter applying rename-bartik-footer-regions-2402639-32.patch and clearing the cache, we get a warning:
The block bartik_footer was assigned to the invalid region footer and has been disabled.
The block bartik_powered was assigned to the invalid region footer and has been disabled.
The patch should not disable existing blocks that are left in invalid regions.
Comment #34
gippy CreditAttribution: gippy commentedComment #35
emma.mariaAs the patch contains changes to yml files, I reinstalled Drupal after I applied the patch and it is working fine.
I haven't had a chance to review this thoroughly but I am putting this back to Needs Review, I do not get the errors in #33 and I see this on the Block layouts page....
So the patch does work correctly and I have added test instructions to the issue summary.
Can someone please manually test the patch, check there are no further errors from using the regions after a fresh install and provide screenshots showing the newly named regions in action please??
Also we still need a Change Record to be created for the new names as stated in the "Remaining tasks" section in the issue summary.
Comment #36
dernetzjaeger CreditAttribution: dernetzjaeger commentedI can confirm it works correctly.
Comment #37
lakshminp CreditAttribution: lakshminp commentedI've created a draft change record here: https://www.drupal.org/node/2409999.
Please review.
Comment #38
LewisNymanI tested the patch and it works fine. I also reviewed the change record. I changed to title to "Footer regions in Bartik have been renamed" which feels more accurate and I removed the markup example, as the change record is only about the region names.
Comment #39
alexpottThis issue is a normal task so we need to outline how it fits within the allowable Drupal 8 beta criteria. Can someone add Drupal 8 beta phase evaluation template to the issue summary.
Comment #40
emma.mariaSure, evaluation added.
Comment #41
emma.mariaComment #43
lakshminp CreditAttribution: lakshminp commentedRe-rolling patch with latest dev revision.
Comment #44
LinL CreditAttribution: LinL commentedSetting to Needs review.
Comment #45
LewisNymanThanks, this patch was knocked out by the #2306407: Remove breadcrumb from page template
I diffed the two patches and they are the same
Comment #46
alexpottCommitted adc801b and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.
Comment #48
alexpottThere are 2 CRs??? I've published the one with the better title - however the other still unpublished has better content. Can someone copy the image over?
Comment #49
emma.mariaOops this was not spotted as the incorrect one wasn't posted in the issue. I have copied over the footer layout image to the published change record https://www.drupal.org/node/2409999.
Comment #50
emma.mariaThis issue caused a small CSS regression in Core.
Before:
After:
I have raised a new issue as I also found that another issue also added a small regression, I have combined the work into this issue... #2422975: Bartik footer has CSS regressions..
PLEASE PLEASE PLEASE add screenshots and manually test Bartik before setting these CSS cleanup issues to RTBC.
Comment #52
a.milkovskyI also received warning from #33.
Re-saving of blocks layout settings(/admin/structure/block) fixed the warnings issue for me.
It also fixed strange exception "The "field_item:" plugin does not exist." that I got on configuration import.