This stems from #1937926: Shortcuts toolbar tray does not properly float the "Edit shortcuts" link in Bartik where the patch in #15 fixes an issue with the Toolbar that kept the "Edit shortcuts" link from appearing on the same line as the actual shortcut links. The overly broad CSS in views_ui.admin.css was identified as follows:

/* @group Inline lists */

.horizontal > * {
  clear: none;
  float: left; /* LTR */
}

.horizontal.right {
  float: right;
}

.horizontal label {
  position: absolute;
}

.horizontal .form-item > [class] {
  margin-top: 25px;
}

.horizontal .form-item > [class] + [class] {
  margin-top: 0;
}

/* @end */

Specifically, the float: right on .horizontal > * results in the broken two-line display:

I'm not sure if just removing that float is all that's necessary, so I'm going to leave this active for someone with more knowledge of the Views UI CSS to let us know if that breaks any other part of the Views UI when removed. : )

For a screenie of the functioning behavior: #1937926-22: Shortcuts toolbar tray does not properly float the "Edit shortcuts" link in Bartik

Comments

apkwilson’s picture

StatusFileSize
new396 bytes

I'm no expert, but I took a look through Views and didn't see it adding a horizontal class anywhere. It uses a horizontal property on grid displays, but that's it.
So, I removed the float: left; (and float: right; on rtl) in the attached patch.

apkwilson’s picture

Status: Active » Needs review

status change

apkwilson’s picture

StatusFileSize
new396 bytes

removing the empty "rtl" rule - should have done this before.

star-szr’s picture

Issue tags: +Needs screenshots

Nice work @apkwilson! Tagging for before and after screenshots.

star-szr’s picture

It would be a good idea to take screenshots for RTL as well.

lukewertz’s picture

Status: Needs review » Needs work
StatusFileSize
new11.03 KB

I don't think the patch in #3 addresses this issue.

Here's is a screen shot after the patch has been applied:
Shortcut menu

I think the issue here isn't the float as much as it is the underlying DOM:

<div class="lining clearfix">
  <h3 class="visually-hidden">User-defined shortcuts</h3>
  <ul class="menu clearfix">
    <li class="first leaf"><a href="/node/add">Add content</a></li>
    <li class="last leaf"><a href="/admin/content">All content</a></li>
  </ul>
  <a href="/admin/config/user-interface/shortcut/manage/default" class="edit-shortcuts">Edit shortcuts</a>
  <div class="toggle-orientation">
    <div class="lining">
      <button class="icon icon-toggle-vertical" type="button" value="vertical">Vertical orientation</button></div>
    </div>
  </div>
</div>

As you can see, the "Edit shortcuts" link isn't part of the User-defined shortcuts menu unordered object. I'm not really sure what the semantic solution here should be. It's clear that it doesn't belong where it is visually, but it doesn't really make sense to just stick it in the menu.

Thoughts?

lukewertz’s picture

StatusFileSize
new13.48 KB

Well, I tried the patch again (applying it before installing D8 to ensure there were no caching issues), and it worked!

User Shortcuts

@apkwilson: Great job.

It looks like the clearfix has been removed from the unordered object, so this corrects it.

rszrama’s picture

Status: Needs work » Needs review

So would you say this is RTBC as opposed to needs work? Setting to needs review again pending your update.

lukewertz’s picture

I've tested this in latest Chrome, but will test it in more browsers to make sure it hasn't broken anything else (I'm looking at you, IE).

u.rodionov’s picture

StatusFileSize
new71.96 KB
new155.2 KB

sreenshot MacOS

Safari 5.1.9
Chrome 28.0.1500.95

duozersk’s picture

Assigned: Unassigned » duozersk
Status: Needs review » Closed (duplicate)

Hey guys,

Looks like this issue was resolved in another one - #2029451: Fix to general css in the views UI - commit http://drupalcode.org/project/drupal.git/commit/fedfd49 from August 9 that just removes all the ".horizontal" css rules from the views_ui.admin.css file.

We have tested it on the latest 8.x-dev branch and the issue is not present there - so marking as closed (duplicate).

Thanks
AndyB

u.rodionov’s picture

Issue tags: +CodeSprintCIS

Done :)