Read more Links field not rendered in Olivero

Created on 24 June 2020, about 4 years ago
Updated 27 August 2024, 12 days ago

Problem/Motivation

The "Read more" link for node teasers, as seen in previous default themes such as Bartik and Garland, is not rendered in Olivero. The "Read more" link was omitted in the design, and the node teaser was rendered without the Links field in the node--teaser.html.twig template.

In addition to the "Read more" link, the Links field also renders the "Add new comment" link provided by the Comment module, and the number of content views provided by the Statistics module. The Links field display is configurable by content type. However, without the Links field rendered in the node teaser template, the Olivero theme is forcing the links to not be displayed, regardless of the field display configuration.

Steps to reproduce

  • Verify the teaser display mode of the page content type has the Links field enabled to be displayed.
  • Create a few test pages.
  • Enable the archive view.
  • Visit the /archive page, and verify no "Read more" links are visible in the node teasers.

Proposed resolution

Render the node teaser with the Links field in the node--teaser.html.twig template, allowing the site administrator to decide if the Links field will be displayed by using configuration.

Remaining tasks

none

User interface changes

The Links field will be displayed in the node teaser when configured to do so.

Introduced terminology

none

API changes

none

Data model changes

none

Release notes snippet

none

Original report by [karing]

In Olivero -> Read more (Links field) are not rendered when displaying Content Teaser (which will by default trim Body to 600 characters). The Read more Link will prompt users to read the rest.

In D7 -> Bartik -> Read more Links are rendered for the exact same content (migrated content).

Checked: latest https://bit.ly/olivero-tugboat :postings on front page also don't have Read more Links.

Restoring to use Core/default node--teaser.html.twig restores the Read more links.
Could use some styling! But this puts it on the map.

Difference is Olivero specifically has a node--teaser.html.twig override with instructions not to render the Links
{{ content|without('field_image', 'links') }}

whereas the Core/default node--teaser.html.twig only has:
{{ content|without('field_image') }}

Would it not be better for usability to restore the Read more Links?

๐Ÿ› Bug report
Status

Needs review

Version

11.0 ๐Ÿ”ฅ

Component
Oliveroย  โ†’

Last updated about 7 hours ago

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada KarinG ๐Ÿ‡จ๐Ÿ‡ฆ

Live updates comments and jobs are added and updated live.
  • Needs usability review

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Chris Matthews

    I'd still be curious to know why these links were omitted by design. Seems like a Drupal core theme should support basic Drupal site building functionality of a teaser with these links.

  • Status changed to Active about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Chris Matthews
  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    I agree @Chris Matthews, the "Read more" links are an integral part of Drupal site building.

    ๐Ÿ› The site slogan doesn't show with Olivero Needs work is another case, where an integral part of Drupal was left out. See also ๐Ÿ“Œ Olivero: Center align content (instead of left align) Needs work .

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    Moving this issue from the Olivero contrib project to Drupal core > Olivero theme component.

  • Status changed to Needs review about 1 year ago
  • last update about 1 year ago
    29,559 pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    I have added before and after patch screenshot (without read more and with read more button)

  • Hi @Gauravvvv,
    Verified your patch #12 on Drupal 9 and 10 it's working fine. The read more link is rendered now.
    Added screenshots for reference, moving to RTBC.

  • Status changed to RTBC about 1 year ago
  • last update about 1 year ago
    29,543 pass, 2 fail
  • Status changed to Needs work about 1 year ago
  • last update about 1 year ago
    29,566 pass
  • last update about 1 year ago
    29,959 pass
  • First commit to issue fork.
  • Merge request !8840#3154517: Render read more links. โ†’ (Open) created by nmangold
  • Status changed to Needs review about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nmangold United States

    Reroll the patch file.

  • Status changed to Needs work about 2 months ago
  • The Needs Review Queue Bot โ†’ tested this issue.

    While you are making the above changes, we recommend that you convert this patch to a merge request โ†’ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

  • Pipeline finished with Success
    about 2 months ago
    Total: 687s
    #228784
  • Status changed to Needs review about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nmangold United States

    Already created the MR.

  • Status changed to Needs work about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Thanks for working on this

    Tagging for issue summary as that appears to be incomplete, recommend using the standard issue template

    Tagging for tests as feel a simple assertion could be added to an existing test.

  • Status changed to RTBC 15 days ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    This simply works and cannot be intentional design - at best it was just missed in design screenshots.

    Lets get this usability issue resolved, please.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada xmacinfo Canada

    I agree, designs often miss to mockup a feature like Language Switcher et Read more links.

    But the actual coding must go beyond mockups.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    Yes, aside it is not only the Read more link that is missing here. The number of content "views" is also missing without this change. This is something I show to logged in users on my sites and that is really useful if the statistics module is enabled. I'm sure there are more use cases for the "links", but cannot remember it.

    It's really a nightmare that this case is lingering 4 years around. It look me hours to understand why the read more is not shown and comments on other pages point to misconfiguration of teaser display mode and other stuff. Really annoying. Commit this minor line change now, please. Over 4 years is 4 years too much!

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    The issue was originally created in the Olivero issue queue but moved, so it's not clear now that the issue is about a specific theme, so adding Olivero in title.

  • Status changed to Needs work 14 days ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    I've removed these links from sites before because clicking on the title (or a clickable card) is a well understood pattern for getting to content and the links generally add noise for me.

    However if a design decision was taken to do this in Olivero I don't think the figma is sufficient to explain that, there should be a 'why' somewhere to go with the pictures. I also would have no idea where to find this figma, or any way to verify that it's the final designs. So if this goes won't fix again I think it needs d.o. documentation before that happens.

    Tagging for both product and subsystem maintainer review.

    Also this is another example of node display elements being controllable only via twig templates and not in manage display, layout builder, or content type settings. If these were implemented as an extra field and exposed manage fields/layout builder there'd be no special cases template variable at all.

    Still needs an issue summary update which should summarise the disagreement before it goes back to committers too.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada xmacinfo Canada

    I've removed these links from sites before because clicking on the title (or a clickable card) is a well understood pattern for getting to content and the links generally add noise for me.

    Each website has its requirements and differences. Although โ€œRead moreโ€ is phased out on most [Drupal] sites, here the links can be (and are) used for additional functions, like statistics, for those who have that requirement.

    figma

    Are we relying too much on Figma? Is Figma too limited?

    Mockups

    Mockups are mockups, they should never represent the source of truth, but rather they represent what was planned. During development, itโ€™s when we implement features correctly, and sometimes update the mockups accordingly.

    Links, Language switcher and Site slogan are all examples of components that need more love and probably implementation updates back to mockups.

    Letโ€™s make sure we implement features correctly.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nmangold United States

    Rewrote the issue summary using the issue summary template.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    @catch: It need to possible to show the links. If you decide on your own to remove the read more (and other links), go into content rype > manage display > Teaser and Hide the field Links, please.

    This can also be done with an install profile if needed, but do not disallow people to enable the links and waste their time trying to enable it and they do not show up - bringing them into support issues and debugging hours, please. There is functionality like language switcher, statistics and read more and maybe more features behind. This is not a design thing.

    If Figma (whatever this is) requires this, you can configure it on your individual website. Nobody will stop you from configuring it this way to comply with your Figma rules. But others who need the links can enable them the common way. Please make this flexible as Drupal normally is.

  • Pipeline finished with Failed
    13 days ago
    Total: 666s
    #264442
  • Pipeline finished with Failed
    13 days ago
    Total: 148s
    #264454
  • Status changed to Needs review 13 days ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nmangold United States

    Added a functional test that runs the same tests from the Node module that checks for the Read more link, but uses the Olivero theme instead of Stark.

  • Pipeline finished with Failed
    13 days ago
    Total: 540s
    #264459
  • Pipeline finished with Running
    13 days ago
    #264481
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sagarmohite0031

    Hello,
    I have reproduced the issue on Drupal 11.
    The MR is applied successfully.

    Testing steps-
    Verify the teaser display mode of the page content type has the Links field enabled to be displayed.
    Create a few test pages.
    Enable the archive view.
    Visit the /archive page, and verify no "Read more" links are visible in the node teasers.

    Test Result:
    The read more link is rendered now.
    Added screenshots for reference.

Production build 0.71.5 2024