Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploader label HTML handling #11738

Merged
merged 10 commits into from
Jul 2, 2024
Merged

Uploader label HTML handling #11738

merged 10 commits into from
Jul 2, 2024

Conversation

amoore108
Copy link
Contributor

@amoore108 amoore108 commented Jun 27, 2024

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 amoore108 self-assigned this Jun 27, 2024
@amoore108 amoore108 marked this pull request as ready for review June 27, 2024 13:34
@amoore108 amoore108 changed the title Uploader label html handling Uploader label HTML handling Jun 27, 2024
@amoore108 amoore108 merged commit 5d661cc into latest Jul 2, 2024
11 checks passed
@amoore108 amoore108 deleted the uploader-label-html-handling branch July 2, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants