Don't use text_with_summary in Umami

Created on 2 March 2024, 4 months ago
Updated 18 June 2024, 7 days ago

Problem/Motivation

Found in #2726497-32: Deprecate text_with_summary .

Umami uses the 'text_with_summary' field, however none of the default content has a summary, and none of the listing views display the body field in summary/trimmed mode - they use cards with images and titles.

However if you create new content on an Umami site, you'll get the confusing UX of the teaser splitter allowing you to enter a summary that never shows up anywhere.

Steps to reproduce

Proposed resolution

Add a 'field_body' field using regular long text, update any theming, display modes, and default content etc. necessary to use that instead.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
Umami 

Last updated 7 days ago

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @catch
  • 🇬🇧United Kingdom catch
  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 700s
    #109110
  • Pipeline finished with Failed
    4 months ago
    Total: 584s
    #109117
  • Pipeline finished with Failed
    4 months ago
    #109124
  • 🇺🇸United States smustgrave

    Not sure where the schema error is coming from.

  • Pipeline finished with Failed
    4 months ago
    Total: 475s
    #109129
  • Status changed to Needs review 4 months ago
  • 🇺🇸United States smustgrave

    Think I found the issue. Had to use a new field name vs just "body"

  • Pipeline finished with Failed
    4 months ago
    Total: 562s
    #109136
  • Pipeline finished with Failed
    4 months ago
    Total: 475s
    #109144
  • Pipeline finished with Failed
    4 months ago
    Total: 649s
    #109186
  • 🇺🇸United States smustgrave

    Actually had to change a lot. This the route we will have to go other places since the "body" field is hardset to be text_with_summary.

  • Pipeline finished with Failed
    4 months ago
    Total: 533s
    #109223
  • Pipeline finished with Failed
    4 months ago
    Total: 474s
    #109233
  • Pipeline finished with Failed
    4 months ago
    Total: 476s
    #109699
  • Pipeline finished with Success
    4 months ago
    Total: 470s
    #109716
  • 🇮🇪Ireland markconroy

    I think this looks like a great idea, but now I also have a worry about us having a field called body and a field called field_body if someone tries to add a new field to a content type and uses the "reuse existing field" approach. Also if you create a new content type it will automatically get the body field added.

    I guess people don't need to be creating new fields and content types, since this is a fully formed demo.

    I wonder could we disable the default body field from the UI fully?

  • 🇬🇧United Kingdom catch

    @markconroy there's a bit of a chicken and egg situation between this issue and other child issues of 🌱 [meta] Deprecate text_with_summary Active .

    If we eventually remove the hard-coding of the 'body' field and make it uninstallable, then Umami would just be able to ignore it entirely.

    If we want to keep the hard-coding of the 'body' field, then it might make sense to switch it to a standard text field for new installs, in which case this MR might not need to change anything.

  • Status changed to Postponed 4 months ago
  • 🇺🇸United States smustgrave

    Opened a META to track decisions 🌱 [Meta] Deprecate text_with_summary Active

    I'm postponing this till we decide what to do with the body field.

  • Pipeline finished with Success
    about 1 month ago
    Total: 568s
    #179748
  • Status changed to Needs review about 1 month ago
  • 🇺🇸United States smustgrave

    Rebased and this is ready for review again.

  • Status changed to RTBC 11 days ago
  • 🇮🇪Ireland markconroy

    Tested againsta 11.x.

    LGTM.

    ===
    Thanks to Code Enigma for sponsoring my time to work on this.

  • 🇬🇧United Kingdom catch

    Had another look through this. I think the confusion between body vs. field_body is something a lot of real sites already have, and going to be less confusing than having the text summary widget which then never gets used. If we change how the body field works, we could eventually rename this again back to 'body' if we want to, or just leave it as is without the dormant body field.

    Committed/pushed to 11.x, thanks!

  • Status changed to Fixed 7 days ago
    • catch committed 79d04f2a on 11.x
      Issue #3425105 by smustgrave, catch, markconroy: Don't use...
  • 🇬🇧United Kingdom catch
Production build 0.69.0 2024