Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12028

Implement BrComponent

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Available for testing
    • None
    • None
    • None
    • None
    • 3
    • Tiger
    • Tiger Sprint 217, Tiger Sprint 218

    Description

      In the SPA code, this component should look something like:

      import { BrPage, TYPE_CONTANER_BOX } from '@bloomreach/react-spa-sdk';
      
      function App() {
        return (
          <BrPage configuration={configuration} mapping={{ News: NewsComponent, [TYPE_CONTANER_BOX]: MainComponent }}>
            <header>
              <BrComponent path="header" />
              <nav>
                <BrComponent path="menu" />
              </nav>
            </header>
            <section>
              <nav class="sidenav">
                <BrComponent path="sidebar" />
              </nav>
              <div class="container">
                <BrComponent>
              </div>
            </section>
            <footer>
              <BrComponent path="footer">
            </footer>
          </BrPage>
        );
      }
      

      Requirements:

      • consume the page model and mappings using React's Context API;
      • implement Component representing COMPONENT type;
      • implement Container representing COMPONENT_CONTAINER type;
      • implement ContainerItem representing COMPONENT_CONTAINER_ITEM type;
      • implement the components mapping;
      • implement component rerender on `container-item.update` event;
      • implement a fallback to UndefinedComponent for ContainerItem which is not defined in mappings ;
      • implement fallbacks for Container based on the xtype: ContainerBox, ContainerInline, etc;
      • implement mapping for the menu component (based on `getName()` most probably);
      • write unit tests.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mdokolin Mikhail Dokolin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: