[MGNLFE-101] Fallback component to be used when component ID is not recognized Created: 14/Jul/21 Updated: 25/Apr/23 Resolved: 27/Oct/22 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.1 |
| Type: | Story | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Phong Le Quoc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 16d 0.75h | Time Spent: | 16d 0.75h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Release notes required: |
Yes
|
|||||||||||||||||||||||||
| Documentation update required: |
Yes
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Epic Link: | SaaS TPR - SPA | |||||||||||||||||||||||||
| Sprint: | DevX 21, DevX 22 | |||||||||||||||||||||||||
| Story Points: | 5 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Description |
|
As a developer I always want existing content to be rendered in a page, even if the frontend component has not been built yet. As an author I would like to start entering content and seeing content, even if the developers have not yet provisioned the frontend component. Notes: Supply a simple default fallback component in each of the frontend helper libraries that renders all of the root props it recieves (but not the metadata). This would be helpful during development - that the page just renders something even if I have not created a frontend component yet. It would also be useful when I make a mistake - such as not supplying the proper mapping configuration, or forgetting it, or making a TYPO - then at least I see that the content is indeed there. Rendering should be simple, for example.
Template not found: my-light-module:/templates/components/booook name: Gone with the wind. pages: 556 description: Some kind of description about the thing I don't know what exactly. ISBN: 4848493938383 category: [category uuid]
In addition to the default fallback compoent, allow a developer to optionally provide their own fallback component. Which one to use could be included in the 'config' object which is passed to EditablePage . const config = { componentMappings: { 'nextjs-ssr-minimal-lm:pages/basic': Basic, 'spa-lm:components/headline': Headline, 'spa-lm:components/image': Image, }, fallbackComponent: MyFallbackComp, };
AC:
|
| Comments |
| Comment by Christopher Zimmermann [ 09/Dec/21 ] |
|
Requested by partner dotfusion: "Fallback template and fallback component with the <EditablePage’s config prop - high priority" |