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

feat: support editing YouTube and Google Maps embeds #885

Open
wants to merge 1 commit into
base: feat/youtube-maps-embeds
Choose a base branch
from

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Nov 16, 2024

Problem

We have the YouTube and Google Maps embed components, but no way to create/edit them on Studio.

Closes ISOM-1676.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible

Features:

  • Add the new YouTube and Google Maps embed components as supported components that can be added for article and content pages.
  • Introduced a new embed form control in JSONForms to allow users to paste in the embed code, which is then sanitised and parsed to extract the actual URL of the embed using DOMPurify.
  • Expanded the Content Security Policy to allow YouTube and Google Maps.

Bug Fixes:

  • There was an issue with loading Growthbook due to a missing entry in the Content Security Policy of Studio.

Notes:

  • The editing experience on Studio is still pending design.

Screenshots

image image image

@dcshzj dcshzj requested a review from a team as a code owner November 16, 2024 07:25
Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2024 7:39am

Copy link

linear bot commented Nov 16, 2024

@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Nov 16, 2024

Datadog Report

Branch report: feat/embeds-studio-editing
Commit report: 4070a4d
Test service: isomer-studio

✅ 0 Failed, 196 Passed, 34 Skipped, 37.91s Total Time
⬆️ Test Sessions change in coverage: 1 increased (+0.22%)

@sehyunidaaa
Copy link
Contributor

Hey just curious! is there a reason why there's an 'update' button instead of having the textarea directly on the form?

@dcshzj
Copy link
Contributor Author

dcshzj commented Nov 18, 2024

Hey just curious! is there a reason why there's an 'update' button instead of having the textarea directly on the form?

Clarified offline! Mainly is because we are constructing the iframe ourselves (for security) rather than letting the user input any iframe that they want. The validation for iframes would also be harder to perform compared to just checking the URL which we are currently doing.

@sehyunidaaa
Copy link
Contributor

Thank you! Added some minor design suggestions here after our discussion! @dcshzj

https://www.figma.com/design/g7LnLn4IUcUC9dYxgsHEJM/IsomerCMS-V2-(working-title%3A-%22Isomer-Studio%22)?node-id=10835-42086

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.

2 participants