Improve the readability of the view mode and form mode page

Created on 27 October 2023, about 1 year ago
Updated 15 November 2023, about 1 year ago

Problem/Motivation

The columns for the different view mode and form mode entity types are not really aligned across entity types and with the introduction of a description column 📌 Give display modes a description Fixed things got a bit more challenging cognitively (*I don't mean the description was the wrong thing to add. I really like it's addition but it jut introduces a potential additional readability problem in case the description gets long and verbose)

If you compare the rows for the different entity types vertically they don't look consistent since their columns aren't horizontally aligned. That way there is sort of a constant visual distraction by having an horizontal shift of the column widths across the different entity types sections. Those shifts also lead to different sized horizontal gaps between the columns. for example in the viewmodes.jpg the gap between "test" (name column) and "description about a test" (description column) is huge, same as the gap to the corresponding edit button. the gap for view modes without any description is even larger. if you try to keep the line visually with the straw test it is challenging (also due to the fact that the separating lines have a color contrast of 1.5:1 which might be too light) . and if you are moving down the operations column with the mouse you dont have to move vertically but also horizontally when you get within a new entity type section to be able to reach any of the new region's edit buttons.
And in general it seems the width of the different columns between entity type sections differs significantly. For content the name column is extra wide compared to other entity types. The width of the description and operations column is more or less the same width.

And one extreme edge case but if you add a long description and you are using a wide screen monitor you will end up with a line length of 648 characters for a 36" monitor. The goal in regards of meeting the AAA WCAG2.1 SC1.4.8 C20 is having a line length of around ~80 characters.

The problem was touched during the discussion of 📌 Allow user to add display modes from respective field UI's. Needs work in todays usability meeting. That issue 📌 Drupal Usability Meeting 2023-10-27 RTBC will have a link to a recording of the meeting. For the record, the attendees at today's usability meeting were @AaronMcHale, @anmolgoyal74, @benjifisher, @rkoller, @shaal, @simohell, and @worldlinemine.

Steps to reproduce

  • Go to /admin/structure/display-modes/view

Proposed resolution

A few suggestion to improve the current state:

  • make the column widths consistent across entity types
  • try to avoid large gaps
  • set a maximum width in particular for the description column to avoid such extreme line lengths illustrated in 36inchdescription.jpg

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Fixed

Version

10.2

Component
Field UI 

Last updated 42 minutes ago

Created by

🇩🇪Germany rkoller Nürnberg, Germany

Live updates comments and jobs are added and updated live.
  • Field UX

    Usability improvements related to the Field UI

  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

  • Issue created by @rkoller
  • 🇩🇪Germany rkoller Nürnberg, Germany
  • 🇩🇪Germany rkoller Nürnberg, Germany
  • 🇩🇪Germany rkoller Nürnberg, Germany
  • First commit to issue fork.
  • @utkarsh_33 opened merge request.
  • Attaching the screenshots with the current look of the table.

  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States tim.plunkett Philadelphia
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Tested at various widths/breakpoints and columns remain even through out.

    The solution

    try to avoid large gaps

    think could be it's own issue to fix across entire Drupal.

  • Status changed to Needs work about 1 year ago
  • 🇩🇪Germany rkoller Nürnberg, Germany

    Thanks for working on this. I finally found time to test and write up a reply. I agree with @smustgrave in #9 Improve the readability of the view mode and form mode page Active that the larger gap issue should be tackled for core in general. But i think there are still a few aspects that should be covered within this issue imho:

    1. The changes in the MR affect other pages as well. I've just noticed a regression on /admin/modules/uninstall while testing something for another issue:

    2. I wonder if it would make sense to set the column width for name narrower than the one for the description. that the name column is half or two third of the description column? because the odds are high that a name is usually shorter than a verbose description.

    3. If you have a long name for a display mode the column extends. would there be an option to wrap a name instead of extending the column width? In german the odds are high that you get long words (one example from a legislative text: "Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz" - it got removed after a few years but still just wanted to illustrate the possibility of the occurance of extra long words - cuz in my screenshot i've simply used a numeric sequence that eases counting)

  • I have added a custom css file that overrides the css of the generic table's css for the current page.I think editing the generic css file for tables makes it difficult to handle different layouts on different pages so i thought that this can be better approach.
    We can have a discussion around some other approach , if someone has a better idea to handle these issues at a generic level.
    Attaching the SS with the current changes applied.

  • Status changed to Needs review about 1 year ago
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Appears feedback has been addressed. I added black border to help see.

  • 🇩🇪Germany rkoller Nürnberg, Germany

    I've also taken a look at the latest changes and a +1 to RTBC from my end as well. Looks real good @utkarsh:33!

    @smustgrave also a good idea adding a screenshot illustrating the new column width by adding visible borders to each table cell

    • lauriii committed 005c0e91 on 11.x
      Issue #3397291 by Utkarsh_33, rkoller, smustgrave: Improve the...
    • lauriii committed c4db1fe9 on 10.2.x
      Issue #3397291 by Utkarsh_33, rkoller, smustgrave: Improve the...
  • Status changed to Fixed about 1 year ago
  • 🇫🇮Finland lauriii Finland

    Committed 005c0e9 and pushed to 11.x. Also cherry-picked to 10.2.x. Thanks!

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

Production build 0.71.5 2024