Problem/Motivation
Currently the description is center aligned for module cards in grid view. Centered text for paragraphs is more difficult to read compared to left aligned ones (or right aligned for RTL)

The reason if you center text the starting point of each line changes. The cognitive toll is bigger that way. The user already has a hard time getting from the end of one line to the beginning of the next and with a differing starting point each line things get even more demanding. That way the reader is forced to make eye movements on both sides of the line which causes unnecessary eye fatigue and results in a a lower reading focus.
For smaller view ports, when the layout switches to a single column display, it additionally intersects with #3300093: Improve the readability on individual module pages by limiting the line length and things get more problematic with a too long line length (~110character).

For the record the issue was identified and initially discussed during #3312892: Drupal Usability Meeting 2022-10-07. The issue has a link to the recording of the meeting. The attendees were @AaronMcHale, @benjifisher, @narendraR, @rkoller, @shaal, @simohell, @srishtiiee, @Utkarsh_33, and @worldlinemine.
Steps to reproduce
- Go to /admin/modules/browse and check the module card in grid view
Proposed resolution
- Make the description left aligned for LTR and right aligned for RTL in grid view like for the list view.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | Salesforce-left-aligned-3315854-18.png | 674.72 KB | ressa |
| #16 | April-2022-New-Design-Draft-Sascha-logos-3315854-15.png | 161.82 KB | ressa |
| #15 | ltr_rtl.jpg | 696.89 KB | rkoller |
| #14 | RTL-issues-3315854-13.png | 128.96 KB | ressa |
| #11 | 2.2-RTL-List-3315854-10.png | 40.36 KB | ressa |
Issue fork project_browser-3315854
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3315854-cardread-2
changes, plain diff MR !462
- 3315854-mprove-the-readability
changes, plain diff MR !283
Comments
Comment #2
rkollerComment #4
utkarsh_33 commentedI've attached the screenshots of the new UI after the changes.
Comment #6
utkarsh_33 commentedComment #7
ressaThanks @rkoller and @Utkarsh_33. I enabled Toggle default alignment of text for text only page from LTR to RTL in Firefox and applied the patch with these steps (mostly documenting for myself):
LTR
✅ The description is left aligned in List view
✅ The description is left aligned in Grid view
RTL
✅ The description is right aligned in List view
☐ The description is right aligned in Grid view
Maybe RTL needs to be defined as well? I have added a comment at Gitlab, and hope it gets shown.
Comment #8
ressaFixing title.
Comment #9
utkarsh_33 commentedComment #10
narendrarComment #11
ressaThanks @Utkarsh_33, I was about to update Status, when @narendraR beat me to it. I can confirm that all four displays align correctly:
LTR Grid
LTR List
RTL Grid
RTL List
Comment #12
rkollerthanks for the patch @Utkarsh_33 and also thanks to @ressa for the screenshots. the only detail i am uncertain about is if it is ok from a design perspective to have centered headings with left or right aligned descriptions for the grid view? as far as i know that isn't a recommended pattern?! i've also found a blog post in that regard here: https://uxmovement.com/content/why-you-should-never-center-align-paragra...
Comment #13
rkollerand on a second look i've noticed that in the RTL Grid screenshot the icon and the download button are next to each other in contrast to LTR. it is missing the spacing to push the button the left like it is done for LTR to the right. a follow up issue might be a good idea?
Comment #14
ressaThanks @rkoller, for all the great improvements you are currently doing on Project Browser, I really appreciate it.
Guidelines such as the one from UX movement can certainly be used, but I feel (from a user perspective) that it works really well with the current lay-out, with centered title and aligned description. It's probably the equally centered logo above the title which "anchors" the title in a sense, and makes it work, probably due to the Gestalt Principle of Proximity.
About RTL: I noticed other issues for example with checkbox margin, so perhaps a meta RTL-issue should be made, and children issues for dealing with buttons, check-boxes etc. added?
Example of RTL issues
Comment #15
rkollerthank you @ressa! happy to help, in particular if it helps.
in regards of the mix of centered title and aligned descriptions you are probably right. the "anchor" function of the icon is an interesting and good point. looked little unusual at the beginning and i had the rule of thumb of not to mix centered headlines with aligned paragraphs in the back of my head. ;)
but take a quick look at the project browser figma file. https://www.figma.com/file/1Z8xrcP2zgnO6BXlu9ZeQ5/Project-browser?node-i... in the updated MVP from 2022 @saschaeggi has one screen where he also uses left aligend description but also left aligned titles as well as left aligned action buttons. one of the screens has a full screen logo while the other screen has a a left aligned icon as well. the problem with the project browser design system is that the designs are missing a few of the components project browser has added over the course of the last few weeks and months like the filter component.
and on the other hand for example the card design is also not exactly in line with the card design in the drupal design system https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/💧-Drupal-Design-system?node-id=553%3A0 (found in the group at the bottom). mainly the spacing to the card border of elements like buttons is out of line. i wanted to open an issue for that as well but i am drawn. on one hand it is important but on the other hand it would be rebuilding the design in svelt. there is an issue in regards of the svelt themeability #3285889: [meta] Svelte app themability.
and about RTL you were right there is more:

ltrthanrtl. also the spacing between thesort byselect and filters button is smaller inltrthanrtlwhile the filters buttons is missing a spacing to the left border.it would probably make sense to open up a separate follow up issue i suppose? cuz all those changes are out of the scope of the issue here.
Comment #16
ressaFirst, thanks for all the observations about RTL, and putting it in writing. Based on your feedback, I created #3316998: Fix RTL margins and alignment of elements in lists and on project page. If needed, we can create child issues, and turn that into a meta issue.
I do recognize your observations in the Issue Summary and comments, and that it takes a cognitive toll to jump between different starting points with centered text, even with the anchoring of logo and title. So left-aligning should be considered.
Thanks for sharing the updated MVP from April 2022 by @saschaeggi:
To me, left-aligning logo, title, and description looks fine and orderly, and more easily scannable. The Security icon could be placed in the upper right corner, since it is quite important, when deciding whether to install a module or not. Tags can be placed left-aligned below description, and "Active installs" in the lower left corner, since the sorting is already by active installs, so least important.
I created a low-fi mock up with https://asciidoclive.com/ what do you think? (I know it looks clunky, but it is so easy to move things around)
1. Current design
2. Proposal: Left-aligned design
Setting back to Active, let's see if the discussion results in another decision about alignment.
Comment #17
narendrarHi @ressa and @rkoller, can we please have some specific pointers to work for the scope of this ticket and remaining can be done in follow-ups?
Comment #18
ressaThanks for following up @narendraR. I am not sure what to do next. My proposal (as seen above) is to left align "everything" except Security icon in top right corner and Install in bottom right corner.
I just saw Bay Area Drupal Camp - The University of Colorado chose Drupal over Backdrop. Why I'm glad we were wrong by kreynen, and it looks like I proposed the same design as Salesforce (see video, at ~37 minutes) ...
So somebody has to make the final decision, whether to stick to centering some of the elements as currently, or not. We could decide to left align everything except "Install" button, and decide whether to move Security icon to upper right corner in a follow-up issue?
Salesforce, left aligned
Comment #19
rkollerapologies for the late reply. but too many different issues stacked up the last few days so i never was able to finish an answer for this one here.
I agree that having everything left aligned could work. the cognitive load is definitely lower even though personally I have the reflex wanting to see the icon centered. ;) but i agree with @ressa that things look fine and orderly left aligned. the only potential problem i see is if you have modules that don't use the default logo dimensions but something wider. examples are
field group,CKEditor 4 - WYSIWYG HTML editor,blazyand so on. those cards are left-heavy that way. ideally all modules should have the default dimensions. otherwise things might look off? for example in the list view if you take a look at the aforementioned module the modules respect the overall width for logos in list view in contrast to grid view but that way the logos look tiny and hard to recognize (happens that those are mostly screenshots which makes the recognizability even worse).in regards of the layout of the cards. the asciidocs examples are a really good way to discuss how things are arranged. good idea thanks for that @ressa! but to get to a final solution i think it would be helpful to agree on a final set of information module cards should communicate aka which components should be added first. the current set of components is:
but there are more components discussed to being added and the question is if those should be reflected in the card with a label and or icon as well. for one you have #3315859: Communicate the status/state of a project in the button accesibly which intents to add to illustrate the state a module is in in the upper corner of the module card. then is the question if the release status should be communicated as well on the cards. the issue for adding the release status as a filter type could be found here #3315864: Add a filter type for the release status. in regards of the install count #310877: possible multiple bio node bug it could be questioned if the icon is necessary at all. plain text might be enough. cuz the icon doesn't add any significant value at all. and then there is the question if the category chips add value to the card. one could argue you are already filtering by categories and that way those chips would be redundant. the only case chips definitely make sense is if no category filter type is applied. but to finally settle on the information communicated on the cards would be an important and probably mandatory step.
and it might be worth a thought after agreeing on the components being used on the card to get some design input. for example the padding between card borders and its components like the buttons, logo and so forth have a different padding in the drupal design system. but a few of the potential elements aren't available in the design system layouts. the cards there are in the context of cards used on the appearance page for example.
and a potential slight different card proposal in grid view to yours:
moving the security icon to the upper right for LTR and add the install state there as well. and use the active installs without the icon in the bottom left in plain text xxx active installs. but instead of using an icon to communicate the install state, the state might also be communicated via the install button instead somehow. #3312289: Svelte UI for install controllers replaces the button with a drop button. the current view commands default action was the motivation for #3315859: Communicate the status/state of a project in the button accesibly cuz it is currently hard to asses in a glimpse of an eye the state a module currently is in. but if it could be solved with the button the icon would be redundant and the icon could be spared and just the security icon could be placed in the upper right corner (for LTR).
tricky overall. but as i said the best would be to come to a conclusion which components should be available in a card. and then there should be also work on the cards in the list view. they are still high in vertical extent compared to the grid view and could be way more compact so you get more cards in one viewport height.
Comment #20
tim.plunkettComment #21
chrisfromredfinComment #22
leslieg commentedTagged as DrupalCon Lille 23 and Novice
We, the mentoring team, are triaging issues for first time contributors at DrupalCon Lille and I think this is a good issue for the contribution day.
We are reserving this issue so please don't work on this issue if you are not at DrupalCon Lille. You can continue the work when the event is over.
Comment #23
leslieg commentedChanged tag to
Comment #24
chrisfromredfinDiscussed with users at DrupalCon Portland.
Going to keep the scope of this issue small, which is, let's just left-align (or right-align for RTL) the short description text.
We can open follow-ons if we decide we need to alter the title, icon, or category alignment. Proposed solution currently reflects this.
As this issue is old, I would recommend that if you want to work on it, open a new MR rather than rebasing, since I *think* the fix is probably something close to removing a `text-align: center` somewhere in pb.css :)
Comment #28
mherman-pro commentedI worked on this as part of Portland2024
Comment #30
chrisfromredfinTested in Drupalpod. While I still can't always reconcile whether other things should left-align or not, I'd rather do that in a follow-on because this is an incremental improvement.