Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-6414

Make Planet4 button customization work in WP 5.8

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Must have Must have
    • None
    • None

      Our current customization of the button block causes a crash in WordPress 5.8 and needs to be adapted to the new version.

      In previous upgrades we also had to adapt this override. In this case luckily WordPress has shipped a feature to achieve this customization without overriding the block component, using theme.json. So we don't need to investigate how the new button component works and modify that code, and can remove our override.

      On experimentation day I prevented the crash by removing the customization https://github.com/greenpeace/planet4-plugin-gutenberg-blocks/pull/675/files#diff-3f3fa523180db75822b600411993858ec7685ce54902dc2353c42f6f98d5ef61L60 

      Usage of theme.json: https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#settings-examples  

      The last time we updated this file to match the core file, we added the core file verbatim in a first commit, then did a commit to do our customizations. So these are the things we need to reproduce with theme.json: https://github.com/greenpeace/planet4-plugin-gutenberg-blocks/commit/081fdb229937c3bb9000fc64bc3464e6f93efde8#diff-f31109cdfb8ab925870b669bb40efb65a5b78877303e4e0f81c00a347d53990aR44-R54 

            Unassigned Unassigned
            pvincent Pieter Vincent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: