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

Page Builder Elements - Compress Cached Data #4435

Merged
merged 18 commits into from
Dec 12, 2024

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Dec 10, 2024

Changes

This PR addresses a couple of useLoader React hook-related issues.

Mainly, when caching data into HTML (during page prerendering), the stringified JSON is now also encoded using encodeURIComponent. This makes it easier to avoid any potential serialization/deserliazation issues that might occur because of special characters (managed to experience this while manually testing).

Extra Changes

I noticed that the WebsiteLoaderCache class was not instantiated at the proper place in the PageBuilderProviderHOC component. This has now been fixed.

I also had this change here, but realized it was causing some issues while E2E testing. B/c of lack of time, decided to not do this.

I also tweaked the way browser instance is created in the renderUrl.ts file. Now, when doing local development, the puppeteer package is used. This is useful because it enables local runs / debugging. Using the existing packages locally does not work.

How Has This Been Tested?

Manually.

Documentation

Changelog.

@webiny-bot webiny-bot added this to the 5.41.4 milestone Dec 10, 2024
@adrians5j adrians5j changed the title Fix/pb elements data serialization Page Builder Elements - Base64 Encode/Decode Data Upon Serialization/Deserialization Dec 10, 2024
@adrians5j adrians5j changed the title Page Builder Elements - Base64 Encode/Decode Data Upon Serialization/Deserialization Page Builder Elements - Add Base64 Encoding Dec 10, 2024
@adrians5j adrians5j changed the title Page Builder Elements - Add Base64 Encoding Page Builder Elements - Add Base64 Encoding When Serializing Dec 10, 2024
@adrians5j adrians5j changed the title Page Builder Elements - Add Base64 Encoding When Serializing Page Builder Elements - Add Encoding When Serializing Dec 10, 2024
@adrians5j adrians5j marked this pull request as ready for review December 10, 2024 13:13
@adrians5j adrians5j changed the title Page Builder Elements - Add Encoding When Serializing Page Builder Elements - Compress Cached Data Dec 10, 2024
@adrians5j
Copy link
Member Author

/cypress

Copy link

Cypress E2E tests have been initiated (for more information, click here). ✨

@adrians5j
Copy link
Member Author

/cypress

Copy link

Cypress E2E tests have been initiated (for more information, click here). ✨

@adrians5j
Copy link
Member Author

/cypress_node_20

Copy link

Cypress E2E tests have been initiated (for more information, click here). ✨

@adrians5j
Copy link
Member Author

/cypress_node_20

Copy link

Cypress E2E tests have been initiated (for more information, click here). ✨

1 similar comment
Copy link

Cypress E2E tests have been initiated (for more information, click here). ✨

@adrians5j adrians5j merged commit 91cf386 into dev Dec 12, 2024
16 checks passed
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