simorgh
simorgh copied to clipboard
Uploader label HTML handling
Overall changes
- Small fix to correctly display inline html for labels. This can be seen in the Russian newsletter checkbox: https://www.bbc.com/russian/send/u168281705 whereby it links to the relevant policy the user is agreeing to, compared to our current version https://www.test.bbc.com/russian/send/u168281705?renderer_env=live where its rendered as a string
- Adds conditional rendering to some of the initial form elements in the event they aren't in the UGC response
- Fix submit button spacing so that it doesn't sit too close to the input elements when there is no privacy notice
Code changes
- Passes the label text as a prop rather than
childrenso that we can usedangerouslySetInnerHtmlin the label component - Adds conditional rendering to form screen elements
- Updates snapshots
Testing
- Visit http://localhost:7081/russian/send/u168281705?renderer_env=live
- Confirm that the checkbox label has a correctly rendered inline link
Helpful Links
Add Links to useful resources related to this PR if applicable.