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: encode CPA response when csm alpha feature is enabled [TOL-2080] #2218

Merged
merged 8 commits into from
May 14, 2024

Conversation

2wce
Copy link
Contributor

@2wce 2wce commented May 7, 2024

Summary

This should make it easier for customers to set up Content Source Maps. Once this is merged, enabling the CSM alpha feature will encode the CPA response directly reducing the steps needed to set this up

Description

We have added a wrapper function the conditionally encodes the CPA response depending on whether the alpha feature is enabled or not

Todos

  • rename the alpha feature from withContentSourceMaps to includeContentSourceMaps
  • it should encode the CPA response directly (encodeCPAResponse)
  • it loads the content source maps in the background
  • Import it from the content-source-maps package (smaller bundlesize than live preview SDK)

NOTE:
We haven't added tests for the entry endpoint because the test entry in the space uses unsupported fields & we have realised that we currently encode them in the csm package anyway so we would have to finish the work on supporting them first before adding tests here to confirm if they work

@2wce 2wce self-assigned this May 7, 2024
@2wce 2wce marked this pull request as ready for review May 13, 2024 11:05
@2wce 2wce requested a review from a team as a code owner May 13, 2024 11:05
@2wce 2wce requested a review from z0al May 13, 2024 11:50
package.json Outdated Show resolved Hide resolved
@2wce 2wce requested a review from YvesRijckaert May 14, 2024 07:49
z0al
z0al previously approved these changes May 14, 2024
Copy link
Member

@z0al z0al left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I'm missing tests for the new behavior.

Copy link
Contributor

@mgoudy91 mgoudy91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, no concerns

@2wce 2wce merged commit 529a5c3 into master May 14, 2024
3 checks passed
@2wce 2wce deleted the TOL-2080 branch May 14, 2024 16:19
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 10.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants