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
- blocks
-
CMS-12029 Replace Undefined and Placeholder components with a configuration
- Closed
- is blocked by
-
CMS-12025 Use SPA SDK in React code
- Closed
-
HSTTWO-4643 Update Page Model API to include container xtype
- Closed
-
CMS-12039 Decide what should be the names of React SDK components (API)
- Closed
1.
|
Implement Component representing COMPONENT type; | Closed | Unassigned | |
2.
|
Implement Container representing COMPONENT_CONTAINER type | Closed | Unassigned | |
3.
|
Implement ContainerItem representing COMPONENT_CONTAINER_ITEM type | Closed | Unassigned | |
4.
|
Implement the components mapping | Closed | Unassigned | |
5.
|
Implement component rerender on `container-item.update` event | Closed | Unassigned |