Resolve #3486209 "Status messages hide behind the menu header on landing pages"
Closes #3486209
Adds padding above the status me3ssage area on landing pages so that the messages are never blocked by the global menu header. It also updates the landing page content model to force a separation between hero components and other components so that other components also cannot get covered up by the main header.
Note: this Work and particularly the configs in the associated Drupalorg site MR will require updates to existing Landing pages. ALl hero components (hero and centered hero) need to be revied fromt he component paragraph field and added to the new Hero paragraph fields. This change will force pages to be created in a way where no component content will ever get covered up by the main header.
To test:
- Check out the following MR: https://gitlab.com/drupal-infrastructure/sites/drupalorg/-/merge_requests/69
- run
ddev composer install
- run
composer recreate
- Add the following test messages to line 34 in
bluecheese.theme
// test status messages.
\Drupal::messenger()->addStatus(t('Successful message.'));
\Drupal::messenger()->addWarning(t('Warning message.'));
\Drupal::messenger()->addError(t('Error message.'));
-
run
ddev drush cr
-
View any page not logged in.
-
You should see messages below the page header (the above screenshot is outdated. I added the colors and icons back in.)
-
View a landing page such as /mother-node
-
the messages should appear under the global header
- Verify that the same pages render as expected when logged in.
- Remove the test code added and make sure everything looks right without the status messages.
- Create a new landing page
- Try to make a landing page that has any components covered by the top global header other than the overlap intended in the designs of the heroes. YOu should not be able to.
follow-up
Update default content landing pages so that they do not berak as a result of this change. You will need to create new Hero component and have it in the hero paragraph area and remove all hero components from the component section. there can only be one hero component at the top of the page now.