Problem/Motivation

There is no design for the slogan in the Seven theme. This primarily affects the update page as seen here.

Broken slogan in update.php

The styles for this page are under core/themes/seven/maintenance-page.css. This stylesheet is also used by the install.php. During first installation the slogan won't be set, and if the page is revisited after installation the slogan will not be styled because the Seven theme did not account for it.

Broken slogan in install.php

This happens in the context of drupal 8 core installation where the Seven theme is used by default as the administration theme. Installation profiles and distributions can set a different administration theme will not be affected for the missing style for the slogan in the Seven theme.

Proposed resolution

Remove the slogan from the install.php and update.php templates in the Seven theme and updated the styles.

Remaining tasks

In https://drupal.org/node/2230997#comment-8883137, it was proposed to refactor the markup and styles. Evaluate if this could be a separate issue.

In https://drupal.org/node/2230997#comment-8880859, it was identified an issue with the step list's right padding on RTL languages. This should go into a separate issue.

User interface changes

Slogan will not be rendered in the installation and updated pages when Seven is used as the administrative theme.

API changes

None.

Original report by @penyaskito

Follow-up from #2169765: Redesign update.php to be more consistent with the installation process. The site slogan seems to have been missed during this redesign.

Update page screenshot

Same applies for install.php

CommentFileSizeAuthor
#74 remove-the-slogan-in-update-php-2230997-74.patch3.13 KBLewisNyman
#74 interdiff.txt1019 bytesLewisNyman
#72 RTL After.png28.2 KBericski
#72 RTL Before.png23.27 KBericski
#72 LTR After.png32.96 KBericski
#72 LTR Before.png32.18 KBericski
#71 interdiff-62-71.txt312 bytesdinarcon
#71 remove-the-slogan-in-update-php-2230997-71.patch2.63 KBdinarcon
#71 install_page.png73 KBdinarcon
#69 interdiff-2230997-62-69.txt9.2 KBjiv_e
#69 remove-the-slogan-in-update-php-2230997-69.patch11.04 KBjiv_e
#63 Screen Shot 2014-06-14 at 18.54.46.png78.29 KBjiv_e
#63 interdiff-2230997-59-62.txt541 bytesjiv_e
#63 remove-the-slogan-in-update-php-2230997-62.patch2.63 KBjiv_e
#61 Screen Shot 2014-06-14 at 18.49.25.png55.13 KBjiv_e
#61 Screen Shot 2014-06-14 at 18.47.41.png79.69 KBjiv_e
#59 remove-the-slogan-in-update-php-2230997-59.patch2.36 KBjiv_e
#55 updated after.png32.47 KBericski
#55 updated before.png25.08 KBericski
#54 update.png25.78 KBHaloFX
#53 remove-the-slogan-in-update-php-2230997-52.patch2.35 KBdinarcon
#53 interdiff-51-52.txt423 bytesdinarcon
#52 update.png27.59 KBHaloFX
#51 interdiff-47-51.txt5.6 KBjstoller
#51 remove-the-slogan-in-update-php-2230997-51.patch2.8 KBjstoller
#47 remove-the-slogan-in-update-php-2230997-47.patch2.35 KBdinarcon
#47 interdiff-43-47.txt631 bytesdinarcon
#45 error.PNG267.62 KBdarol100
#43 remove-the-slogan-in-update-php-2230997-43.patch1.61 KBdinarcon
#43 interdiff-40-43.txt340 bytesdinarcon
#41 remove-the-slogan-in-update-responsive-before-after-images.zip436.91 KBdaviddemello
#40 remove-the-slogan-in-update-php-2230997-40.patch1.56 KBjstoller
#39 after.png13.6 KBericski
#39 before.png14.66 KBericski
#37 remove-the-slogan-after.png89.46 KBdaviddemello
#32 remove-the-slogan-in-update-php-2230997-32.patch1.54 KBdinarcon
#26 remove-the-slogan-in-update-php-2230997-25.patch748 bytesdinarcon
#21 remove_the_slogan_in-2230997-21.patch716 bytesStevenPatz
#17 remove_the_slogan_in-2230997-17.patch713 bytesStevenPatz
#15 remove-the-slogan-in-update-php-2230997-15.patch715 bytesdinarcon
#14 remove_the_slogan_in-2230997-14.patch558 bytesStevenPatz
#10 seven_theme-2230997-10.patch1020 byteslauriii
#7 interdiff-1-7.txt304 bytescs_shadow
#7 seven_theme-2230997-7.patch1.02 KBcs_shadow
#6 Drupal_database_update___drupal_localhost-4.png7.27 KBLewisNyman
#1 after-applying-patch.png26.39 KBcs_shadow
#1 before-applying-patch.png25.32 KBcs_shadow
#1 seven_theme-2230997-1.patch1022 bytescs_shadow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cs_shadow’s picture

Status: Active » Needs review
FileSize
1022 bytes
25.32 KB
26.39 KB

Fixed markup for site slogan, any suggestions are welcome. Attached screenshots for reference.

tompagabor’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

LewisNyman’s picture

Status: Reviewed & tested by the community » Needs review

Thanks for the patch. I need a little bit more time to review it. Having trouble with my local install

tim.plunkett’s picture

Priority: Major » Normal
Bojhan’s picture

Wait, why do we even need a slogan here?

LewisNyman’s picture

Status: Needs review » Needs work
FileSize
7.27 KB

@Bojhan, true, but if it's printing right now then we might as well fix it.

The alignment of the slogan and the site name look slightly off.

The spacing between the two was irking me for some reason, in my eyes it looked a lot better with the following:

.name-and-slogan .site-slogan {
  margin: 0 1em 0 4.1em;
}
cs_shadow’s picture

Status: Needs work » Needs review
FileSize
1.02 KB
304 bytes

Did the changes as suggested in #6. Attaching new patch and interdiff.

Bojhan’s picture

@Lewis Well I dont really understand fixing something that shouldn't be there in the first place.

Bojhan’s picture

Issue tags: +frontend
lauriii’s picture

FileSize
1020 bytes

#7 didn't work because set margins were overridden later.

yoroy’s picture

Fixing this seems busy-work. Slogan has no place here. Do we re-focus this issue on removing it or close this and open a new one? I'd prefer just removing it in this one.

LewisNyman’s picture

Title: Site slogan in update.php redesign » Remove the slogan in update.php
Status: Needs review » Needs work

Alright I'm allowed to change my mind :P Let's throw it out.

lauriii’s picture

Issue tags: +Novice
StevenPatz’s picture

dinarcon’s picture

StevenPatz's patch effectively removes the slogan. The template has a condition checking for the site slogan presence. The condition first checks for site name which pretty much will always be set. If it can be accounted as code clean up, this patch removes the check for site slogan.

lauriii’s picture

+++ b/core/themes/seven/templates/maintenance-page.html.twig
@@ -12,14 +12,11 @@
+    {% if site_name %}
       <div class="name-and-slogan">
         {% if site_name %}

I don't think we need that second if any more because it doesn't catch anything.

Remember to change the status to Needs review after sending a patch, otherwise the testbot doesn't trigger.

StevenPatz’s picture

Issue summary: View changes
FileSize
713 bytes
StevenPatz’s picture

Assigned: Unassigned » StevenPatz
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 17: remove_the_slogan_in-2230997-17.patch, failed testing.

LewisNyman’s picture

Issue tags: +Needs reroll

Looks like this needs a reroll?

+++ b/core/themes/seven/templates/maintenance-page.html.twig
@@ -12,14 +12,9 @@
       <div class="name-and-slogan">

I guess we can remove this div and class as well?

StevenPatz’s picture

Status: Needs work » Needs review
FileSize
716 bytes
lauriii’s picture

Status: Needs review » Needs work
+++ b/core/themes/seven/templates/maintenance-page.html.twig
@@ -12,15 +12,8 @@
           <h1>{{ site_name }}</h1>

This line is intended wrong. After fixing this we're done :)

StevenPatz’s picture

Is it one or two spaces? I'll have a reroll in a few seconds ( or later, not sure if the coder loung at DrupalCon is closing )

LewisNyman’s picture

@StevenPatz It's two spaces.

lahoosascoots’s picture

I am a new contributor at the contribution mentoring at Drupal Con. I am going to work on this issue to get more acquainted with the contribution process.

dinarcon’s picture

Status: Needs work » Needs review
FileSize
748 bytes

From comment #20, we do need the wrapper div with the class because the selector used to style the title counts on that. It is .name-and-slogan h1 This new patch adds it back and removed the second condition mentioned in comment #16.

Edit: lahoosascoots, I had created the patch before seeing your comment. Please review mine and let's get this one in core :)

lahoosascoots’s picture

No worries, dinarcon. Reviewed the patch from #26 and it looks good. Going to leave the issue status as is until a more experienced contributor double checks my reviews.

stovak’s picture

Issue tags: -Needs reroll
stovak’s picture

Applies cleanly. Removing "needs re-roll tag".

-t

LewisNyman’s picture

Assigned: StevenPatz » Unassigned
Status: Needs review » Needs work

@dinarcon Can we add the class to the h1 instead and remove the wrapper?

jstoller’s picture

Assigned: Unassigned » jstoller

Working on it.

dinarcon’s picture

Status: Needs work » Needs review
FileSize
1.54 KB

@LewisNyman, sure. That requires updates to the styles though. I went ahead and did it by replacing the .name-and-slogan h1 selector by h1.page-title where appropriate. Please review.

@jstoller, manual review would be helpful.

robert.laszlo’s picture

Assigned: jstoller » robert.laszlo

I am testing this now.

robert.laszlo’s picture

Assigned: robert.laszlo » Unassigned
robert.laszlo’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
210.08 KB

Patch applied cleanly and verified. See attached screenshot.

HaloFX’s picture

FileSize
26.65 KB

Tested, applied fine, slogan markup is gone.

Image attached.

RTBC +1

daviddemello’s picture

Assigned: Unassigned » daviddemello
FileSize
89.46 KB

Looks like slogan is still missing...

dinarcon’s picture

@daviddemello, there was no design for the slogan and it needs to be removed. We are removing it in this patch.

ericski’s picture

FileSize
14.66 KB
13.6 KB

Also confirmed, see before & after images

jstoller’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.56 KB

@dinarcon: Margin was wrong for small screen sizes. Also, using h1 in the CSS was unnecessary specificity. The attached patch fixes both of these issues.

daviddemello’s picture

Responsive screen shots

HaloFX’s picture

#40 applied fine, specificity of the H1 was removed.

RTBC +1

dinarcon’s picture

Good catch @jstoller. Patch applies cleanly.

On responsive screenshots by @daviddemello I saw that long titles are cropped by the viewport. I added a css rule for it to wrap.

Note: In the interdiff you can see there is are margin-right and margin-bottom rules. I didn't use a shorthand because that is inheriting a margin top and bottom from another rule. It can be merged if considered properly.

arkiii’s picture

FileSize
362.28 KB
217.76 KB

Applied patch and did not see slogan when viewing screen using different sizes.

darol100’s picture

FileSize
267.62 KB

For some reason you patch will remove the CSS from the "Drupal" header from the installer. `Patch Error

dinarcon’s picture

Issue summary: View changes

Thanks @darol100. The installer uses the same stylesheet and that's why it breaks. During installation the slogan won't be set so we could update that template too to remove the slogan.

Working on a new patch.

dinarcon’s picture

This is the new patch. Please review it @darol100

dinarcon’s picture

Title: Remove the slogan in update.php » Remove the slogan in install.php and update.php
darol100’s picture

FileSize
234.3 KB
180.82 KB

@dinarcon

Everything seem to be working fine now.

The installation header is working fine....

Header Fix

And the patch seem to be working....

Slogan Pacth

Great Job

darol100’s picture

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

Status: Reviewed & tested by the community » Needs review
FileSize
2.8 KB
5.6 KB

This just has two minor changes. On small screens, I increased the right margin on .page-title from 1.5em to 2em, so the text never bumps up against the step indicator. And on large screens, I added a right margin to .page-title, so long titles don't run up against the side of the install box. This made the special handling for RTL unnecessary

HaloFX’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
27.59 KB

Applied patch. Reinstalled Drupal, code on install page relating to header/slogan matches that on the update page.
Long page titles wrap and display nicely on view ports from 300px wide to 1920px.

dinarcon’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
423 bytes
2.35 KB

Thanks @jstoller. Updated styles for long names to break on word for desktop too.

HaloFX’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
25.78 KB

Patch from #53 applies OK. Crazy long words in titles wrap much nicer.
Before and after small screen caps attached.

ericski’s picture

FileSize
25.08 KB
32.47 KB

RTBC +1

Applied latest patch, before and after confirm slogan removed and styles for site name (header) correct

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/seven/maintenance-page.css
@@ -118,8 +119,9 @@
+  .page-title {
+    margin-right: 2em;
+    margin-bottom: 0.725em;
   }

@@ -174,11 +176,7 @@
+  .page-title {
...
   }

Has rtl been considered and tested?

Also bartik and system have maintenance and install css and twig files. What should we be doing here?

Anonymous’s picture

Issue tags: +Needs reroll

Patch doesnt apply anymore

jiv_e’s picture

Issue tags: +drupalcampfi

Working on the reroll.

jiv_e’s picture

Here it goes. Patch is basically the same. Interdiff was empty.

lauriii’s picture

Status: Needs work » Needs review

Let's activate our lovely test bot!

jiv_e’s picture

RTL is not yet working for the title and the step indicator. The step list's right padding is also off. But that's an another issue. I'll fix these and create a new issue.

HaloFX’s picture

Agreed, it needs it's own issue. The original issue has been fixed a couple patches back.

The #59 patch applies without issue and the output looks good with Simplytest.me

jiv_e’s picture

Here's the patch and the working mobile view. Please review!

LewisNyman’s picture

Issue tags: -Needs reroll

Alex also pointed out that we need to remove the slogan from the following files as well:

/core/modules/system/templates/maintenance-page.html.twig
/core/themes/bartik/templates/maintenance-page.html.twig
/core/modules/system/templates/install-page.html.twig

LewisNyman’s picture

Component: Seven theme » markup
jiv_e’s picture

Sure... I'll add them in. I also added the mentioned related issue.

HaloFX’s picture

Why is there a System install-page.html.twig and a Seven install-page.html.twig? Is there a scenario where Seven wouldn't be used? can an install profile disable Seven during install? or is it just for continuity/fallback?

LewisNyman’s picture

@HaloFX Yes, in distributions. Also Seven requires special mark up in the design and as a standard we don't enforce the same mark up on every theme

jiv_e’s picture

This is getting quite complex. When I stripped out some markup I needed to refactor the CSS also. There's already a lot of going on.

Some pointers:

  1. Changed .page-title to .site-name.
  2. Changed some IDs to classses to reduce specifity.
  3. Tried to make the site-name more SMACSS. Needs more work but better to do that in another issue.

I tried to test all the things I could think of.

Status: Needs review » Needs work

The last submitted patch, 69: remove-the-slogan-in-update-php-2230997-69.patch, failed testing.

dinarcon’s picture

Component: markup » Seven theme
Assigned: Unassigned » dinarcon
Issue summary: View changes
Status: Needs work » Needs review
FileSize
73 KB
2.63 KB
312 bytes

This issue is related to the default install and update pages in a drupal 8 core installation, not in the context of a distribution. As though, we could assume that Seven will be used as the admin theme. @alexpott, in that case I think there should not be any change required to bartik's and system's files as asked in https://drupal.org/node/2230997#comment-8870607

IMHO and as mentioned a couple of times, the original issue has already been fixed. @jiv_e's patch at https://drupal.org/node/2230997#comment-8880875 works. I include a new patch that updates a CSS rule for consistency with other rules in the file.

I have updated the issue summary. Please let me know if I missed something.

ericski’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
32.18 KB
32.96 KB
23.27 KB
28.2 KB

Tested patch from #71

Applies clean and works with both LTR and RTL

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/seven/maintenance-page.css
    @@ -39,7 +40,7 @@
         right: auto;
    

    Can be we add the missing /* LTR */ comment to the correspond CSS above.

  2. +++ b/core/themes/seven/maintenance-page.css
    @@ -118,9 +119,16 @@
    +    margin-right: 2em;
    +    margin-bottom: 0.725em;
    

    Missing /* LTR */ comment

LewisNyman’s picture

Status: Needs work » Needs review
Issue tags: -drupalcampfi
FileSize
1019 bytes
3.13 KB

Thanks Alex, I found a few more lines in that file that were missing LTR comments.

I also changed the step indicator RTL value match the LTR value.

ericski’s picture

Status: Needs review » Reviewed & tested by the community

Applied latest patch (#73) against current HEAD.

Still applies cleanly, appropriate LTR comments present, step margin difference so small it's hard to capture in a screenshot, as such no updated screenshots included, previous set still basically the same.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 74: remove-the-slogan-in-update-php-2230997-74.patch, failed testing.

Status: Needs work » Needs review
penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

It was RTBC per #75.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8b9d600 and pushed to 8.x. Thanks!

diff --git a/core/themes/seven/maintenance-page.css b/core/themes/seven/maintenance-page.css
index 61394fa..213c134 100644
--- a/core/themes/seven/maintenance-page.css
+++ b/core/themes/seven/maintenance-page.css
@@ -123,12 +123,10 @@
     margin-right: 2em; /* LTR */
     margin-bottom: 0.725em;
   }
-
   [dir="rtl"] .page-title {
     margin-right: 0;
     margin-left: 2em;
   }
-
 }
 
 @media all and (min-width: 48em) { /* 768px */

Removed some blank lines added by patch on commit.

  • alexpott committed 8b9d600 on 8.x
    Issue #2230997 by dinarcon, jiv_e, StevenPatz, jstoller, cs_shadow,...

Status: Fixed » Closed (fixed)

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