Problem/Motivation

Messages was recently turned into a block - see #2289917: Convert "messages" page element into blocks. As a result of this work a new region was created to hold the new block and called Messages to not delay the work.

The Messages region is due to be renamed in the future to something else. The discussion about the permanent region name is postponed until all block conversions are completed see https://www.drupal.org/node/2289917#comment-9707403.
However right now the name of the region is already blocking issues.

Reasons why the Messages region needs to be renamed...

  1. New regions should not be named after the default content that they hold on install. This is limiting, the Messages region is flexible enough to be able to handle a variety of content without the layout breaking.
  2.  

  3. We now have a problem with the markup of Bartik. We have introduced two declarations of the term messages for different components. One is currently an ID #messages that has been added to Bartik for the outer wrapper of the region and one is the class .messages which is used to wrap around the actual messages in Core.
  4.  

  5. We have also created a bug with the CSS in Bartik, we now have two Messages components in Bartik - the region and the block. Which both need their own styling and both need to be treated separately. Also having the same name is causing confusions in other issues.
  6.  

  7. We need to fix a visual regression bug for messages in Bartik but we can't achieve consistent clean markup in Bartik with the current naming. See #2462221: The highlighted region in Bartik is missing layout styles..

We want to remove IDs in Bartik, we have to keep the messages markup and we also want to keep the markup consistent for all regions in Bartik.
Currently the Messages region does not follow the markup structure the rest of the regions are using and we want it to be consistent.

Proposed resolution

Rename the Messages region to a broader name that represents a region that provides useful information to the user.

Remaining tasks

User interface changes

API changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because we need to find a more usable name for the current Messages region. It was an automatic naming decision because of the new messages block. It needed replacing eventually and the time is now.
Issue priority Not critical because everything functions right now. This issue will help unblock other visual bug issues
Unfrozen changes Unfrozen because it only changes a region name in a them.
Disruption Possibly disruptive for users who may already be using Bartik as a D8 theme and configuring the Messages region. However it is visually broken right now and this change will help improve a lot of things visually.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emma.maria’s picture

I asked @fubhy for region naming advice.

We have this list of suggestions so far:

Alert
Notification
Information

Dom.’s picture

Information +1 for me !

Dom.’s picture

Here is a patch to introduce the change of messages (Messages) region to informations (Informations) in Bartik theme.
It does :
- do the change
- make sure messages block is set to informations by default
- add the usual markups for regions :

<div class="informations">
  <aside class="layout-container section clearfix" role="complementary">
     <div class="region region-informations">
       content of information region

Notice it actually fixes CSS issue due to same name between region and block:

Dom.’s picture

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

Status: Needs review » Active

We need to have more discussion first with more people to get a consensus for the region name before we write a patch.

I am also postponing the other issues in the other themes, as the discussion needs to be kept to one place.

yannickoo’s picture

"informations"? There is only "information" (dictionary but no "informations", sorry but we should fix that typo.

I would go for notifications because information can be everywhere on a page (an article is also an information) :)

romainj’s picture

Notifications +1 for me.

Reno Greenleaf’s picture

+1 for Notification/Notifications.
What about "Status"?

Dom.’s picture

Ok for Notifications.
Regarding child issues, I have closed it to handle the renaming of that region all at once, otherwise patches depend from each other which seems wrong.

LewisNyman’s picture

Notifications -1 from me.

It is the same meaning as messages, so it doesn't feel like an improvement for:

New regions should not be named after the default content that they hold on install.

Dom.’s picture

How about ""highlightings" since it is actually above everything but still after header, it is made to hightlight some informations.

emma.maria’s picture

A few people at Drupal Dev Days have mentioned Highlight as their first automatic reaction to the question and without knowing the history of Bartik.

Bartik indeed had a region called Highlighted. Which was removed as there was no use for it, there was no default content to it and messages was not a block until recently.

#1340640: Remove "Highlighted" region from Bartik

Therefore my proposal is to bring back the region name Highlighted, as now in Bartik there is a good use case for the region name.

If a good few people agree we need an issue to swap Messages region for Highlighted.

Dom.’s picture

This can be done here in this issue I guess.
However hightlighted is still much used in core. Ie defined in ThemeHandler.php, used in page.html.twig along with messages and so one.
It looks like we cannot rename 'messages' to 'hightlighted' in core but have both. However, in Seven theme we can rename messages to hightlighted. That means messages would still be available, but not used in Seven. Would it be ok ?

lauriii’s picture

Status: Active » Needs review
FileSize
3.15 KB

+1 for Highlighted

lauriii’s picture

+++ b/core/themes/bartik/templates/page.html.twig
@@ -109,7 +109,13 @@
+    {% if page.highlighted %}

Just as a side note; this might be unnecessary if condition because I think messages are being printed always so this condition will pass every time #953034: [meta] Themes improperly check renderable arrays when determining visibility

lauriii’s picture

Status: Needs review » Needs work

@Dom. Do you mean that the default highlighted region couldn't be used in Bartik? If so, why?

My patch is crappy.

LewisNyman’s picture

FileSize
508.15 KB

Highlighted makes sense to me.

@Dom. That's true the default regions in Drupal include both messages and highlighted. https://www.drupal.org/node/171206

I think that if we don't need both messages and highlighted for Bartik and Seven than we don't need to add these for all themes, most custom and contrib themes define their own, so what's the benefit of having both in core?

I think we should create a core-wide issue to remove the messages region for all themes and maintain highlighted throughout.

star-szr’s picture

+1 to Highlighted. The other names just felt like synonyms of messages to me.

Dom.’s picture

@LewisNyman for #17 : +1 for this ! Remove Messages region from everything within core : replace it with Hightlighted region everywhere and in core themes.
Would this be accepted though regarding beta evaluation since it may be diruptive to contributed themes that started to go with those core regions.

lauriii’s picture

Status: Needs work » Needs review
FileSize
2.5 KB

Little less crappy patch

Dom.’s picture

@laurii: thanks for help on this.
If we go to removing messages in core however, you must take care of it in all core themes: seven, classy etc.. So you will probably need to touch there CSS too.
Also you forgot the core definition of those regions : ThemeHandler.php

Dom.’s picture

Status: Needs review » Needs work

The last submitted patch, 20: rename-messages-region-2470807-20.patch, failed testing.

emma.maria’s picture

The patch in #20 only affects Bartik. This issue is also only for Bartik.

Bartik has blocked issues linked to having the Messages region name, so I see this as a higher priority over core.
#2462221: The highlighted region in Bartik is missing layout styles..

We need to raise a separate issue just for handling the core Messages region, so for Stark and Classy. The theme Seven can keep the region if it wants to.

I would set this back to Needs Review if the patch had passed :)

emma.maria’s picture

The patch is corrupt. We need a brand new patch that contains the work in #20.

emma.maria’s picture

Status: Needs work » Needs review
FileSize
2.36 KB

I have created a new patch.

I did a straight replacement of any instances of the Messages region to Highlighted region. I did not add any extra markup to the templates to keep the work in scope with this issue. This will be addressed in #2462221: The highlighted region in Bartik is missing layout styles..

LewisNyman’s picture

I applied this patch and reinstalled Drupal and the messages block appears in the highlighted region in Bartik.


I guess we need to remove this change record or edit it to mention the messages region instead? The messages region was added during the D8 cycle so I don't know if we need to add a CR to say we've removed it again. https://www.drupal.org/node/2398539

emma.maria’s picture

emma.maria’s picture

OK I have spoken to @alexpott about the change record.

We need to take the existing change record about the Highlighted region here The Bartik region 'Highlighted' has been removed and edit it to reflect that we have taken the Highlighted region out from where it was and moved it's name to a new region full width below the header to hold the Messages block. But please do word it better than I just have ;)

That way if anyone reads the previous issue that removed the Highlighted region they can see what has happened since as the CR is referenced in that issue.

emma.maria’s picture

Status: Needs review » Needs work
jp.stacey’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record updates

Change record edits available for comment: https://www.drupal.org/node/2398539

Until the CR changes are approved, I've left the intermediate screenshot attached to the node, but with "Display" unchecked.

LewisNyman’s picture

Status: Needs review » Reviewed & tested by the community

Nice, the change record looks good.

emma.maria’s picture

Issue summary: View changes

Beta evaluation added.

emma.maria’s picture

Issue summary: View changes

Suggested commit message

git commit -m 'Issue #2470807 by Dom., emma.maria, lauriii, LewisNyman, jp.stacey: Rename the Messages region in Bartik'

Wim Leers’s picture

Title: Rename the Messages region in Bartik. » Rename the "Messages" region in Bartik to "Highlighted"
Status: Reviewed & tested by the community » Needs review

Improving issue title.

Shouldn't this issue also handle the "Messages" region in ThemeHandler, Classy and Seven? I think this improvement makes sense, but wouldn't it better to look at the whole of Drupal, to keep things as consistent as possible? Back to NR for that.

Dom.’s picture

+1 That was my proposition at #21 :)
Because it will be hard to make separated patch for each themes.

LewisNyman’s picture

Status: Needs review » Reviewed & tested by the community

Shouldn't this issue also handle the "Messages" region in ThemeHandler, Classy and Seven? I think this improvement makes sense, but wouldn't it better to look at the whole of Drupal, to keep things as consistent as possible? Back to NR for that.

I can answer that, we have followup issues for changing it globally and in Seven #2471697: [meta] Rename the default Messages region for all themes #2471655: Rename the Messages region in Seven.. I think at devdays we decided against doing it in one big patch because this was a big blocker for Bartik issues.

I didn't realise the other issues were closed, I will reopen them.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

I'm going to push back on having this inconsistency. I agree with @Wim Leers and @Dom. we should be changing the messages region everywhere to be highlighted.

I'm +1 on the region name of Highlighted. It makes sense to me.

jp.stacey’s picture

Title: Rename the "Messages" region in Bartik to "Highlighted" » Rename the default "Messages" region for all themes to "Highlighted"
Issue tags: +Needs change record updates

As per the rationale here all other issues are closed in favour of this one, rather than having a META with child issues.

This issue therefore becomes one of combining and making consistent the following (quite small) patches:

* https://www.drupal.org/files/issues/rename-messages-region-2470807-26.patch
* https://www.drupal.org/files/issues/rename-messages-region-2471697-1.patch
* https://www.drupal.org/files/issues/rename-messages-region-2471655-1.patch

Plus also reviewing e.g. files and filenames in core/profiles/standard/config/install , and also confirming we've made any necessary changes to ThemeHandler.

jp.stacey’s picture

Assigned: Unassigned » jp.stacey

Looking at this now.

jp.stacey’s picture

Assigned: jp.stacey » Unassigned
Status: Needs work » Needs review
FileSize
6.87 KB

Attached is a patch for review. This patch addresses the tasks in #39 as follows:

  • Combine 3 existing patches: done on 8.0.x HEAD; "informations" changed to "highlighted" throughout.
  • Consider renaming core/profiles/standard/config/install files: NOT done; .yml filename convention seems to be based on the block (messages) rather than the region (highlighted); so leaving as it is.
  • Review ThemeHandler: done, provisionally; but I don't know what tests it might break. I'm not set up to run tests locally at the moment, hence uploading for the d.o TestBot!

Mostly as I say above I'm uploading to see if the tests all pass, but also this patch is available for review by the community.

(No interdiff uploaded, as this is 3 patches merged.)

Status: Needs review » Needs work

The last submitted patch, 41: rename-messages-region-2470807-41.patch, failed testing.

LewisNyman’s picture

Status: Needs work » Needs review
FileSize
1.5 KB
8.36 KB

It looks like the tests were failing because they couldn't find some messages that were printed. I had a look over the codebase for anywhere where we were still printing the messages region instead of highlighted. For some reason we were still printing both in Stark? I removed that.

Status: Needs review » Needs work

The last submitted patch, 43: rename-messages-region-2470807-43.patch, failed testing.

davidhernandez’s picture

Looks to be missing the core install-page and maintenance-page changes. Was that suppose to be changed? That won't fix the tests though. I'm looking at that now, but haven't tracked it down yet.

LewisNyman’s picture

Status: Needs work » Needs review
FileSize
896 bytes
9.24 KB
LewisNyman’s picture

Issue tags: +Needs change record

Status: Needs review » Needs work

The last submitted patch, 46: rename-messages-region-2470807-45.patch, failed testing.

davidhernandez’s picture

Status: Needs work » Needs review
FileSize
10.02 KB
797 bytes

This should fix some tests.

jp.stacey’s picture

+1 to RTBC:

* Patch applies cleanly on 8.0.x HEAD (d4bef05)
* Bartik, Seven and Classy all have a "Highlighted" region
* Bartik and Seven have the "Messages" block within "Highlighted"; Classy doesn't, but then it has no other blocks active and no profile install YAML files, so I'm assuming this is by design?

What shall we do with the change record? As I see it, how we resolve that could be a bit fiddly:

* There was originally a Bartik "Highlighted removed" record.
* When this ticket only covered Bartik, this change record was modified to a Bartik "Highlighted moved" record.
* However, now this ticket covers Bartik, Classy, Seven and core, presumably there are also other change records existing for removing Highlighted from them?

So: should all the other change records be somehow stepped down in favour of the one here, and we then combine everything into one change record? Or should they all be edited in the same way? Do records even exist for all other themes? If not, do we create a new one for each theme?

LewisNyman’s picture

However, now this ticket covers Bartik, Classy, Seven and core, presumably there are also other change records existing for removing Highlighted from them?

We need to create a new change record that covers all themes. It doesn't exist yet.

LewisNyman’s picture

Component: Bartik theme » theme system
Issue tags: -Needs change record updates

Ok the Bartik change record looks good, I've written the change record for all themes. Can someone review it? https://www.drupal.org/node/2486961

emma.maria’s picture

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

I have checked the change record, added a few minor fixes and it explains the change well.

The work in #50 addresses that the 'Highlighted' region is working correctly.

I deem this RTBC.

emma.maria’s picture

Issue summary: View changes
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 249e520 and pushed to 8.0.x. Thanks!

Thank for adding the beta evaluation to the issue summary.

  • alexpott committed 249e520 on 8.0.x
    Issue #2470807 by LewisNyman, Dom., davidhernandez, emma.maria, jp....
mrf’s picture

Status: Fixed » Needs work

This introduced a regression for watchdog messaging.

After patch was applied display of messages was being delayed.

Steps to reproduce regression:
- Clean install of Drupal 8 head
- Create a content type with a single image field
- Create a node of that content type and add an image

At the point the image is attached all messages from the install up to that point suddenly appear inline above the image attach area.

Reverting this commit restores normal drupal messaging behavior.

  • alexpott committed 4640912 on 8.0.x
    Revert "Issue #2470807 by LewisNyman, Dom., davidhernandez, emma.maria,...
alexpott’s picture

I've tried to reproduce this. Here are my steps:

  1. Install Drupal 8
  2. Created a content type
  3. Created a image field and pressed save on the field settings page
  4. Go to node edit screen and upload an image
davidhernandez’s picture

Adding some info. These are messages I see through the process with the patch applied.

Congratulations, you installed Drupal!
The content type test has been added.
Saved Image configuration.
test blah has been created.

I cannot reproduce the report in #57. @mrf, can you provide more info on your environment, steps, and maybe things you were working on? Were you using the standard install profile or minimal? Did you do anything else before creating the content type? What messages do you remember seeing in the list?

lauriii’s picture

Issue summary: View changes
Status: Needs work » Needs review

Removing the suggested commit message since its the same as the one that d.o suggests.

davidhernandez’s picture

If we can't reproduce this, how do we proceed? @mrf, can you try again and see if you get a similar result?

mrf’s picture

Installed a fresh copy of Drupal8, applied this patch and I am now unable to successfully reproduce this issue.

This came up when I was trying to reproduce the bug in https://www.drupal.org/node/2410001. So no additional patches were applied, just a whole lot of views and content type creation prior to seeing this.

After I initially noticed this issue I pulled the latest core (mine was only a few hours old), dropped my database and reinstalled the standard profile from the UI. For good measure I did the re-install a third time, and was still seeing the same symptoms.

This is when I reverted this patch per Alex's suggestion and I immediately stopped seeing the strange messaging behavior on my next install of the standard profile.

I'm on Ubuntu 15.04, PHP 5.6.4, MySQL 14.14 and NGINX 1.62, no opcode cache installed if that might make a difference.

mrf’s picture

Ok, found a breadcrumb trail.

That original install where I had seen this issue on this same machine is still showing the issue when I apply the patch to latest HEAD.

I have to be offline for a few hours, but I'll start the process of dissecting the differences between my two D8 installs a bit later this evening to see what the crucial missing piece is to trigger this issue.

mrf’s picture

My own comment about installing and re-installing tipped me off on to how to reproduce.

This issue will not show up on a brand new install where Drupal has not been installed previously.

This issue will only show up when this patch was applied and Drupal was installed previously and the files/php and config directories were left in place.

Screenshots attached of where the first missing message occurs.

davidhernandez’s picture

Hmm. That sounds like it isn't a concern then? Since this patch changes regions and templates (particularly changes to BareHTMLPageRenderer and install-page,) I'm guessing there are still compiled templates hanging around in the files directory that the next install ends up using, but conflict with what the live code is now doing. One thing to try is installing fresh with the patch, and then installing again without clearing the files directory. If the problem isn't reproduced, I assume that's the reason.

mrf’s picture

Hmm looks like Drupal.org swallowed my comment, lets give this another shot.

I just tried again with the patch applied on a clean copy before Drupal was installed and the bug does not occur on a second or third install even with files left in place.

Looks like this was just a transient issue, sorry for all the noise everyone.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @mrf for checking this out. Let's get this done :)

Committed e050515 and pushed to 8.0.x. Thanks!

Now where is my karma kitten sticker?

  • alexpott committed e050515 on
    Issue #2470807 by LewisNyman, Dom., davidhernandez, emma.maria, lauriii...
lauriii’s picture

@alexpott: I can give you karma kitten stickers for each commit you make from commiting this patch till Drupal Sauncamp if you show up there ;)

emma.maria’s picture

@alexpott I will post you a kitten karma sticker :)

Thanks everyone for getting this issued to Fixed again.

Status: Fixed » Closed (fixed)

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