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 patch Done. #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

Reference: https://www.drupal.org/core/beta-changes
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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

I 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.

jenlampton’s picture

Title: Too many regions in Bartik? Remove "Featured" and / or "Highlighted" » Too many regions in Bartik? Remove "Highlighted"

If 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.

couturier’s picture

I 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.

jensimmons’s picture

The 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.

Bojhan’s picture

Patch please! :)

sqndr’s picture

Issue summary: View changes
Parent issue: » #2372045: [META] The plan for Bartik
emma.maria’s picture

Title: Too many regions in Bartik? Remove "Highlighted" » Remove "Highlighted" region from Bartik
Issue tags: +frontend, +Novice
Parent issue: #2372045: [META] The plan for Bartik »
Scionar’s picture

Assigned: Unassigned » Scionar
Scionar’s picture

Assigned: Scionar » Unassigned
Status: Active » Needs review
FileSize
396 bytes
aspilicious’s picture

I think it also need to be removed from the template?

Jeff Burnz’s picture

Status: Needs review » Needs work

It 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.

DickJohnson’s picture

Assigned: Unassigned » DickJohnson
Status: Needs work » Needs review
FileSize
1.34 KB

Removed highlighted from template also.

Status: Needs review » Needs work

The last submitted patch, 12: remove_highlighted-1340640-12.patch, failed testing.

Status: Needs work » Needs review
DickJohnson’s picture

I wrote this one to completely wrong issue queue. Sorry about it.

DickJohnson’s picture

Still sorry about the last one.

So, on this patch also highlighted related css has been removed from style.css file.

The last submitted patch, 15: split_bartik_s_css_into-2375673-24.patch, failed testing.

DickJohnson’s picture

Assigned: DickJohnson » Unassigned
emma.maria’s picture

Issue summary: View changes
sqndr’s picture

So are we only removing the Highlighted region? What about all of these:

  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'
emma.maria’s picture

  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'

These 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.

Bojhan’s picture

So is this RTBC?

emma.maria’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
96.67 KB
77.89 KB
126.91 KB

The 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.

sqndr’s picture

Status: Reviewed & tested by the community » Needs work

All right. If I'm not mistaking, it needs a Drupal 8 beta phase evaluation template. Nice work DickJohnson with the patching!

RTBC++

emma.maria’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community
emma.maria’s picture

Issue summary: View changes
emma.maria’s picture

Issue summary: View changes
DickJohnson’s picture

As 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.

lauriii’s picture

Status: Reviewed & tested by the community » Postponed

I'll postpone this to not cause problems on the CSS split issue.

emma.maria’s picture

Issue tags: +Needs change record

This 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.

xjm’s picture

Issue tags: +D8 upgrade path

Also tagging as "D8 upgrade path" because, like that issue, this change would result in disappearing blocks and invalid configuration without one.

xjm’s picture

Oh, 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. :)

DickJohnson’s picture

Rerolled after css -> smacss split.

emma.maria’s picture

Status: Postponed » Needs review
emma.maria’s picture

Issue summary: View changes
Issue tags: +Needs screenshots

I 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.

tadityar’s picture

Status: Needs review » Needs work

When I grepped 'highlighted' these result came up:

core/themes/bartik/bartik.info.yml:  highlighted: Highlighted
core/themes/bartik/bartik.libraries.yml:      css/components/highlighted.css: {}
core/themes/bartik/css/components/highlighted.css:#highlighted {
core/themes/bartik/templates/page.html.twig: * - page.highlighted: Items for the highlighted content region.
core/themes/bartik/templates/page.html.twig:      {% if page.highlighted %}<div id="highlighted">{{ page.highlighted }}</div>{% endif %}
core/themes/seven/templates/page.html.twig: * - page.highlighted: Items for the highlighted content region.

but the patch doesn't touch page.html.twig .

Screenshot and change records coming.

DickJohnson’s picture

Ok. New patch around with changes from #36.

tadityar’s picture

Status: Needs work » Needs review
Issue tags: -Needs screenshots
FileSize
156.45 KB
96.48 KB
84.64 KB

Status change for testbot to test and draft Change Record: https://www.drupal.org/node/2398539

tadityar’s picture

Seems like I incorrectly deleted (overwrited) the form.. sorry! Adding patch from #37 again

tadityar’s picture

Grepped 'highlighted' in bartik and found nothing.
grep

These are the screenshots tested with simplytest.me

Before
before0

After
after0
after1


no more choices for highlighted region

after2

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.
anotherissue

That's my review so I think it could be RTBC but I'll leave that to more experienced contributors.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record

Thanks for the screenshots! Looks good to go. Change record is also there so setting to RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 39: remove_highlighted-1340640-37.patch, failed testing.

emma.maria’s picture

Issue tags: +Needs reroll

The patch no longer applies

DickJohnson’s picture

Rerolled.

emma.maria’s picture

Status: Needs work » Needs review
emma.maria’s picture

Issue tags: -Needs reroll

@DickJohnson Can you set the issue to Needs Review to fire testbot and update tags once you have rerolled in future, thanks.

Status: Needs review » Needs work

The last submitted patch, 44: remove_highlighted-1340640-44.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 44: remove_highlighted-1340640-44.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 44: remove_highlighted-1340640-44.patch, failed testing.

emma.maria’s picture

I'm going to try and retest one more time. It looks like nothing to do with the patch is breaking... I think...

Status: Needs work » Needs review
tadityar’s picture

Status: Needs review » Reviewed & tested by the community

Finally the test passed :) Re-upping the RTBC!!

idebr’s picture

Issue summary: View changes
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Featured vs highlighted - I wonder how translators deal with that. Nice change. Committed 3fdbd16 and pushed to 8.0.x. Thanks!

  • alexpott committed 3fdbd16 on 8.0.x
    Issue #1340640 by tadityar, DickJohnson, emma.maria, Scionar:  Remove "...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.