Development
Make a banner nestable

How to make an existing banner nestable

This document will guide you through the process on how to make an existing banner nestable. A nestable banner can be added inside the GridWrapper banner.

Type Package

  1. Update the merge type
  • Begin by updating the merging banner type called AnyNestableBanner, which can be found inside the shophub/components folder.
💡
After making these changes, rebuild your types to ensure they are available throughout the project.
To rebuild types execute this command in your project root: yarn types:init

Backend Package

  1. Update the getNestableBanner function
  • Update the function that fetches the nestable banners for a grid wrapper within it's switch statement. The file can be found in cms/referenced-banner/referenced-banner.service.ts.

Frontend Package

  1. Update the Banner Switch Statement
  • Update the switch statment found inside the gridRowBannerVariant statement by adding the desired new banner component. The file can be found in shophub/grid-wrapper/GridRow.tsx.