Clean up gutenberg.settings config

Created on 17 January 2024, about 1 year ago

Problem/Motivation

Everytime the relevant entity type for a Gutenberg enabled entity is save, it automatically adds in new changes in the config for every new block instance it finds, which can be annoying if you have loads of derivative fields e.g. block content blocks.

Steps to reproduce

Enable Gutenberg on your Node entity type, save then export the configuration.

Then introduce a new block type instance, e.g. an exposed filter block or a new content block.

Then once you resave the Node entity type, it'll automatically add those new block instances into the config like this in your config diff:

+  'block_content:f5c762e6-962a-42cf-841b-611e5ee40204': 0
+  'block_content:ced96c38-d1a0-4d34-ba1f-946de1291938': 0
+  'block_content:b5bfb9e5-8a8f-4db3-a343-7e3d8522feb6': 0
+  'block_content:59437793-d207-4182-bf96-52fa8c04755a': 0

Proposed resolution

Remove irrelevant config on save, as well as a post update hook to clean up the existing config.

We should ideally store these inside the individual Node entity's third_party_settings, that way it can be modelled consistently in the config schema, just like it was previously done in 📌 Make Gutenberg entity-type-agnostic Needs work , but that's work to be in a future major release since it's a big change to the current data structure.

Remaining tasks

Provide update hook and MR.

User interface changes

N/A

API changes

N/A

Data model changes

Inactive blocks will no longer be exported in the config.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Pipeline finished with Failed
    about 1 year ago
    #61214
  • Issue created by @codebymikey
  • Status changed to Needs review about 1 year ago
  • Pushed an update normalizing the config, providing an update hook to apply it, as well as removing the redundant gutenberg.mediaedit config.

    The current and new configuration schema can be reviewed using the https://www.drupal.org/project/config_inspector →

  • Pipeline finished with Failed
    about 1 year ago
    #78644
  • First commit to issue fork.
  • 🇵🇹Portugal marcofernandes

    Hmm.. something went wrong when merging dev. It updated from 2.x. I'll try to revert and do things properly.

  • Pipeline finished with Failed
    about 1 year ago
    #80658
  • Pipeline finished with Success
    about 1 year ago
    #80674
  • Pipeline finished with Skipped
    12 months ago
    #80880
  • Pipeline finished with Failed
    12 months ago
    #82691
  • Status changed to Needs work 12 months ago
  • 🇵🇹Portugal marcofernandes

    This change affects the way the editor loads the configuration to register the blocks. Ex: /js/overrides/register-core-blocks.jsx

  • 🇵🇹Portugal marcofernandes

    marcofernandes → changed the visibility of the branch 3415218-clean-up-gutenberg.settings to hidden.

  • 🇵🇹Portugal marcofernandes

    marcofernandes → changed the visibility of the branch 3415218-clean-up-gutenberg.settings to active.

  • 🇵🇹Portugal marcofernandes

    marcofernandes → changed the visibility of the branch revert-93c85c9e to hidden.

  • 🇵🇹Portugal marcofernandes

    marcofernandes → changed the visibility of the branch 3.0.x to hidden.

  • Pipeline finished with Failed
    12 months ago
    Total: 230s
    #84742
  • Pipeline finished with Success
    12 months ago
    Total: 190s
    #84817
  • Pipeline finished with Success
    12 months ago
    Total: 131s
    #85459
  • Pipeline finished with Failed
    12 months ago
    Total: 278s
    #86654
  • Status changed to Fixed 12 months ago
  • 🇵🇹Portugal marcofernandes

    Because of these changes on the config structure, UpdateAddMediaTest::testMediaUpdate() had to be disabled for now. Follow-up on https://www.drupal.org/project/gutenberg/issues/3418917 📌 Check UpdateAddMediaTest::testMediaUpdate() Active

  • Pipeline finished with Success
    12 months ago
    Total: 870s
    #87413
  • Pipeline finished with Success
    12 months ago
    Total: 2194s
    #87429
  • Pipeline finished with Success
    12 months ago
    Total: 961s
    #88016
  • Pipeline finished with Failed
    12 months ago
    #91144
  • Pipeline finished with Success
    12 months ago
    Total: 488s
    #91439
  • Pipeline finished with Success
    12 months ago
    Total: 196s
    #91893
  • Pipeline finished with Success
    11 months ago
    Total: 398s
    #99263
  • Pipeline finished with Success
    11 months ago
    Total: 332s
    #100489
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    11 months ago
    Total: 463s
    #112897
  • Pipeline finished with Canceled
    10 months ago
    Total: 128s
    #123459
  • Pipeline finished with Failed
    10 months ago
    Total: 556s
    #123472
  • Pipeline finished with Success
    10 months ago
    Total: 94s
    #123518
  • Pipeline finished with Failed
    10 months ago
    Total: 143s
    #125538
  • Pipeline finished with Failed
    10 months ago
    Total: 136s
    #126060
  • Pipeline finished with Failed
    10 months ago
    Total: 240s
    #126699
  • Pipeline finished with Success
    10 months ago
    Total: 206s
    #129048
  • Pipeline finished with Success
    10 months ago
    Total: 302s
    #129676
  • Pipeline finished with Failed
    10 months ago
    Total: 236s
    #130890
  • Pipeline finished with Success
    9 months ago
    #150192
  • Pipeline finished with Manual
    9 months ago
    #150206
  • Pipeline finished with Success
    9 months ago
    Total: 287s
    #154606
  • Pipeline finished with Success
    7 months ago
    Total: 244s
    #199100
  • Pipeline finished with Skipped
    7 months ago
    #204103
  • Pipeline finished with Failed
    7 months ago
    Total: 155s
    #204774
  • Pipeline finished with Canceled
    7 months ago
    Total: 113s
    #204788
  • Pipeline finished with Success
    7 months ago
    Total: 172s
    #204789
  • Pipeline finished with Failed
    7 months ago
    Total: 176s
    #204845
  • Pipeline finished with Success
    7 months ago
    Total: 287s
    #216500
  • Pipeline finished with Canceled
    7 months ago
    Total: 30s
    #217555
  • Pipeline finished with Success
    7 months ago
    Total: 208s
    #217604
  • Pipeline finished with Success
    7 months ago
    Total: 769s
    #218496
  • Pipeline finished with Success
    7 months ago
    Total: 334s
    #221321
  • Pipeline finished with Success
    7 months ago
    #221331
  • Pipeline finished with Failed
    6 months ago
    Total: 275s
    #224592
  • Pipeline finished with Failed
    6 months ago
    Total: 288s
    #227077
  • Pipeline finished with Failed
    6 months ago
    Total: 202s
    #242020
  • Pipeline finished with Failed
    5 months ago
    #250634
  • Pipeline finished with Failed
    5 months ago
    #250647
  • Pipeline finished with Failed
    5 months ago
    #250706
  • Pipeline finished with Success
    5 months ago
    Total: 197s
    #250708
  • Pipeline finished with Success
    5 months ago
    Total: 139s
    #261272
  • Pipeline finished with Success
    5 months ago
    #265703
  • Pipeline finished with Failed
    5 months ago
    Total: 10604s
    #273138
  • Pipeline finished with Success
    5 months ago
    Total: 365s
    #275467
  • Pipeline finished with Success
    5 months ago
    Total: 321s
    #276127
  • Pipeline finished with Canceled
    4 months ago
    Total: 120s
    #280609
  • Pipeline finished with Success
    4 months ago
    Total: 139s
    #281758
  • Pipeline finished with Success
    4 months ago
    Total: 178s
    #281763
  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #281764
  • Pipeline finished with Success
    4 months ago
    Total: 153s
    #282688
  • Pipeline finished with Canceled
    4 months ago
    Total: 206s
    #284574
  • Pipeline finished with Success
    4 months ago
    Total: 184s
    #284577
  • Pipeline finished with Success
    4 months ago
    Total: 164s
    #286833
  • Pipeline finished with Success
    4 months ago
    #287645
  • Pipeline finished with Success
    4 months ago
    Total: 175s
    #287675
  • Pipeline finished with Skipped
    4 months ago
    #287865
  • Pipeline finished with Success
    4 months ago
    Total: 197s
    #290402
  • Pipeline finished with Skipped
    4 months ago
    #290976
  • Pipeline finished with Success
    4 months ago
    Total: 235s
    #290974
  • Pipeline finished with Success
    4 months ago
    Total: 244s
    #291362
  • Pipeline finished with Success
    4 months ago
    Total: 259s
    #291741
  • Pipeline finished with Success
    4 months ago
    Total: 286s
    #292154
  • Pipeline finished with Success
    4 months ago
    Total: 184s
    #293193
  • Pipeline finished with Success
    4 months ago
    Total: 312s
    #293687
  • Pipeline finished with Success
    4 months ago
    Total: 174s
    #294181
  • Pipeline finished with Success
    4 months ago
    Total: 154s
    #297426
  • Pipeline finished with Success
    4 months ago
    Total: 208s
    #300109
  • Pipeline finished with Success
    4 months ago
    Total: 157s
    #300765
  • Pipeline finished with Failed
    3 months ago
    Total: 388s
    #309278
  • Pipeline finished with Failed
    3 months ago
    Total: 405s
    #309279
  • Pipeline finished with Failed
    3 months ago
    Total: 421s
    #309277
  • Reopened to address some config normalization issues related to the ✨ Limit available image styles for image related blocks Fixed feature which was added, but doesn't currently have a valid schema.

  • codebymikey → changed the visibility of the branch 8.x-2.x to hidden.

  • codebymikey → changed the visibility of the branch 3415218-clean-up-gutenberg.settings-2.x to hidden.

  • codebymikey → changed the visibility of the branch 3415218-clean-up-gutenberg.settings-2.8 to hidden.

  • codebymikey → changed the visibility of the branch 3415218-clean-up-gutenberg.settings to hidden.

  • Pipeline finished with Failed
    3 months ago
    Total: 202s
    #310005
  • In the spirit of making the image size support more complete, I've added a commit to the merge request which incorporates changes from ✨ Allow API to restrict which image styles are available to users Active and 📌 Followup: SVG's should not use image styles Active

  • Pipeline finished with Failed
    3 months ago
    Total: 326s
    #320259
  • Pipeline finished with Success
    3 months ago
    Total: 1242s
    #320937
  • Pipeline finished with Success
    3 months ago
    Total: 1280s
    #320974
  • Pipeline finished with Failed
    3 months ago
    Total: 233s
    #332146
  • Pipeline finished with Success
    3 months ago
    Total: 156s
    #332894
  • Pipeline finished with Success
    3 months ago
    Total: 145s
    #332949
  • Pipeline finished with Failed
    2 months ago
    Total: 45s
    #340802
  • Pipeline finished with Success
    2 months ago
    Total: 283s
    #346635
  • Pipeline finished with Success
    2 months ago
    Total: 141s
    #347250
  • Pipeline finished with Success
    about 2 months ago
    Total: 173s
    #349523
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 74s
    #353125
  • Pipeline finished with Failed
    about 2 months ago
    Total: 450s
    #359331
  • Pipeline finished with Success
    about 2 months ago
    #359907
  • Pipeline finished with Skipped
    about 1 month ago
    #363982
  • Pipeline finished with Failed
    about 1 month ago
    Total: 385s
    #368013
  • Pipeline finished with Failed
    about 1 month ago
    Total: 203s
    #368071
  • Pipeline finished with Failed
    about 1 month ago
    Total: 163s
    #368084
  • Pipeline finished with Success
    about 1 month ago
    Total: 275s
    #368095
  • Pipeline finished with Success
    about 1 month ago
    Total: 185s
    #368178
  • Pipeline finished with Success
    about 1 month ago
    Total: 282s
    #375502
  • Pipeline finished with Failed
    20 days ago
    Total: 312s
    #383616
  • Pipeline finished with Success
    9 days ago
    Total: 185s
    #394728
Production build 0.71.5 2024