Problem/Motivation
Part of #1342054: [META] Clean up templates and CSS
Bartik has a lot of regions (bartik.info.yml
):
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
help: Help
page_top: 'Page top'
page_bottom: 'Page bottom'
highlighted: Highlighted
featured: Featured
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
triptych_first: 'Triptych first'
triptych_middle: 'Triptych middle'
triptych_last: 'Triptych last'
footer_firstcolumn: 'Footer first column'
footer_secondcolumn: 'Footer second column'
footer_thirdcolumn: 'Footer third column'
footer_fourthcolumn: 'Footer fourth column'
footer: Footer
Having this many regions might be really confusing, especially for new people.
Proposed resolution
It has been decided in the comments below that Highlighted region can be removed from Bartik.
Remaining tasks
Write a patchDone. #33- Code Review the patch - are all references of Highlighted removed? Novice instructions here
- Add Screenshots for Visual Review of the patch - does Blocks layout in admin look ok? Blocks demo page? Frontend of Bartik look ok? RTL? Novice instructions here
User interface changes
Yes, we are removing a region, therefore it will not be available to place content within anymore.
API changes
None.
Original report by @jenlampton
I know Bartik was made to be flexible - but having this many regions in the default theme is really confusing for new people. Can we start by removing the least frequently used regions?
Beta phase evaluation
Issue category | Task because it's a clean up task for Bartik. It was said that Highlighted is not really part of the design and it's not needed for content placement. Therefore it can be removed as there are currently too many regions than necessary. |
---|---|
Unfrozen changes | This is primarily a theming change; however, because it removes a region, it will affect configuration that currently depends on that region names (including block placement). So it ideally should be completed before the beta-to-beta upgrade path is provided since it would require update hooks. |
Prioritized changes | The main goals of this issue are usability and themer experience, since the region 'Highlighted' has been decided as not needed it should be taken out to leave the themer with just the most sensible region options. |
Disruption | Disruptive for site installs that currently use the region being removed. Not disruptive for Contrib themes/modules should not be relying on a region to exist. |
Comment | File | Size | Author |
---|---|---|---|
#44 | remove_highlighted-1340640-44.patch | 2.26 KB | DickJohnson |
#40 | Screen Shot 2014-12-25 at 8.10.52 PM.png | 106.27 KB | tadityar |
#40 | Screen Shot 2014-12-26 at 5.37.14 PM.png | 87.61 KB | tadityar |
#40 | Screen Shot 2014-12-26 at 5.33.48 PM.png | 39.58 KB | tadityar |
#40 | Screen Shot 2014-12-26 at 5.36.59 PM.png | 170.64 KB | tadityar |
Comments
Comment #1
webchickI like "Featured" because it's styled differently, and makes for kind of a dramatic "call-out" effect. I've seen it used pretty frequently on Bartik sites out there "in the wild."
Highlighted, at first glance, seems like it could just be blocks ordered above the "Main page content" block in the "Content" region, other than the page title is smucked at the top. I haven't looked at / studied the CSS at all though to understand the reasoning behind it.
Comment #2
jenlamptonIf featured is widely used then we should keep it. If we can come up with a reasonable upgrade path (like, this block goes in that region with a more-negative weight) then I think we should remove Highlighted.
Comment #3
couturier CreditAttribution: couturier commentedI am about as new a user as exists in Drupal and in web development in general. Please keep Featured! It is needed for amateur users like me for special announcements, not all the time, but on occasion. I would reduce the font size in Featured in core (it is really too big right now, and I've reduced it in my sub-theme).
Highlighted could definitely be taken out, in my opinion, and would eliminate confusion, as these comments suggest. If someone wanted something there, they could just create a block for it, and if someone is wanting the special effect similar to the CSS for Highlighted, they would be better off using Featured instead to get it to spread all the way across the page. I've often confused Highlighted and Featured when trying to alter the CSS, just because the names are so similar. Someone who wants many different regions is probably going toward Panels rather than Blocks, so I think taking out Highlighted would be a positive step toward simplification for Blocks users.
Comment #4
jensimmons CreditAttribution: jensimmons commentedThe only reason I included "highlighted" is because it was a new region for Drupal 7 core that seemed to be required for all themes. It's a region in Stark. I assumed that contrib modules might need or expect this region, and not having it in Bartik could mess things up when using such a module. I also assumed that not including the 'highlighted' region would have blocked Bartik from being added to core. So for all those reasons I put it in.
It's not really part of the design of Bartik. I agree, it's not needed for content placement. I expected (wrongly) that people would know to ignore it and not put any content in it (because magically everyone knows the full backstory of the evolution of core and never gets tripped up on Drupal WTFs).
I'd be fine with highlighted being removed. Like I said, it wasn't really part of the design in my head. If it's not a core requirement (or if that requirement has worn off), then it can go. I do agree, "featured" should stay. It's a big part of the design.
Comment #5
Bojhan CreditAttribution: Bojhan commentedPatch please! :)
Comment #6
sqndr CreditAttribution: sqndr commentedComment #7
emma.mariaComment #8
Scionar CreditAttribution: Scionar commentedComment #9
Scionar CreditAttribution: Scionar commentedComment #10
aspilicious CreditAttribution: aspilicious commentedI think it also need to be removed from the template?
Comment #11
Jeff Burnz CreditAttribution: Jeff Burnz commentedIt needs to be removed from the template, any CSS that is associated (if any, I can't remember) and IMO we might consider the need for a BC layer for D7 because we have no idea how we're are going to cripple sites that use this region for unknown amounts of blocks, JS hooks and the like.
Comment #12
DickJohnson CreditAttribution: DickJohnson commentedRemoved highlighted from template also.
Comment #15
DickJohnson CreditAttribution: DickJohnson commentedI wrote this one to completely wrong issue queue. Sorry about it.
Comment #16
DickJohnson CreditAttribution: DickJohnson commentedStill sorry about the last one.
So, on this patch also highlighted related css has been removed from style.css file.
Comment #18
DickJohnson CreditAttribution: DickJohnson commentedComment #19
emma.mariaComment #20
sqndr CreditAttribution: sqndr commentedSo are we only removing the Highlighted region? What about all of these:
Comment #21
emma.mariaThese provide different layouts out of the box for users. Otherwise everything would just be stacked on top of each other.
This has been raised before here https://www.drupal.org/node/1164784#comment-5234882 and in comment 13.
But no one agreed anything there or raised them in this issue either.
If we are going to consider regions that will affect the design out the box, it will be a big change that needs more discussion and planning.
We should focus just on 'Highlighted' for now as many people and Bartik maintainers have agreed to this change in previous comments and we can raise a further issue to refactor the regions in Bartik.
Comment #22
Bojhan CreditAttribution: Bojhan commentedSo is this RTBC?
Comment #23
emma.mariaThe patch applies cleanly. It removes the Highlighted region from bartik.info.yml, style.css and page.html.twig.
The highlighted region no longer displays on the Block layout page and there are no reported errors from Drupal.
And just to check the frontend, Bartik does not visually appear broken.
Setting this to RTBC.
Comment #24
sqndr CreditAttribution: sqndr commentedAll right. If I'm not mistaking, it needs a Drupal 8 beta phase evaluation template. Nice work DickJohnson with the patching!
RTBC++
Comment #25
emma.mariaComment #26
emma.mariaComment #27
emma.mariaComment #28
DickJohnson CreditAttribution: DickJohnson commentedAs a personal opionion: we should finish #2375673: Split Bartik's CSS into SMACSS style components before commiting this. Rerolling this is much easier than rerolling it.
Comment #29
lauriiiI'll postpone this to not cause problems on the CSS split issue.
Comment #30
emma.mariaThis need to follow what is happening over at #1164784: “Triptych” term is not widely understood; add "Featured top" and "Featured bottom". We need to add a change record for this.
But keeping this postponed as our main concern is not having a whole ton of work to need to be done on #2375673: Split Bartik's CSS into SMACSS style components if other things get committed first.
Comment #31
xjmAlso tagging as "D8 upgrade path" because, like that issue, this change would result in disappearing blocks and invalid configuration without one.
Comment #32
xjmOh, additionally, let's fill out the "Unfrozen changes" and "Prioritized changes" rows of the beta evaluation, because they're both especially important for normal tasks. Edit: Like that issue, this one is borderline because of the impact on existing sites and config (which needs further discussion generally), but it's not as clearly related to usability as the other. :)
Comment #33
DickJohnson CreditAttribution: DickJohnson commentedRerolled after css -> smacss split.
Comment #34
emma.mariaComment #35
emma.mariaI have updated the issue summary as per #32.
We now need a new code review, new screenshots as we have a new patch in #33 as all Bartik CSS files were split here #2375673: Split Bartik's CSS into SMACSS style components.
Also we need a change record like what has been created for #1164784: “Triptych” term is not widely understood; add "Featured top" and "Featured bottom" here.
Comment #36
tadityar CreditAttribution: tadityar commentedWhen I grepped 'highlighted' these result came up:
but the patch doesn't touch page.html.twig .
Screenshot and change records coming.
Comment #37
DickJohnson CreditAttribution: DickJohnson commentedOk. New patch around with changes from #36.
Comment #38
tadityar CreditAttribution: tadityar commentedStatus change for testbot to test and draft Change Record: https://www.drupal.org/node/2398539
Comment #39
tadityar CreditAttribution: tadityar commentedSeems like I incorrectly deleted (overwrited) the form.. sorry! Adding patch from #37 again
Comment #40
tadityar CreditAttribution: tadityar commentedGrepped 'highlighted' in bartik and found nothing.
These are the screenshots tested with simplytest.me
Before
After
no more choices for highlighted region
But there's also an issue (I think outside of the scope of this issue) that when I shrink my browser to min. width it has blank space on the right side.
That's my review so I think it could be RTBC but I'll leave that to more experienced contributors.
Comment #41
lauriiiThanks for the screenshots! Looks good to go. Change record is also there so setting to RTBC.
Comment #43
emma.mariaThe patch no longer applies
Comment #44
DickJohnson CreditAttribution: DickJohnson commentedRerolled.
Comment #45
emma.mariaComment #46
emma.maria@DickJohnson Can you set the issue to Needs Review to fire testbot and update tags once you have rerolled in future, thanks.
Comment #52
emma.mariaI'm going to try and retest one more time. It looks like nothing to do with the patch is breaking... I think...
Comment #54
tadityar CreditAttribution: tadityar commentedFinally the test passed :) Re-upping the RTBC!!
Comment #55
idebr CreditAttribution: idebr commentedComment #56
alexpottFeatured vs highlighted - I wonder how translators deal with that. Nice change. Committed 3fdbd16 and pushed to 8.0.x. Thanks!