More Seven Theme issues: #1986434: New visual style for Seven

Problem/Motivation

Tables have seen little issues, the only improvement we saw was to remove some of the distracting elements and improving the whitespace.

We developed Proposal: A Style Guide for Seven. This issue aims to introduce the proposed styling for tables to core.

To quote the rationale provided:

To improve the ratio of information to UI chrome, this guide recommends removing zebra striping and using thin rules to separate table rows. A progressive enhancement creates a subtle highlight on the hovered table row, allowing the eye to more easily move horizontally along the row, even when large stretches of whitespace appear between cells contents. (Note that this effect, being an enhancement, has no planned touchscreen equivalent and does not pass WCAG contrast standards.) For similar reasons, this style also removes left and right borders from the table and table cells.

The style used here for the sort-active table header cell is a motif carried through to other elements, such as secondary tabs and pagination. This consistency is both good for usability and for Drupal’s credibility (part of the brand).

Proposed resolution

In #1945546: Add Table component and variants we laid the ground work for this change.

Screen Shot 2013-05-03 at 9.55.06 PM.png

We propose to change the zebra styling, the headers, the on hover styling and the spacing.

Remaining tasks

  • Make a patch
  • Review accessibility

User interface changes

The table style will be changed, no functional differences.

API changes

None

CommentFileSizeAuthor
#59 table-style-1986400-59.patch5.41 KBechoz
#59 safari-table-sort.png16.94 KBechoz
#59 FF-table-sort.png17.49 KBechoz
#54 table-absolute-break.png43.58 KBnod_
#51 table-style-1986400-51.patch5.47 KBechoz
#46 Screen Shot 2013-06-30 at 15.05.40.png119.81 KBlewisnyman
#45 Screen Shot 2013-06-30 at 10.41.14.png91.63 KBlewisnyman
#45 Screen Shot 2013-06-30 at 10.45.40.png148.63 KBlewisnyman
#45 Screen Shot 2013-06-30 at 10.52.59.png129.52 KBlewisnyman
#45 Screen Shot 2013-06-30 at 10.55.03.png98.24 KBlewisnyman
#45 Screen Shot 2013-06-30 at 11.02.52.png130.52 KBlewisnyman
#43 table-style-1986400-43.patch5.47 KBechoz
#43 table-th.png16.99 KBechoz
#42 Screen Shot 2013-06-29 at 15.47.43.png78.85 KBlewisnyman
#41 table-style-1986400-41.patch5.48 KBechoz
#38 table-style-1986400-38.patch5.88 KBechoz
#38 table78-sort-rtl.png17.13 KBechoz
#35 table-style-1986400-35.patch5.83 KBechoz
#35 table78-sort.png23.22 KBechoz
#30 table-style-1986400-30.patch7.2 KBechoz
#30 table-after2.png24.05 KBechoz
#27 tables-styling-1986400-27.patch6.82 KBironkiat
#25 table-style-25.patch787 bytesideogram_nl
#21 table-style-1986400-21.patch7.25 KBechoz
#21 table-after.png28.65 KBechoz
#20 1986400-tables-styling-5.patch1001.95 KBironkiat
#16 tables-styling-1986400-4.patch5.83 KBironkiat
#16 Screenshot_20_6_13_12_35_AM.png64.96 KBironkiat
#16 Screenshot_20_6_13_12_33_AM-2.png65.62 KBironkiat
#8 2013-05-08_0014.png197.98 KBBojhan
#5 table-rtl-view.png28 KBoresh
#3 1986400-tables-styling-3.patch6.59 KBoresh
#2 Screen Shot 2013-05-04 at 11.37.54 AM.png56.79 KBBojhan
#1 1986400-tables-styling-1.patch6.52 KBoresh
Screen Shot 2013-05-03 at 9.55.06 PM.png83.25 KBBojhan

Comments

oresh’s picture

Status: Active » Needs review
StatusFileSize
new6.52 KB

For no reason I had so much time on trying to create the patch, oh - took more than making the changes themselves.

Includes 4 images for table sorting and removing images for sorting from template.

Bojhan’s picture

StatusFileSize
new56.79 KB

@oresh Great! Thanks for kicking this off! Its so exciting to see this inside Drupal, my first review:

  1. The text looks a little big? Is this because we are using a different font in the original designs?
  2. It looks like the bottom border on the th, should be darker.
  3. The th, should not have a hover style - only the individual column headers should get the bottom border (no background hover effect)
  4. The checkboxes are not aligned, the th has a different margin than the tr's it seems

Below is an image of the current implementation

Screen Shot 2013-05-04 at 11.37.54 AM.png

oresh’s picture

StatusFileSize
new6.59 KB

Fixed all above.
The font is different, that's why it looks like that :)

I didn't touch the font family in this patch. I think it's work for another patch.

aspilicious’s picture

+++ b/core/themes/seven/style.cssundefined
@@ -458,30 +467,67 @@ tr.drag {
+  right: 0; /* LTR */

If you're changing these kinda things you need to be sure it is rendered correctly in RTL mode. You can do this by switcing from LTR to RTL in the language settings. Its possible that you need to enable an aditional language to get the settings page.

BTW: please provide screenshots.

oresh’s picture

StatusFileSize
new28 KB

@aspilicious thx!
I've did that and found one small bug.

But now I need more information - how a table should look with RTL language?
Attaching screenshot how it looks like right now. (with a small fix for the bug above)
I doubt that rtl table doesn't need any changes.

Bojhan’s picture

This seems to be bugged on the content type page (any page with no checkbox).

Bojhan’s picture

Status: Needs review » Needs work
Bojhan’s picture

StatusFileSize
new197.98 KB

2013-05-08_0014.png

lewisnyman’s picture

Why are the table headers red?

ry5n’s picture

@Bojhan:
- looks like maybe there's something rendering as a list-item in there, creating a bullet and some extra space.
- Why do you say those two columns should be right aligned? Is this an RTL display? If so, all the items should be right-aligned.

Bojhan’s picture

@ry5n my image reviews the RTL display.

Bojhan’s picture

Issue tags: +sprint

This should be quite easy to fix, adding sprint tag.

echoz’s picture

#9, thead is mistakenly #faf5f2 rather than #f5f5f2

wim leers’s picture

Issue tags: -Usability, -styleguide

Optimized PNG files! YAY! :)

(Note: I'm no CSS expert, so this is a best-effort attempt at feedback.)

+++ b/core/themes/seven/style.cssundefined
@@ -430,27 +430,36 @@ div.submitted {
+  font-size: .875rem;
+  line-height: 1.125rem;

This only works in IE>=9, which is acceptable now that we don't support IE8 anymore :)

+++ b/core/themes/seven/style.cssundefined
@@ -430,27 +430,36 @@ div.submitted {
+  min-height: 39px;

Why is this in px if the font size is defined in rem?

+++ b/core/themes/seven/style.cssundefined
@@ -430,27 +430,36 @@ div.submitted {
+tbody tr:hover {
+  background: #f7fcff;

I thought this might be problematic on touch devices (like it was for contextual links) but it is not. Yay :)

+++ b/core/themes/seven/style.cssundefined
@@ -458,30 +467,67 @@ tr.drag {
+th > a:after {
+  content: '';
+  display: block;
+  position: absolute;
+  top: 0;
+  bottom: -1px;
+  left: 0;
+  right: 0;
+  border-bottom: 2px solid transparent;
+  transition: all 0.1s;

What's this for? Why the transition?

A bit of docs would be helpful here.

+++ b/core/themes/seven/style.cssundefined
@@ -458,30 +467,67 @@ tr.drag {
+  background-color:transparent;

Nitpick: missing space after colon.

+++ b/core/themes/seven/style.cssundefined
@@ -458,30 +467,67 @@ tr.drag {
+[aria-sort="ascending"].active > a {
+background-image: url(images/arrow-asc-active.png);
+}
+[aria-sort="ascending"].active > a:hover {
+background-image: url(images/arrow-asc.png);
+}
+[aria-sort="descending"].active > a {
+background-image: url(images/arrow-desc-active.png);
+}
+[aria-sort="descending"].active > a:hover {
+background-image: url(images/arrow-desc.png);

These selectors appear to be a tad too broad? http://www.w3.org/TR/wai-aria/states_and_properties#aria-sort says this should be used for tables *and grids*. Though I guess this is sufficient for the 99%? If so, ignore this.

wim leers’s picture

Issue tags: +Usability, +styleguide

d.o WTF

wim leers’s picture

Issue summary: View changes

meta issue added

ironkiat’s picture

Hopefully I'm doing it correctly...

Interdiff:
https://dl.dropboxusercontent.com/u/1539612/1986400-4-interdiff.txt

Some notes:

  • Colors wise, I followed the Drupal color and selection color as stated in https://groups.drupal.org/node/283223#Color
  • I initially wanted to make the arrows as a sprite but couldn't get it to work so fall back to 4 images :(

Screenshots:
People listing table
People listing table

echoz’s picture

Status: Needs work » Needs review

I'm assuming status should be NR since #16 submitted a patch.

Status: Needs review » Needs work

The last submitted patch, tables-styling-1986400-4.patch, failed testing.

ironkiat’s picture

Woops, I guess it always happens for the first patch :P Will check on why failed and submit another patch.
But I think some help needed, the review failed didn't mention much details...anyone have some idea?

Thanks!

ironkiat’s picture

Status: Needs work » Needs review
StatusFileSize
new1001.95 KB

Ok I realize why, missing 2 new images for the hover arrows...fingers crossed!

Interdiff here: https://dl.dropboxusercontent.com/u/1539612/1986400-tables-styling-5-int...

echoz’s picture

Issue tags: -sprint
StatusFileSize
new28.65 KB
new7.25 KB

#20 is not ok, it's a 1MB patch, I assume patched from the wrong location.

I've started from scratch, implementing the table as in seventy-eight, including new arrow images using seventy-eight colors.

Notes:
* The aria-sort is not currently implemented, and this needs help.
* Yes, text is larger since the design's font is not in use.
* I left the bullets in for clarity with multiple roles. If any line wrap they would be unintelligible.
* seventy-eight's padding on th and td differs. Unsure if intentional, I equalized them since unusual that checkboxes don't line up, and just looked like a mistake.

table-after.png

Bojhan’s picture

@echoz Awesome work, I checked out the patch - it works really nice, only a few bugs:

  • It looks like the dropbutton is not vertically aligned to the center?
  • I get two downward pointing arrows, on Updated
  • We probally should largely refrain from changing the font-size, if it starts looking so weird as this

Your decision to align the padding and bullets feels right. This is starting to feel close :)

echoz’s picture

Thanks @Bojhan!

* The dropbutton has a space under it (pushing it up from vertically centered), that will need to be corrected in the dropbutton code.

* I can't reproduce 2 arrows, can you tell me or show where? I see "Updated" at admin/content with one arrow. Browser cache?

* Next patch, I will not change font size and it will look proportionately sized.

* The original patch began with the aria-sort attribute selectors, but they never worked. Was there a discussion that this would be the method for toggling the sort arrows? I do not know how to implement this.

ideogram_nl’s picture

I applied patch #21 on a fresh Drupal 8 installation from 'git'.

It strikes me that the arrows do not 'flip' when changing from 'ascending' to 'descending' sorting. The arrow always points downward. ▼

Lastly, I do not see the nice underline under the active table-header.

ideogram_nl’s picture

StatusFileSize
new787 bytes

I've edited the CSS file to address issue with the underlined table-header.

Status: Needs review » Needs work

The last submitted patch, table-style-25.patch, failed testing.

ironkiat’s picture

Status: Needs work » Needs review
StatusFileSize
new6.82 KB

I realize why my original patch was 1mb instead of few kbs...so I did a pull again from the 8.x branch and create the patch again.
Understand this and echoz version is different, but I agree the aria-sort may not work again in this as well.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, tables-styling-1986400-27.patch, failed testing.

echoz’s picture

@ideogram_nl, #21 and #23 explain that the arrows don't flip. Also, the underline css is there and works, shown in the screenshot.

@ironkiat, what is your patch correcting over #21? It is up for review, you're welcome to review it :-)

echoz’s picture

Status: Needs work » Needs review
Issue tags: +Usability
StatusFileSize
new24.05 KB
new7.2 KB

#27 deviates from seventy-eight and in part is why I had started clean in #21.

This is #21 patch with only the original font size unchanged. This is mainly to keep this patch as the one already under review.

table-after2.png

Status: Needs review » Needs work
Issue tags: -Usability, -styleguide

The last submitted patch, table-style-1986400-30.patch, failed testing.

echoz’s picture

Status: Needs work » Needs review

#30: table-style-1986400-30.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, table-style-1986400-30.patch, failed testing.

echoz’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +styleguide

#30: table-style-1986400-30.patch queued for re-testing.

echoz’s picture

StatusFileSize
new23.22 KB
new5.83 KB

I propose using the current core method providing inline images for table sort indicators, where we get the sort arrow direction toggle but no hover arrow color change, rather than deleting seven's theme_tablesort_indicator override and using background images, where we get the hover arrow color change but no sort arrow direction toggle (#30 patch).

Also this version does not display arrows on hover of non active headers, just the underline and hover color. Seventy-Eight has arrows on every hover, but the previous sortable tables do not, which I believe makes more sense, keeping the arrows only about the sort.

The active arrows are still included in case we invent how to use them.

table78-sort.png

lewisnyman’s picture

Removing a theme function is another conversation entirely. Let's try and keep the scope if this issue down.

echoz’s picture

Yep, #35 patch is keeping it. There's a lot of existing code for tablesort, and this patch is the first that takes advantage of it and has toggling sort arrows.

echoz’s picture

StatusFileSize
new17.13 KB
new5.88 KB

Correction on arrow placement for previously untested RTL

table78-sort-rtl.png

Bojhan’s picture

Issue tags: -Usability

How close is this?

echoz’s picture

IMO this can go in. The sort indicator arrows toggle correctly. They do not have a color change on hover. #35 and #21 note other variations from Seventy-Eight and the reasoning.

echoz’s picture

lewisnyman’s picture

Status: Needs review » Needs work
StatusFileSize
new78.85 KB

This patch causes some problems on tables that don't have links to the header. Ideally we would have a conditional classes or some kind of mark up to distinguish this situation and add some padding to the s themselves.

Screen Shot 2013-06-29 at 15.47.43.png

echoz’s picture

Status: Needs work » Needs review
StatusFileSize
new16.99 KB
new5.47 KB

I moved the th anchor's top and bottom padding to the th. The th links function the same.

table-th.png

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies well and everything seems to work well.

lewisnyman’s picture

Nice one echoz!

I've added the tag "styleguide-independent" which means this issue can be committed on it's own without causing regressions.

Here are a few more screens of various tables:

Screen Shot 2013-06-30 at 10.41.14.png

Screen Shot 2013-06-30 at 10.45.40.png

Screen Shot 2013-06-30 at 10.52.59.png

Screen Shot 2013-06-30 at 10.55.03.png

Screen Shot 2013-06-30 at 11.02.52.png

lewisnyman’s picture

StatusFileSize
new119.81 KB

I forgot to post a field UI table

Screen Shot 2013-06-30 at 15.05.40.png

Bojhan’s picture

Status: Reviewed & tested by the community » Needs work

Trying the latest patch, in chrome there is a 1px white line between column headers.

The views UI is a little weird now, the view name should not be vertically centered like that.

echoz’s picture

@Bojhan I can't reproduce what you report in #47. I still get the same as we see in #43, #45, #46. Browser cache? Can you provide a screenshot?

echoz’s picture

Status: Needs work » Reviewed & tested by the community

I'm setting this back to RTBC since I can't reproduce #47 and I see a new tag "RTBC July 1" and concerned this isn't supposed to miss out.

yesct’s picture

Issue tags: +RTBC July 1

This issue was RTBC and passing tests on July 1, the beginning of API freeze.

echoz’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new5.47 KB
Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC

effulgentsia’s picture

Issue tags: -RTBC July 1

The fixes here are CSS and images only, which are not subject to API freeze, so removing the "RTBC July 1" tag since it is irrelevant.

nod_’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new43.58 KB

A UI patch with only 52 comments to RTBC? I've been away too long…

Anyway, problem on Firefox 22, see below. I'm pretty surprised actually. I knew position-relativing a cell doesn't work very well but I would have expected IE to complain. The patch even works on IE8…

Love the new style btw :)

Bojhan’s picture

@nod_ Hehe, can you explain what the error is, I cant spot it? Maybe I am too tired.

nod_’s picture

The border is below the table instead of at the bottom of the header cell. Look for the arrow indicating the sorting order too, it's above the table on the right instead of inside the header cell.

Bojhan’s picture

@nod Ahh! Nice catch :) Thanks.

echoz’s picture

Assigned: Unassigned » echoz

@nod_ right about Gecko not understanding position: relative; on table cells! I'm am working on this, and looks like I have a solution.

echoz’s picture

Status: Needs work » Needs review
StatusFileSize
new17.49 KB
new16.94 KB
new5.41 KB

Fix with position: relative; working on anchor tag.

Safari

safari-table-sort.png

Firefox

FF-table-sort.png

Status: Needs review » Needs work
Issue tags: -Usability, -styleguide, -styleguide-independent

The last submitted patch, table-style-1986400-59.patch, failed testing.

echoz’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +styleguide, +styleguide-independent

#59: table-style-1986400-59.patch queued for re-testing.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

works, thanks :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Manually tested and looks good... whilst testing found an unrelated bug #2048895: Dblog CSS results in background image repeating

Committed 7272a71 and pushed to 8.x. Thanks!

Added ry5n to the commit message as the designer.

gábor hojtsy’s picture

Great, great improvement! Here are two bugs that have cropped up due to this though in the language tables (interface translation itself and content translation configuration): #2049387: Locale string change styles applied too excessively. Let's fix those!

traviscarden’s picture

Sorry to come so late to the party with this, but is everyone satisfied with the table row hover background color? It's so light I didn't even see it at first, and I have a nice monitor and good vision. Any chance we could darken it a bit?

tim.plunkett’s picture

Remaining tasks

Review accessibility

I doubt this had any accessibility testing

Bojhan’s picture

@Tim As far as I know the contrast of the table header hovers is enough to pass WCAG, the hover on rows is purely decorative so doesn't need review. I am not sure this had any functional html changes, so not sure what else to review. I did post all style guide issues to the a11y group, several times. So I am not sure what else to do.

tim.plunkett’s picture

You removed zebra striping in favor of that hover.
Also, you tag the issue 'needs accessibility review' and it doesn't get committed until that's done.

That's how the rest of core works.

Bojhan’s picture

Status: Fixed » Needs review
Issue tags: +Needs accessibility review

@tim No idea why you're being so hostile.

Added the tag and reopened the issue, hopefully that will get us the review we need. The zebra striping is decorative, as far as I know. The current Drupal 7 zebra striping doesn't pass WCAG.

tim.plunkett’s picture

Sorry, I was typing on my phone. Was being brief, didn't mean to be hostile.

I'm not 100% sure that zebra striping is an accessibility improvement by itself, but like @TravisCarden I'm having a harder time than usual seeing it.

lewisnyman’s picture

It does seem a bit faint, not that the hover is an essential accessibility feature. We could tweak it slightly, as long as we update the global colour scheme.

Bojhan’s picture

@tim.plunkett Hehe, oke :) Read it wrong then.

@Lewis we can try some things (a more bold hover, light zebra etc.), The zebra striping used in Drupal 7 is very strong (making it harder to actually scan vertically). I wouldn't like to return to that.

lewisnyman’s picture

@bojhan definitely not, I think the hover is a more elegant solution, I just think we need to tweak the shade of blue to be a bit more visible, maybe even a slight transition will help draw the eye.

echoz’s picture

The blue of hover is noticeably fine for me, although I have quality displays. If it were darker it might be fine, but if we loose the delicacy of that lightness, a darker blue could get ugly.

@LewisNyman, I thought a transition would be a great idea, but it actuallty makes it less noticeable because it's a subtler change, where without a transition, the instant pop of the change is most noticeable.

Bojhan’s picture

@echoz As far as I know in terms of visual perception theory - movement is more noticeable than instant change. Therefor transitions are often more easy on the eye but also more noticeable than popping. I suggest to try it yourself whether you notice a underline that appears slowly (still 200ms or so) to an instant appear. You will notice the animating one more.

echoz’s picture

@Bojhan of course that makes sense, and is why I wrote I assumed it was a good idea. I did try it (began to create a patch) but on a a background color fading in, I thought it was less noticeable, but this is subjective and I'm certainly ok with deferring to designers :-) I just didn't want it to end up less noticeable and because of that made a darker blue that wasn't as delicate.

Bojhan’s picture

@echoz Hehe :) Well its in the details, lets explore a few ways of doing this.

Bojhan’s picture

Issue summary: View changes

Updated issue summary.

mgifford’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

I love animated transitions. That being said, this patch no longer applies.

echoz’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

The last patch was committed in #63. This got set to needs review because it needs accessibility review.

mgifford’s picture

It looks good to me. Thanks for the clarification @echoz

Should it now be set to fixed?

echoz’s picture

Status: Needs review » Fixed

yes :-)
Thanks @mgifford

Status: Fixed » Closed (fixed)

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