Problem/Motivation

This is a spin-off from #1510532: [META] Implement the new create content page design. We need to implement the two-column layout as designed.

Create content page as designed

Proposed resolution

Drupal has a new layout system, but as of this writing layouts cannot yet be put to use (if you know otherwise, please post). The best thing for Drupal is to implement the proposed layout for the node form the old-fashioned way and convert when the layout system is in place. The form styling is a separate issue, as is the conversion of vertical tabs to collapsible elements.

Follow-ups

CommentFileSizeAuthor
#111 2col-message.png38.56 KBechoz
#103 1838156-103.patch491 bytesechoz
#103 2col-no-space.png33.9 KBechoz
#100 Screen Shot 2013-08-13 at 8.56.19 AM.png30.9 KBtkoleary
#100 Screen Shot 2013-08-13 at 2.31.14 PM.png21.77 KBtkoleary
#100 Screen Shot 2013-08-13 at 2.47.05 PM.png31.27 KBtkoleary
#92 1838156-92.patch18.81 KBswentel
#92 interdiff.txt3.59 KBswentel
#90 node-two-column.png53.41 KBsun
#86 check.jpg95.54 KBpodarok
#79 1838156--78.binary.patch21.26 KBry5n
#79 1838156--78.text_.patch17.56 KBry5n
#75 1838156--75.patch22.04 KBry5n
#71 node-2col.png102.66 KBry5n
#71 node-2col-message.png107.36 KBry5n
#71 1838156--70.patch19.45 KBry5n
#71 1838156--67-to-70.interdiff.txt3.69 KBry5n
#67 1838156--67.patch19.36 KBry5n
#67 1838156--59-to-67.interdiff.txt2.79 KBry5n
#59 1838156--59.patch17.9 KBry5n
#59 1838156--41-to-59.interdiff.txt11.23 KBry5n
#57 overlay-messages.png204.88 KBry5n
#57 messages.png181.79 KBry5n
#57 ie9-and-8-narrow.png97.34 KBry5n
#57 ie9-and-8-wide.png134.2 KBry5n
#57 ie9-and-8-overlay.png133.52 KBry5n
#57 firefox-narrow.png135.6 KBry5n
#57 firefox-wide.png204.39 KBry5n
#57 firefox-overlay.png226.77 KBry5n
#57 chrome-narrow.png145.68 KBry5n
#57 chrome-wide.png193.83 KBry5n
#57 chrome-overlay.png209.5 KBry5n
#57 1838156--41-to-57.interdiff.txt11.23 KBry5n
#57 1838156--57.patch17.89 KBry5n
#56 node-edit-messages-problem.png41.06 KBry5n
#56 widescreen-overlay.png49.08 KBry5n
#41 interdiff.txt4.02 KBsannejn
#41 1838156-41.patch16.72 KBsannejn
#38 1838156-38.patch18.13 KBsannejn
#34 1838156-34.patch14.73 KBswentel
#34 interdiff.txt342 bytesswentel
#31 1838156-30.patch14.73 KBswentel
#30 test-firefox.png142.36 KBLewisNyman
#29 test-320px.png75.79 KBLewisNyman
#29 test-320px.png75.79 KBLewisNyman
#26 1838156-26.patch14.79 KBsannejn
#26 01.create-article.png203.45 KBsannejn
#26 02.create-article-menu-settings.png205.75 KBsannejn
#26 03.edit-article.png207.95 KBsannejn
#26 04.edit-article-url-path-settings.png220.6 KBsannejn
#26 05.overlay-create-article.png205.86 KBsannejn
#26 06.overlay-create-article-menu-settings.png232.01 KBsannejn
#26 07.overlay-edit-basic-page.png208.62 KBsannejn
#26 08.mobile-edit-article.png191.75 KBsannejn
#26 09.mobile-create-article.png180.16 KBsannejn
#24 1838156.patch8.33 KBswentel
#24 Screen Shot 2013-01-21 at 14.52.14.png117.49 KBswentel
#18 core--node-form-layout--1838156--18.patch11.89 KBry5n
#11 core--node-form-layout--1838156--11.patch11.46 KBry5n
#8 edit-form-two-column.png86.63 KBeigentor
#8 edit-form-two-column-2.png58.78 KBeigentor
#2 core--node-form-layout--1838156--2.patch6.66 KBry5n
#1 core--node-form-layout--1838156--1.patch3.77 KBry5n
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ry5n’s picture

This is the general idea.

ry5n’s picture

This patch adds the layout css and moves things about as far along as possible until #1838114: Change node form’s vertical tabs into details elements is ready. Also: tagging.

ry5n’s picture

Status: Needs work » Needs review

This can receive a first a11y review now, for things like source order, and a review for the general implementation, which is provisional until we have the Blocks and Layouts features ready.

ry5n’s picture

Needs review! Can't be committed after feature freeze!

ry5n’s picture

Priority: Normal » Major

Since this is part of #1510532: [META] Implement the new create content page design, which is major, making this match.

aspilicious’s picture

Problem still is that accesibility wise the submit button should come after the content on the right. So basicly it has to jump from the left side to right and back to the left in the end.

Does that make sense to you? And can it be done?

ry5n’s picture

@aspilicious Already done in this patch I think; the form actions (buttons) are printed in $regions['footer'], the collapsible fieldsets in $regions['secondary']. That's what we want for accessibility, correct?

<div class="layout-display layout-node-form clearfix">
  <div class="layout-region layout-region-main">
    <?php print drupal_render_children($form); ?>

    <?php if ($regions['main']): ?>
      <?php print render($regions['main']); ?>
    <?php endif; ?>
  </div>

  <?php if ($regions['secondary']): ?>
    <div class="layout-region layout-region-secondary">
      <?php print render($regions['secondary']); ?>
    </div>
  <?php endif; ?>

  <?php if ($regions['footer']): ?>
    <div class="layout-region layout-region-footer">
      <?php print render($regions['footer']); ?>
    </div>
  <?php endif; ?>
</div>
eigentor’s picture

Uh, oh this does not really work:

Edit Form two columns

Problem is the widths do not fit. The content (layout-region-main) has 65%, the meta which should be right (layout-region-secondary) has 35. So far, so good. layout-region-main also has 2em of padding-right, also layout-region-secondary appears to have a tiny bit of padding right.

Also the fieldset with the published information is not inside layout-region-secondary but -primary and thus does not get floated right at all.

The padding of layout-region-main needs to be in percentage values, say 2% and deducted from the region.
When fixing the widths, it still does not look quite right:

Edit Form two columns 2

It should go right to the top of the overlay. But #page contains everything and cannot go up there because #branding that holds the breadcrumbs is in the way. Even when that is gone it does not fit...
Nothing big, but needs adressing.

Another problem is the summaries on the fieldsets that show the status (published, promoted to front page...). But I guess this one is easy as those should be gone completely.

I applied all three patches: for the Published checkbox, the vertical tabs as fieldsets and this one. Maybe there is some unwanted interaction between the patches.

ry5n’s picture

@eigentor Thanks for the review. Much appreciated.

The layout CSS numbers look wrong at first because I'm using box-sizing: border-box. They should work though, I believe the layout is broken for you because, ironically, I tried to keep this patch independent of #1838114: Change node form’s vertical tabs into details elements and that patch is not accounted for. I'll to post an update so it works.

You're right about the #branding area being a problem, but it's more than that. It's also also the messages/console area (success/error messages), system help block, secondary tabs (even though not visible on this page) and the node preview content that all go in various divs at the top of the overlay (screenshot). We discussed the problem in the original issue but we never resolved what to do about it.

In my opinion, the best way to solve this in the short term is a combination of a header area with a full-width bottom rule like this, and moving some of the UI elements (like breadcrumbs) out of the overlay, as I proposed here.

Ugh, that's a lot of intertwined issues.

eigentor’s picture

Yeah I think you are right. As nice as it looks having the grey extend to the very top, this is still a node form and needs to be functional first and foremost. Avoiding five cans if worms and going for something easier to implement sounds sensible.

ry5n’s picture

Status: Needs work » Needs review
FileSize
11.46 KB

New patch requires applying patch #23 from #1838114: Change node form’s vertical tabs into details elements. I've overhauled a fair amount of the CSS, which I expected, plus made the preprocess code more robust.

This patch should fail, that's normal considering the dependency.

Status: Needs review » Needs work

The last submitted patch, core--node-form-layout--1838156--11.patch, failed testing.

ry5n’s picture

Status: Needs review » Needs work

Patch is actually still 'needs review'. See #11.

eigentor’s picture

The patch fails to apply.
Reroll appreciated.

ry5n’s picture

@eigentor Just checking: did you apply node-form-collapsibles #23, then #11 from this issue? I tried git apply --check locally and it seems like it should work.

eigentor’s picture

Now the other patch does not apply completely as well. Here my results with a fresh copy of core HEAD: http://screencast.com/t/PjJIqxlr
Are you sure you are chasing head and always do a git pull before creating the patches?
Well, the drop may be on the move quite fast these days, so it may be an athletic challenge... :P

ry5n’s picture

@eigentor The big details patch got committed last night, so this and the other both need re-roll. I'm working on it, should have new patches tonight tomorrow, since I have a bad cold and need to rest tonight instead :(

ry5n’s picture

New patch. Leaving status at 'needs work' until the parent issue #1838114: Change node form’s vertical tabs into details elements gets in and tests can pass.

  • Applies on top of patch 25 from the parent issue.
  • Moves all non-essential CSS out of node-form.css and into Seven's style.css, where it belongs.
  • Adds a YAML file for the node form layout (not used yet).
  • Updates Seven’s CSS in line with the changes in the parent issue.
eigentor’s picture

Status: Needs work » Needs review

Ah, Patch (as well as the other two) applies cleanly now. Just learnt about git apply -v patchname :)
Looking good http://screencast.com/t/4bwn1QZ1h , just as it should. Off we go. Needs someone with coding skills to RTBC though.

Status: Needs review » Needs work

The last submitted patch, core--node-form-layout--1838156--18.patch, failed testing.

Gábor Hojtsy’s picture

I was pretty happy seeing the layout system being used here, but then realised that it is not really used through the layout system, it is used from there as a template and CSS file. We can do much better than that now. You can get the layout system generate the output for you with the template + an array of -reprendered regions. For an example, see layout_page_view() in core/modules/layout.admin.inc in core:

$key = '...'; // layout key
$instance = layout_manager()->createInstance($key, array());
$regions = array('regionkey' => '..value..');
$rendered = $instance->renderLayout(TRUE, $regions);

This will add the CSS that and render the template with the rendered regions provided.

Second, I'm not sure this layout should be defined in layout module, notbut node module. Especially if we want it to be presented as THE node editing layout, not some general "two column with footer" layout.

Finally it would set a requirement for layout module on node module as well for layout module, but the reuse is worth it IMHO. As more and more things will use layouts, it will be ubiquitous.

ry5n’s picture

Gábor That's great news! I basically was trying to keep this as close as possible to a 'real' layout until the system was ready. I'll take a crack at switching it over.

andypost’s picture

Probably layout could be assigned with a help of #1875992: Add EntityFormDisplay objects for entity forms that part of meta #1875994: [meta] EntityDisplays

swentel’s picture

So there are some problems with using the layout module:

  1. It doesn't return a render array so there's no way to alter at the very end - unless we don't render StaticLayout::renderLayout
  2. The form tags aren't rendered around the layout and I don't see any other way around it at this moment - unless we return a build as mentioned in 1 - at least I think - not sure how I can call drupal_render_children() on the remaining form elements.
  3. And even if we can make this all work, then there's the fact that currently the right column only happens when you're in 'admin mode' not in your frontend theme (well at at least the metadata is).

I'm not sure either to set a dependency in node in layout is interesting in case at release of D8 this is the only implementation in core - unless we move it to system where it would make more sense IMHO to live there.

I'm going to investigate a little more to see if I can workaround the problems I mentioned.

So, currently, the patch uses a simple template and preprocess function the 'old' way and it's inside the templates folder.

Patch is attached, but needs still more work re: styling for with and without overlay - it doesn't have all css either as I still have apply problems, but that's for later. Screenshot attached for temporarily reference.

cosmicdreams’s picture

Great work!

sannejn’s picture

Added some theming for the overlay mode & non-overlay mode. Swentel removed the template preprocess function as it is redundant.
Still need to do a little crossbrowser testing. Attached some screenshots in Chrome.

swentel’s picture

Status: Needs work » Needs review

Setting to needs review.

moshe weitzman’s picture

Screenshots look great.

In a follow-up, we might want to revisit the sections and consolidate them since it seems silly to have groupings when we virtually always have one item in the section. WOuld be good to get Yoroy thinking about that.

LewisNyman’s picture

FileSize
75.79 KB
75.79 KB

Tested on an iPhone emulator and mobile opera emulator, looks great! I've attached the best view I could of the create content screen at 320 pixels.

It also looks good on Firefox and iPad.

LewisNyman’s picture

FileSize
142.36 KB

oops, here's the firefox screen

swentel’s picture

FileSize
14.73 KB

Reroll, the drop is moving fast the last hours.

Status: Needs review » Needs work
Issue tags: -Usability, -Needs accessibility review, -#d8ux

The last submitted patch, 1838156-30.patch, failed testing.

swentel’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +Needs accessibility review, +#d8ux

#31: 1838156-30.patch queued for re-testing.

swentel’s picture

FileSize
342 bytes
14.73 KB

Small fix to remove the white space in the overlay at the bottom, all credits go to sannejansen

Status: Needs review » Needs work
Issue tags: -Usability, -Needs accessibility review, -#d8ux

The last submitted patch, 1838156-34.patch, failed testing.

swentel’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +Needs accessibility review, +#d8ux

#34: 1838156-34.patch queued for re-testing.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Nice work!

As a followup, it would be nice to get the whole section header to be clickable (e.g. Menu settings) instead of just the text,

sannejn’s picture

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

@moshe: there's (for the moment, as far as I could find) no support for the tag in Firefox and IE, so i wrote a workaround for that. Now the whole bar is clickable (not just the text). Also added some IE8 & 9 fixes.

sannejn’s picture

I mean the <details> tag.

moshe weitzman’s picture

@ sannejanssen - thanks!. Without an interdiff, it is hard for me to see what you have added/changed. I do know that some work around the details element is happenning at #1839158: Replace collapse.js with a proper polyfill for <details> and we should not duplicate it here. Are we duplicating? If so, lets just go with prior patch (could you reupload that for test bot).

sannejn’s picture

FileSize
16.72 KB
4.02 KB

@moshe: the fixes are pure css. Attached the patch & the interdiff.

Status: Needs review » Needs work
Issue tags: -Usability, -Needs accessibility review, -#d8ux

The last submitted patch, 1838156-41.patch, failed testing.

webchick’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +Needs accessibility review, +#d8ux

#41: 1838156-41.patch queued for re-testing.

webchick’s picture

One thing that's a bit odd is that the layout still shows in single-column mode even in iPad landscape mode. Is this intended?

Only local images are allowed.

Dries’s picture

This looks great, although I think the breakpoints can be improved a bit (see Angie's comment above).

Let's wait for this to come back green and then it can be committed IMO.

sannejn’s picture

I don't think it's supposed to be like that. If it turns green i'll update the media query, unless someone thinks otherwise?

moshe weitzman’s picture

@sann - we decided recently to do anything special for IE8's lack of media query support. see #1645494: Allow core themes to display single-column on IE8: do not compensate for lack of media query support

I agree that we should have 2nd column on ipad horizontal orientation.

webchick’s picture

Status: Needs review » Needs work

Ok, marking needs work then. This is looking great, btw! :D

sannejn’s picture

Status: Needs work » Needs review

I see. I kinda had a feeling the ie.css file was pretty empty.. I'll take it out then?
I just checked on the iPad, and maybe we can even have the 2 columns on the portrait view? I think there's still enough space to have both columns next to each other. Or is there some kind of agreement on this?

swentel’s picture

Status: Needs review » Needs work

crosspost :)

moshe weitzman’s picture

Yes, remove IE8 CSS please. IE9 does media queries so I'm not sure what you are doing. It might be appropriate or maybe not. I guess ask someone who was in that issue that I linked to.

Sure, two column on IPad portrait sounds good.

Thanks.

yoroy’s picture

I'm unsure about 2 columns in portrait mode (think Ipad mini for example). But don't let that hold up an initial commit, if the next patch shows 2 col in landscape this is good to go.

Looking very good. Also makes it very clear that we have some regrouping to do on what lives in which tab :)

sannejn’s picture

@moshe will do.
@yoroy good point! Haven't had the change to look at the ipad mini in detail, but I'm sure your right. Let's stick to the two column for landscape then.

ry5n’s picture

Sorry I haven’t had a chance to work on this with you this past week. Seems it’s progressing nicely; good work!

I just wanted to make sure we‘re testing this to account for:

  • when error messages are printed at the top of the overlay
  • potential use of this layout with secondary tabs (see #9)
  • ensuring that the sidebar content does not get truncated when expanding all of the <details> at once.
eigentor’s picture

@yoroy I guess Ipad Mini will get a different media query that will also fit for 7-Inch tablets like Nexus 7 if it is too cramped. Dang, mobile devices have too many screen sizes.

ry5n’s picture

Initial CSS review:

/* Specific Firefox targetting */
@-moz-document url-prefix() {
  .entity-meta details > summary {
    padding: 0 1.25em;
  }
}

Why is this necessary?

/* Change selected tab color */
.page-node-edit #overlay-tabs li.active a,
.page-node-edit #overlay-tabs li.active a:hover,
.page-node-edit ul.primary li.active a {
  background-color: #f2f2f2;
}

I don’t think we should be forcing the active tab color to match the meta settings background. The active tab is only sometimes positioned over top of the meta settings column. Besides which, a real solution means solving what to do with messages and secondary tabs:

Node edit messages problem

My proposed fix was and remains a header area at the top of the overlay:

header

  /* Specific for IE & IE9 */
  padding-top: 0em\9;
  padding-bottom: 0em\9;

The \9 hack is not a safe CSS hack. If we need to target IE8 specifically we should be using conditional comments. See http://mathiasbynens.be/notes/safe-css-hacks

.entity-meta details > summary {
  padding: 0.85em 1.25em;
  text-shadow: 0 1px 0 white;
  cursor: pointer;
}

The cursor: pointer should go in a system stylesheet.

ry5n’s picture

Status: Needs work » Needs review
FileSize
17.89 KB
11.23 KB
209.5 KB
193.83 KB
145.68 KB
226.77 KB
204.39 KB
135.6 KB
133.52 KB
134.2 KB
97.34 KB
181.79 KB
204.88 KB

New patch tackles the CSS and makes some definite improvements. Other changes are going to be more controversial:

- narrow screen layout in overlay has margins (elements were pressed up against the overlay edges)
- simplified some CSS, removing hacks for FF and IE
- moved some theme styles out of node.edit.admin.css and into Seven
- reverted the details “twisties” moved to the right. I know the design has them there but this is totally inconsistent with the rest of core and Seven. This should be done globally in a follow up or not at all.
- fixed messages breaking the layout
- added breadcrumb back in (for now)
- added a bottom border to the settings region in widescreen (non-overlay).
- renamed layout parts to be more abstract
- improved contrast between details elements by keeping borders dark (but not as dark as before).

Screenshots attached for Chrome, Firefox and IE9/8. Known issues in IE8 are the same as the original details patch and need to be resolved in #1839158: Replace collapse.js with a proper polyfill for <details>. I suggest we give no special treatment to IE8 for media queries and allow it to get mobile styles.

Status: Needs review » Needs work

The last submitted patch, 1838156--57.patch, failed testing.

ry5n’s picture

Status: Needs work » Needs review
FileSize
11.23 KB
17.9 KB

Huh. The patch in #57 was corrupt somehow. New patch is simply a re-roll. It applies locally, so this should pass.

Status: Needs review » Needs work
Issue tags: -Usability, -Needs accessibility review, -#d8ux

The last submitted patch, 1838156--59.patch, failed testing.

ry5n’s picture

Status: Needs work » Needs review

#59: 1838156--59.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability, +Needs accessibility review, +#d8ux

The last submitted patch, 1838156--59.patch, failed testing.

moshe weitzman’s picture

That upgrade failure is unrelated.

Did you change the media query to show 2 columns in tablet widths (portait and landscape)?

<div class="layout-region layout-region-node-main">
+    <?php print drupal_render_children($form); ?>
+  </div>

I think that can be just render($form)

ry5n’s picture

That's weird. The same tests pass locally for me…

I haven't changed the media query yet; currently the breakpoint is 780px, which I chose based on where the columns start to get uncomfortably narrow. I prefer breakpoints based on the needs of the content, rather than specific devices. In any case, most 7 to 10-inch tablets should already get the two-column layout, no? I expect two columns in portrait would be too cramped.

yoroy’s picture

yeah, agreed that whenever we mention a specific device we're basically doing it wrong. Define breakpoints on the needs of the content is an excellent guideline. Two-column portrait seems too cramped indeed.

ry5n’s picture

Ok, thanks. I'll try just using render() and double-check that this works in landscape on iPad.

ry5n’s picture

Status: Needs work » Needs review
FileSize
2.79 KB
19.36 KB

I tried render() and I get “allowed memory size exhausted” PHP fatal errors. Same for drupal_render(), so I’ve left it alone.

Tablets in landscape should work now, but it was trickier than I thought. iPad (for one) always reports its width as 768px regardless of orientation, so quite a fancy media query is required. Also, since the vertical toolbar is triggered at narrow screen widths, I had to add an additional override to suppress the two-column layout for the range of widths where there would normally be enough room, but not with the vertical toolbar.

All of this is actually a problem, because:
1) the media queries dealing with the toolbar bake in the width of the toolbar. If that ever changes, these media queries would have to be updated to match.
2) the Seven theme builds on the basic layout from node.edit.admin.css, but that means that both Seven’s style.css and the node layout CSS *must* contain identical media queries.

In both cases, we have code in totally separate places of core that have to be manually kept in sync. This is pretty insane, and I am not sure what the best solution is. I’ll float the idea that modules should never provide page layout; only themes. Doesn’t solve the toolbar thing, though.

swentel’s picture

@ry5n maybe we should special case this two column implementation *only* to seven then ? This would remove some code in the nodeFormController then (like switching to container type and the theme etc). We're done then with a simple hook_node_form_alter() in Seven and all CSS can be moved to Seven then - I guess ?

Also the two column looks a bit weird when there's no overlay, it kind of floats to much, but I'm not sure if we want it like in #26 - http://drupal.org/files/01.create-article.png - I remember asking Bojhan and he kind of agreed that was the way to go, however I'm not sure how hard that is to implement ?

ry5n’s picture

@swentel I don't really know what the solution is for those duped @media queries. I suspect that the solution lies in yet-to-be-built layout infrastructure from scotch. I wonder I'd sun has any ideas?

You're right about the non-overlay settings region. I'll get it looking better (closer to that previous screenshot).

webchick’s picture

#67: 1838156--67.patch queued for re-testing.

ry5n’s picture

This is about the best I can do with the sidebar in non-overlay mode; I can’t find a sensible way to get the sidebar full-height. It looks more like the intended design but it still looks wrong with messages displayed (see second screen attached). There’s no way to have this look decent with and without messages *and* still have the sidebar 'bleed' to the top and side.

2-column node form

Status: Needs review » Needs work

The last submitted patch, 1838156--70.patch, failed testing.

effulgentsia’s picture

This needs a reroll both due to corruption of the included images, and for recent changes in HEAD of NodeFormController.

swentel’s picture

@ryan are you able to reroll - I'm bad with images and stuff :/ I'll look into the messages problem after that. Note that there's a form_alter now in Seven theme that should be used to tell the node form to use the two col template. It also means that the CSS is now exclusively for Seven, so maybe some css can be moved around ?

ry5n’s picture

FileSize
22.04 KB

I hope this reroll works… it does apply locally. It took some doing to resolve merge conflicts, so I haven’t had a chance to move any CSS around. This actually needs someone to look over who knows what’s going on in NodeFormController, since this patch seems to contain some stuff that the last patch didn’t…

ry5n’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1838156--75.patch, failed testing.

ry5n’s picture

I’ll try this again tonight.

ry5n’s picture

Let’s see if either of these works.

ry5n’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1838156--78.text_.patch, failed testing.

ry5n’s picture

Status: Needs work » Needs review
podarok’s picture

Status: Needs review » Reviewed & tested by the community

#79 looks good for me

podarok’s picture

Yup
The binary one )

mgifford’s picture

Tested it with keyboard only & ChromeVox and both worked fine.

podarok’s picture

FileSize
95.54 KB

#79 just found a small design typo

check.jpg

podarok’s picture

Status: Reviewed & tested by the community » Needs work

tag

LewisNyman’s picture

Status: Needs work » Needs review

I can't seem to recreate the layout issue in #86, it might be cause by the increased word length using the non-default language? Although it is posible to set styles different on a per language basis I don't think I've seen that kind of complexity elsewhere in core.

The styling of the delete button is global and we should probably handle it in #1848292: Consolidate Seven button styles

effulgentsia’s picture

Status: Needs review » Reviewed & tested by the community

A lot of really great work has been done here, and I think it's ready enough to be committed. Once it's in HEAD, I'm sure people will discover further tweaks that are needed. I can confirm that #86 does happen when you change the Delete button label to something long enough and make your window small enough, so that's one follow up worth opening.

sun’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
53.41 KB
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -56,6 +56,28 @@ protected function prepareEntity(EntityInterface $node) {
   public function form(array $form, array &$form_state, EntityInterface $node) {
+
+    // Visual representation of the node content form depends on following

Didn't we just revert these changes back to the original code in the other issue?

Also, something doesn't quite seem to work with the two column layout:

node-two-column.png

ry5n’s picture

@sun I had to do a manual merge with HEAD and did my best to pick the right changes. I might have got something wrong.

swentel’s picture

Status: Needs work » Needs review
FileSize
3.59 KB
18.81 KB

Indeed, we moved this to seven_form_alter() , see attached interdiff. This patch will not influence any other theme anymore at this point besides seven now.

Follow ups I see, but not yet created:

  • The node/add URL is also affected by the CSS. Since seven implements hook_preprocess_page() we can maybe add a dedicated class to the node form page so we can have better selectors.
  • Figure out a better placement/styling for the error message.

We can start finishing #1751754: Implement new form style for Seven, based on blueprint mockups.. Also note that the 'delete' styling is intentional as you can see in the screenshot (unless you're referring to the background) - but is open for discussion of course ;)

effulgentsia’s picture

Status: Needs review » Reviewed & tested by the community

Thanks. Much better. Since we're getting close to feature freeze here, RTBC. However, here's some minor feedback/questions for either quick addressal before commit or in a follow up.

+++ b/core/modules/node/node.edit.admin.css
@@ -0,0 +1,69 @@
+  /* @todo File an issue to add a standard class to all text-like inputs */

Has this issue been filed? If so, please link to it.

+++ b/core/modules/node/node.module
@@ -171,6 +171,11 @@ function node_theme() {
+      'path' => drupal_get_path('module', 'node') . '/templates',

This isn't needed.

+++ b/core/modules/overlay/overlay-child-rtl.css
@@ -22,8 +22,16 @@ html {
 #overlay-close,
 #overlay-close:hover {
-  background: transparent url(images/close-rtl.png) no-repeat;
+  background: transparent url(images/close.png) no-repeat;
   border-top-right-radius: 0;
+
+  -webkit-border-top-left-radius: 12px;
+  -webkit-border-bottom-left-radius: 12px;
+  -moz-border-radius-topleft: 12px;
+  -moz-border-radius-bottomleft: 12px;
+  border-top-left-radius: 12px;
+  border-bottom-left-radius: 12px;
+  background-color: #ffffff;
 }
 
--- a/core/modules/overlay/overlay-child.css
+++ b/core/modules/overlay/overlay-child.css
@@ -77,6 +77,14 @@
   /* Replace with position:fixed to get a scrolling close button. */
   position: absolute;
   width: 26px;
+
+  -webkit-border-top-right-radius: 12px;
+  -webkit-border-bottom-right-radius: 12px;
+  -moz-border-radius-topright: 12px;
+  -moz-border-radius-bottomright: 12px;
+  border-top-right-radius: 12px;
+  border-bottom-right-radius: 12px;
+  background-color: #ffffff;

I think this improvement to the Overlay's close button is great, but why is it included in this issue?

+++ b/core/themes/seven/style-rtl.css
@@ -205,3 +205,22 @@ div.add-or-remove-shortcuts {
+/* Narrow screens */
+/*.overlay .layout-region-secondary {
+     -moz-box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1);
+  -webkit-box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1);
+          box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1);
+}*/

Why is this commented out? Should we delete it, or is it serving some purpose?

+++ b/core/themes/seven/style.css
@@ -1523,7 +1533,137 @@ details.fieldset-no-legend {
-  display: none; /* Hide JS summaries. @todo Rethink summaries. */
+ display: none; /* Hide JS summaries. @todo Rethink summaries. */

Accidental removal of leading space?

Dries’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Needs work

Committed #92 to 8.x. Great work moving this forward. Setting back to 'needs work' for the issues identified in #93, and possibly one from #90.

Bojhan’s picture

Whooo! Thanks Dries, it looks like we might be able to get this thing changed in core.

David_Rothstein’s picture

This looks great, but what happened to the vertical tab summaries? I thought we agreed to keep them in the new design (see #1510532-148: [META] Implement the new create content page design and subsequent comments), i.e. similar to what was shown in earlier designs such as http://groups.drupal.org/files/8_add-content_b.jpg. This was because intermediate and advanced users find them helpful, and also because Drupal 6 usability testing showed problems with pure collapsible fieldsets for beginners as well (although recent tests have apparently been less conclusive).

Followup to add those back?

David_Rothstein’s picture

Issue summary: View changes

Nicer formatting.

ry5n’s picture

Issue summary: View changes

Linked to issue to determine direction for vtab/details summaries

ry5n’s picture

@Dries Thank you! And thanks to everyone who helped out.

@David_Rothstein The vtab/details summaries remain, but they are simply hidden with CSS. How exactly to deal with them is still an open question, as far as I recall. I created a new issue to fix that: #1919956: Determine when and/or how to display summaries for vertical tabs and details ui components. If there was a consensus that I have forgotten about, this might be a quick one.

@effulgentsia There is definitely some code cleanup needed here. Should that be done in a new follow-up, or can we re-use this issue?

As for #1751754: Implement new form style for Seven, based on blueprint mockups., the “blueprint mockups” really refer to just the content creation page visual design. That design, though good, doesn’t take all of the Seven admin styling into account, and we are already faced with quite a lot of look-and-feel inconsistency in Seven right now. For the past two months I’ve been working on a unified and updated visual style for Seven that I think does a good job of looking at the whole picture. Myself, Bojhan and yoroy posted it on g.d.o this weekend. We’re looking for lots of input: http://groups.drupal.org/node/283223.

sun’s picture

At minimum, we should remove the node.edit.admin.css file as a follow-up patch here. The entire styling is performed in Seven theme.

echoz’s picture

Followup to remove obsolete IE css committed from this issue, #2021073: Remove Seven's ie.css

tkoleary’s picture

Additionally we should correct a deviation from the original design that occurs when overlay is disabled:

image

As you can see there is white space above and to the left of the right column. This could be removed by adding negative margin top and right to .layout-region-node-secondary and setting the overflow on .layout-node-form to visible:

.layout-region-node-secondary {
margin-top: -1.55em;
margin-right: -2.25em;
}

.layout-node-form {
  overflow: visible;
}

Resulting in the desired look:

image

But that seems like the wrong way to do this to me and I suspect it would mess up overlay. Really the right approach would seem to be removing the margin on #page and applying it instead to .content but I lack the CSS skills to make that happen. Anyone care to try this?

LewisNyman’s picture

Issue tags: +Novice, +CSS novice

This is a minor fix, tagging novice.

Bojhan’s picture

@tkoleary The design changed to accommodate breadcrumbs, can we make sure that wraps correctly then? Other than that major plus to fixing this.

echoz’s picture

Status: Needs work » Needs review
FileSize
33.9 KB
491 bytes

This patch addresses #100 with similar css that had been used for the overlay, lines 1745-1752 of seven's styles.css, adjusting #console and .messages.

2col-no-space.png

Unrelated, I noticed for no overlay, there is still a broken breakpoint between 780px - 832px (52em) where the media query css was written only for overlay, present before and after this patch.

tkoleary’s picture

@echoz

Awesome work! That was quick. I'm going to ask Angie to review and mark RTBC.

webchick’s picture

Sorry, I can't review CSS patches. :) But once it's RTBC I'm happy to take a look!

LewisNyman’s picture

This CSS looks correct. I'm a bit confused why we are printing an empty #console div on the page?

tim.plunkett’s picture

echoz’s picture

#106 yep, this is a compensation for the empty #console div's margins.

tim.plunkett’s picture

So it should have an @todo pointing to that issue.

LewisNyman’s picture

But with this patch applied, won't they look incorrect when they do have content in them?

echoz’s picture

FileSize
38.56 KB

The patch just moves the (top, bottom) margins from #console to .messages in this display, as the overlay css in the committed patch does.
Screenshot of #103 patch with message:

2col-message.png

tkoleary’s picture

Seems like what's needed is either:

  1. A change to the console region to give it a 100% width border-bottom, or
  2. A change to the template that places the console inside of #content so that it is in the left column and only pushes down title and body
Bojhan’s picture

Yup agreed, it shouldn't push down the sidebar, it should only push down the contents of the form.

LewisNyman’s picture

I don't think that's possible with the way that the two column layout has been implemented. We aren't using the traditional content/sidebar region method because it's all part of one form.

tkoleary’s picture

@LewisNyman

So if that's the case version 1: A change to the console region to give it a 100% width border-bottom.

Or even better we could make the console messages "toasters" that appear and fade in a fixed position like growl messages :)

webchick’s picture

Actually, could we split this discussion + the patch at #103 off into a sub-issue and mark this issue as fixed? We're already at 116 comments, and it's looking like this needs more discussion.

rteijeiro’s picture

Just opened this issue to address #103 issue. Uploaded #103 patch as webchick suggested.

LewisNyman’s picture

Status: Needs review » Closed (fixed)
LewisNyman’s picture