-
Task
-
Resolution: Fixed
-
Should have
-
None
-
None
-
2
-
Gutenberg
-
Sprint #124, Sprint #125, Sprint #126, Sprint #139
As WYSIWYG editing happens in React components, we need to render the blocks in React as they currently look. Converting from Twig to JSX to render the WYSIWYG blocks in the editor is not a big deal, but we need to decide on how to render the blocks on the site.
We need to evaluate the options:
The obvious one is just porting the Twig templates to their React counterparts. This is the "nearest" iteration so to speak, GPNL is already doing it, see: https://github.com/greenpeace/planet4-gpnl-plugin-gutenberg-blocks/blob/master/templates/blocks/quote.twig
I think it's safe to go this way for now, mentioning other options just in case:
- Shipping React to the site?
- What about something smaller like Preact, HTM...?
- How about just saving the static content through the save() method where possible?
- Running a React server side renderer in the back (e.g. a Node server)?
- Other options...
Document the approach in an ADR.
Tasks
- Organise a meeting to discuss approach - invite Oscar and Drik from GPNL, Cristoph from GPCH
- Document approach in epic ticket (
PLANET-4762)
- blocks
-
PLANET-4799 Convert Counter Block to WYSIWYG
- CLOSED
-
PLANET-4800 Convert Gallery Block to WYSIWYG
- CLOSED
-
PLANET-4801 Convert Articles block to WYSIWYG
- CLOSED
-
PLANET-4802 Convert the Columns Block to WYSIWYG
- CLOSED
-
PLANET-4803 Convert Cookies Block to WYSIWYG
- CLOSED
-
PLANET-4807 Convert Happypoint block to WYSIWYG
- CLOSED
-
PLANET-4808 Convert Split Two Columns to WYSIWYG
- CLOSED
-
PLANET-4809 Convert Carousel Header block to WYSIWYG (Beta)
- CLOSED
-
PLANET-4810 Convert Media Block to WYSIWYG
- CLOSED
-
PLANET-4811 Convert Submenu block to WYSIWYG
- CLOSED
-
PLANET-4812 Convert Take Action Boxout to WYSIWYG
- CLOSED
-
PLANET-4813 Convert Timeline Block to WYSIWYG
- CLOSED
-
PLANET-4814 Convert EN Form block to WYSIWYG (Beta)
- CLOSED