carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.86k stars 1.82k forks source link

Enable set data table truncation and text wrap behavior #7958

Open vsnichols opened 3 years ago

vsnichols commented 3 years ago

Summary

Currently the data table does not start horizontal scrolling until text wraps to three lines.

CDAI data table team is proposing this change per our discussion with Carbon design in February.

As-Is

Screen Shot 2021-03-03 at 8 42 34 AM

To-Be where table set to use truncation

Screen Shot 2021-03-03 at 9 10 28 AM

Justification

See above

Desired UX and success metrics

1.) A developer can set line wrap/truncation preferences before horizontal scrolling kicks in 2.) A user can focus on table content without getting distracted by crowded 3-line cells 3.) When text is truncated user can view full text via browser tooltip on hover

"Must have" functionality

Developer should have the following options:

Specific timeline issues / requests

As soon as possible but preferably during Q2 as CDAI data table responsive behavior depends on this

Available extra resources

CDAI devs could potentially help code

dakahn commented 3 years ago

2.) A user can focus on table content without getting distracted by crowded 3-line cells

Interesting. Do you have some user research or data supporting this? Text truncation is one of those rare design elements that are bad for sighted and keyboard users. Made exponentially worse when used 10, 15, 20 times in a single component.

Instead of forcing content to fit a design you get a more usable and accessible experience by designing to accommodate the content -- which traditionally means responsive containers and text-reflow.

joshblack commented 3 years ago

Hi there! 👋 Going to close this issue out since it's been a while since we've gotten a response.

vsnichols commented 3 years ago

@joshblack can we reopen this issue?

The data table workstream for CCPAL would still like this feature.

We met with @dakahn in June to talk thru concerns and are addressing the following in our guidelines:

Re: evidence for truncation in tables Truncation tends to be recommended for tables in major design systems like Material Design in order to make tables easier to scan

Screen Shot 2021-10-27 at 10 40 07 AM

It is important that we have tooltip behavior to make truncation UX-friendly. @dakahn should we make a separate issue to request carbon data table to support tooltips on truncated text?

vsnichols commented 3 years ago

@aagonzales @dakahn can we work with you on getting some basic form of this implemented in carbon data tables making sure to do it with tooltips and accessibility concerns?

aagonzales commented 3 years ago

Re-opening as conversations have happened offline and adding a proposal label.

aagonzales commented 3 years ago

@mbgower what are your thoughts on truncation patterns?

vsnichols commented 2 years ago

Hey @aagonzales and @mbgower! Wanted to check in on this issue - I edited the proposal slightly to make it simpler!

sstrubberg commented 1 year ago

From Backlog Grooming Call:

Concerns around how this would with horizontal scrolling in C4IBMP. Explore how this fits in. We need @mbgower to weigh in. Could have WCAG 2.2, text truncation issues. This might be partially covered by C4IBMP.

mbgower commented 1 year ago

When text is truncated user can view full text via browser tooltip on hover

The primary problem with this approach is that such tips are not triggerable by touch or keyboard users unless each truncation becomes an actual component. If each ellipsis effectively becomes a button that reveals the full text, then this approach can work. But in a poorly designed table, it could add a LOT of interaction points, and potentially be quite disruptive.