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

Migrate Page Header options to Page Header block pattern

XMLWordPrintable

    • 3
    • Campaigns, Pages
    • Sprint #227, Sprint #228, Sprint #229, Sprint #230
    • oberon

      Summary

      As we implemented the Page Header block pattern as part of the new IA, we can phase out Page Header sidebar option, to minimize similar functionality options and make UI more consistent for pages.

      Requirements

      • Remove all the Page Header sidebar options except from the Hide page title. Those options are probably visible only on Pages and Campaigns.
      • Create a migration with the following conditions and parameters:
        • If both an image and a title are provided then:
          • Add a Page Header block pattern on the very top.
          • Use similar fields to populate the text elements of the block pattern (title, description, button text, button link, button target).
          • Use the background image from the sidebar options on the block pattern image.
          • Use the "image on the right" style.
        • If either the image or the title are missing then:
          • Add a Group block on the top of the page and populate it with the respective inner blocks depending on the content of the sidebar fields: Heading (H1) = Header Title, Paragraph = Header Description, Button = Button sidebar content
          • In that scenario the image is not being used at all in the migration.
      • Remove any obsolete code from the sidebar components.
      • Simplify the theme template code accordingly.

      Comments

      • If the only field that is filled is the image, we can ignore it.
      • Header subtitle fields will not be used at all.
      • Currently we may have some checks in place to hide the page title when the header title is defined. If that's the case we should also enable the Hide page title option during the migration.

            oagbernd Osong Agberndifor
            nroussos Nikos Roussos
            Maud Leray Maud Leray
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: