[Meta] Deprecate text_with_summary

Created on 11 March 2024, 3 months ago
Updated 22 May 2024, 24 days ago

Problem/Motivation

Conversation started in 🌱 [meta] Deprecate text_with_summary Active

How to deprecate it:

1. Switch standard + umami to using 'long text'
2. Change the body field to persist_with_no_fields: false so it can be deleted on sites that don't use it.
2. Move the field type, formatter and widget to a module
3. Deprecate the module and move it to contrib

This appears to already have the support of framework and product managers but need to plan out how to best go about it.

Currently the body field is a special field with a storage to use text_with_summary. Do we update that?

Steps to reproduce

NA

Proposed resolution

Remaining tasks

  1. Update Umami - πŸ› Don't use text_with_summary in Umami Needs review
  2. Update Standard - πŸ“Œ Update standard profile to use field_body Active
  3. Stop automatic creation - πŸ“Œ Stop automatic storage creation of body field Active
  4. Move text_with_summary to new module - TBD
  5. Deprecate that module - TBD

User interface changes

NA

API changes

No longer offer text_with_summary option

Data model changes

Release notes snippet

TBD

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
TextΒ  β†’

Last updated 9 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

Live updates comments and jobs are added and updated live.
  • 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

Comments & Activities

  • Issue created by @smustgrave
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • πŸ‡¬πŸ‡§United Kingdom catch

    The current logic was added in #553306: Make nodes have no body field by default. Remove deprecated APIs for body field β†’ as part of the field API conversion in Drupal 7. I personally think we could retire the auto-creation of the body field, and add a message to encourage people to create some fields after adding a new node type instead, but that's a fairly significant UX change so tagging for product manager review.

    If we want to keep node_add_body_field() then to deprecate text_with_summary we'd need to change the field type it creates for new sites.

    In both cases, we need to allow the field storage for 'body' to be deleted, so that sites with no instances are able to remove it and not rely on the eventual text_with_summary contrib module.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    I imagine if we keep the body field and change it to create a text long storage we will have to update umami and standard at the same time.

  • πŸ‡¬πŸ‡§United Kingdom catch

    @smustgrave yes although there might not be much to update in that case?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    It definitely would be far less. Think for umami it would of been a fraction of the file changes needed

  • πŸ‡¬πŸ‡§United Kingdom catch

    Discussed this with @lauriii and @gaborhojtsy in slack. Both are in favour of removing the automatic creation of the body field for content types in general. That will need its own issue too (hopefully not too massive at least outside tests), but will also mean that the Umami changes made already are likely what will be needed, since the 'body' field won't be repurposed in general but just go away. Leaving the tag for now in case they want to add anything.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Slightly sad to see the auto creation go away but fully get it. I usually end up deleting it for new content types anyway. I do wonder about the contrib impact though.

    hopefully not too massive at least outside tests

    I'm scared to look

    Will let @laurii or @gaborhotjsy chime in, once they do I suppose we can un-postpone the Umami ticket.

    Open a ticket for updating Standard to use field_body instead

    Open a ticket to drop the auto storage creation of body (sure this will be a large ticket).

    Open a ticket for creation of a new module (text_with_summary) and move the formatters to that.

    Sound like a good order?

    Anything with migration that needs it's own ticket?

  • πŸ‡¬πŸ‡§United Kingdom catch

    That all sounds good, I think we'll find out about migration when we get there!

  • πŸ‡¦πŸ‡ΊAustralia sime Canberra
  • πŸ‡¦πŸ‡ΊAustralia sime Canberra

    In slack we discussed how the automatic body functoinality needs to be removed in starshot, that's πŸ“Œ Stop automatic storage creation of body field Active . I think this boat is ready to push off gently.

    Remaining tasks

    1. Update Umami - πŸ› Don't use text_with_summary in Umami Needs review
    2. Update Standard - πŸ“Œ Update standard profile to use field_body Active
    3. Stop automatic creation - πŸ“Œ Stop automatic storage creation of body field Active
    4. Move text_with_summary to new module - TBD
    5. Deprecate that module - TBD
  • πŸ‡ΊπŸ‡ΈUnited States cainaru Potsdam, NY, USA
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    #2 for Umami is up for review, that one was easy

    But while working on the Standard profile removal ticket discovered a TON of migration failures are now happening. And after speaking with @larowlan seems that we will need to

    1. Create the deprecated module that will house the special "body" field and text_with_summary plugin.
    2. Update migrations to use that deprecated module instead
    3. Then we should be good to remove the auto creation and from Standard profile.

    Thoughts?

Production build 0.69.0 2024