Hi Emma,
Hope you're doing well. I'd been working on the second starter task and finally have something to show.
You can view the
react app and the code
here. As of now the app does the following -
1. Takes a starting
data json and renders the block, questions and options in the hierarchical (treelike) view.
2. The dropzone can be used to add more components to the survey. Simply drag the block, question or the option component over to the dropzone.
3. At this stage, all additions are linear, i.e. when you add a question it gets added to the last block. Similarly, when you add an option, it gets added to the last question. This is just for simplicity in the demo. Later on, drop zones will be configured in each component (will elaborate on this in the proposal).
4. Lastly, as per the requirement whenever a new block is dropped, a new ID is assigned. When Question and Option are dropped you get (albeit ugly) prompt asking for question text or option text and accordingly the component gets added.
I will be using this as the building block for the rest of the project and it would be great if you can share some feedback on it. If you have any questions regarding my approach etc, do let me know so that I can address those clearly in the proposal.
Hope this was useful.
Cheers,