Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Responsive Data Table Description Widths #11360

Closed
1 task done
KevinCamelo opened this issue May 6, 2022 · 4 comments · Fixed by #11919
Closed
1 task done

[Feature Request]: Responsive Data Table Description Widths #11360

KevinCamelo opened this issue May 6, 2022 · 4 comments · Fixed by #11919

Comments

@KevinCamelo
Copy link

KevinCamelo commented May 6, 2022

Summary

Currently, the description within the data table header wraps the full width of the data table container. The data table description should responsively resize to provide a comfortable line-length.

As-Is Example #1 As-Is Example #2
Screen Shot 2022-05-06 at 3 53 38 PM Screen Shot 2022-05-06 at 3 54 29 PM

Justification

In design reviews on Cloud, we often ask teams teams for text to not take up more than 50% of the container width. However, the implementation of this suggestion can be troublesome especially as tables get narrower on smaller viewports.

Since each developer may implement comfortable line lengths in different ways (line breaks, changing the max-width via CSS overrides), this can cause style discrepancies across our series of products. It would be great for the base carbon component to have responsive widths for data table descriptions.

Desired UX and success metrics

As noted in the IBM Design Language website, comfortable reading suggests a line length between 32 and 80 characters.

Thus, the data table description should:

  • Responsively adapt its width across different breakpoints.
  • Preserve openness in typography
  • Maintain a comfortable line length (32 - 80 characters in length)

Required functionality

  • Updated guidance on the Carbon Design System website that addresses Data Table description line lengths
  • A coded component that scales it's description based on the width of the data table's parent container

Specific timeline issues / requests

This is not a pressing issue, however; it would be great for official guidance to be made regarding line lengths in the data table description.

If this enhancement makes it through to the coded component, this would ensure consistency in our data table description line lengths across IBM.

Available extra resources

https://ibm-cloudplatform.slack.com/archives/C0M053VPT/p1651859062603919

Code of Conduct

@tay1orjones
Copy link
Member

Thanks for bringing this up @KevinCamelo! Theres lots of ways to cap line length. A max-width using ch units seems like a reasonable option.

It would be good to analyze Plex renderings at that weight and size to determine a good ch value that is within the bounds of acceptable line-length without being unnecessarily short/long. ~65ch is a good spot to start probably, but Plex might do better keeping under 80 chars with 70ch or something.

@carbon-design-system/design do you have some opinions on if we should just shoot for <=80 characters on all breakpoints, or would it be best to change the max per breakpoint?

@laurenmrice
Copy link
Member

@tay1orjones We can adjust these if they need to be tweaked after it gets up in a PR.

  • max, xlg, and lg breakpoints: We can shoot for ~80ch.
  • md breakpoint: We can try out ~50ch, 80 seems to be too lengthy especially if the data table contains a toolbar with buttons, icon actions,etc.
  • sm breakpoint: We can go 100%.

@laurenmrice laurenmrice moved this from ⏱ Backlog to 🏗 In Progress in Design System Jul 12, 2022
@shixiedesign
Copy link
Contributor

Hey I just noticed this issue too. What Lauren suggests look good. I'm also expecting there to be a margin or padding right to the content (title and description) so content doesn't push up against the edge:
image

@kodiakhq kodiakhq bot closed this as completed in #11919 Aug 8, 2022
Repository owner moved this from 🏗 In Progress to ✅ Done in Design System Aug 8, 2022
@KevinCamelo
Copy link
Author

KevinCamelo commented Nov 8, 2022

Thank you for helping get this through @laurenmrice @tay1orjones!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants