Skip to content

feat(GlEmptyState): Add line length limit

Julia Miocene requested to merge empty-state-line-length into main

What does this MR do?

Since adding utility classes for line lengths has proven to be controversial 😅 I suggest first limiting the line length to GlEmptyState.

I was trying to migrate plane empty states to the Pajamas component, but in a lot of places, we use other utility classes to limit the width of the text. And I think it's time to limit it to the component level.

According to WCAG, the line length should be 40-80 characters for better readability. There is no formula to calculate the perfect line length. So, I took all the empty states that I changed this year and tried all the options between these numbers. 65ch is the most beautiful for my taste 🙂

Screenshots or screen recordings
before after
1_before 1_after
2_before 2_after
3_before 3_after
4_before 4_after
5_before 5_after
6_before 6_after
7_before 7_after
8_before 8_after
9_before 9_after
10_before 10_after
11_before 11_after
12_before 12_after
13_before 13_after
14_before 14_after

Other minor changes:

  • Remove a div wrapper for illustration
  • Remove a div wrapper for content

Integration merge requests

Does this MR meet the acceptance criteria?

This checklist encourages the authors, reviewers, and maintainers of merge requests (MRs) to confirm changes were analyzed for conformity with the project's guidelines, security and accessibility.

Toggle the acceptance checklist

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidelines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened (see integration merge requests above).
  • Added the ~"component:*" label(s) if applicable.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • Security reports checked/validated by a reviewer from the AppSec team

Accessibility

If this MR adds or modifies a component, take a few moments to review the following:

  • All actions and functionality can be done with a keyboard.
  • Links, buttons, and controls have a visible focus state.
  • All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label for icons that have meaning or perform actions.
  • Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false" to aria-expanded="true" when an accordion is expanded.
  • Color combinations have sufficient contrast.

gitlab#424403 (closed)

Edited by Julia Miocene

Merge request reports