simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

Uploader label HTML handling

Open amoore108 opened this issue 1 year ago • 0 comments

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 children so that we can use dangerouslySetInnerHtml in the label component
  • Adds conditional rendering to form screen elements
  • Updates snapshots

Testing

  1. Visit http://localhost:7081/russian/send/u168281705?renderer_env=live
  2. Confirm that the checkbox label has a correctly rendered inline link

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

amoore108 avatar Jun 27 '24 10:06 amoore108