Problem/Motivation

When you set the default theme to use Seven and turn on maintenance mode, Seven's ".in-maintenance" styling kicks in for non-admin users. It currently uses a desktop-first layout which doesn't look good in smaller device viewports.

The current layout is pretty basic:

body.in-maintenance #sidebar-first {
  float: left; /* LTR */
  width: 200px;
}
body.in-maintenance #content {
  float: right; /* LTR */
  width: 550px;
  padding-right: 20px; /* LTR */
  clear: none;
}
body.in-maintenance #page {
  overflow: auto;
  width: 770px;
  margin: 0 auto;
  padding-top: 2em;
}
body.in-maintenance #branding h1 {
  width: 770px;
  margin: 0 auto;
  float: none;
}
body.in-maintenance .form-radios .form-type-radio {
  padding: 2px 0;
}
body.in-maintenance div.form-item:after {
  content: "";
  display: none;
  clear: none;
}
body.in-maintenance .form-submit {
  display: block;
}
body.in-maintenance #logo {
  margin-bottom: 1.5em;
  max-width: 180px;
}

Proposed resolution

We need to convert the desktop-only layout to use a mobile-first, responsive design.

Remaining tasks

  • Design how the layout should look at various viewport sizes.
  • Remove all traces of $sidebar_first from maintenance-page.tpl.php because Seven doesn't have a region named sidebar first and it usage is currently preventing the logo from appearing.
  • Write the patch to the CSS.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Issue tags: +mobile-novice

Adding "mobile-novice" tag.

kbasarab’s picture

FileSize
724 bytes

Patch for just removing the sidebar first portion.

ZenDoodles’s picture

Status: Active » Needs review
Bojhan’s picture

Could this have some screens?

mcjim’s picture

Status: Needs review » Needs work

Reviewed patch in #2, which works great, fixing the logo issue.

@johnalbin @bojhan Are there any guidelines/examples for designing the layouts that could help with that task?

LewisNyman’s picture

Status: Needs work » Needs review
FileSize
30.17 KB
1.47 KB

I've taken the above patch and adapted the CSS so it is now fully fluid. Also at Bojhan's request here is a shot!

Bojhan’s picture

Looks ok to me,

mcjim’s picture

Nice.

Just one thing:
Because #branding has padding on the left, at smaller sizes the logo will look out of line as it sits flush to the side of the screen.
#content has padding on the right and not the left, but, regardless, #logo is not contained within #content.
Should we move #logo into #content and match the layout used for #branding? Or add padding to #logo at the smaller screen sizes?

Ken Hawkins’s picture

As we add padding on the right for body.in-maintenance #content (20px) I say it stands to reason we do the same for body.in-maintenance #logo.

That is

body.in-maintenance #logo {
  float: left;
  padding: 0 20px;
}
mcjim’s picture

Assigned: Unassigned » mcjim

Only thing is, the padding pushes the logo out of line at larger browser sizes.
I'll see if I can come up with an alternative.

mcjim’s picture

Status: Needs review » Needs work
mcjim’s picture

Assigned: mcjim » Unassigned
Status: Needs work » Needs review
FileSize
1.96 KB

Tweaked patch in #9 so that the logo remains in-line with the h1 regardless of page width or language direction.

h4rrydog’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
13.93 KB
16.16 KB
16.05 KB

Looks good to me.

320x480 portrait.png

480x320 landscape.png

1280xXXX landscape.png

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome work, all! :D

Committed and pushed to 8.x. Thanks!

webchick’s picture

Title: Make "in maintenance" Seven use a responsive design » Regression: Seven's responsive maintenance mode template makes installer look crappy
Category: task » bug
Status: Fixed » Active

Hm. Sorry to re-open, but this introduced some pretty serious visual regressions in the installer for desktop screen sizes that I don't think we can ship with.

Alignment of items before/after the Drupal logo are off.

Drupal head overlaps progress bar.

mcjim’s picture

Assigned: Unassigned » mcjim

OK, I'll get to work on that over the weekend.

webchick’s picture

Marked #1765788: Sidebar missing from installer as a duplicate.

But basically, we need to have a sidebar there. That's what includes all of the steps of the installer and where you're at currently.

Gábor Hojtsy’s picture

Ok, I submitted #1765788: Sidebar missing from installer on the same bug, I guess it should be marked a duplicate. We also lost all the steps displayed in the installer, that is quite a major UX blow. Now only the positioning of the page content...

Gábor Hojtsy’s picture

Title: Regression: Seven's responsive maintenance mode template makes installer look crappy » Regression: Seven's responsive maintenance mode template makes installer look crappy, lost step display
mcjim’s picture

Attached patch needs refinement, ultimately, from a responsive perspective, but at least solves the regression for the time being.
It does the following:

  • reinstates $sidebar_first in maintenance-page.tpl.php as this is used by the installer
  • fixes the missing logo on the normal maintenance pages by not including the logo within the if ($sidebar_first) statement.
  • changes the px widths to max-widths for #content and #sidebar-first and adds % widths (this is the part that could do with refinement in particular)
mcjim’s picture

Status: Active » Needs review
aspilicious’s picture

Screenshots would be nice :)

mcjim’s picture

New and improved! :-)

Worked on the patch in #20, adding a breakpoint at 768px so that both the installer and maintenance pages make more sense on smaller screens.
Screenshots (lots, sorry, but as we now know, this patch affects both the installer and maintenance page) attached.

aspilicious’s picture

Screenshots look ok :) thnx

matason’s picture

Status: Needs review » Reviewed & tested by the community

Tested, works for me, marking as RTBC.

galooph’s picture

All looks good to me.

webchick’s picture

Title: Regression: Seven's responsive maintenance mode template makes installer look crappy, lost step display » Regression: Make "in maintenance" Seven use a responsive design
Status: Reviewed & tested by the community » Fixed

Awesome, thanks so much for the quick turnaround on this!

Committed and pushed to 8.x. Thanks! :D

Restoring title and marking fixed, although I'm not sure whether to interpret #20 as this still being "needs work." It smooshes down for me in smaller screen size, but I'm not equipped to review the CSS and know if it's doing so sensibly or not.

Status: Fixed » Closed (fixed)

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

xjm’s picture

Title: Regression: Make "in maintenance" Seven use a responsive design » Make "in maintenance" Seven use a responsive design
xjm’s picture

Issue summary: View changes

Node $sidebar_first insanity.