Skip to content

SCAL-337466 Send embed config over postMessage instead of the iframe URL - #663

Open
shivam-kumar-ts wants to merge 2 commits into
mainfrom
SCAL-337466
Open

shivam-kumar-ts wants to merge 2 commits into
mainfrom
SCAL-337466

Conversation

@shivam-kumar-ts

Copy link
Copy Markdown
Contributor

No description provided.

@shivam-kumar-ts
shivam-kumar-ts requested a review from a team as a code owner September 10, 2026 06:52

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the sendConfigAsPostMessage configuration option, allowing the SDK to send embed configurations via postMessage (HostEvent.UpdateEmbedParams) instead of encoding them directly into the iframe URL. This helps keep the iframe URL short and prevents configuration leakage in the DOM. Only essential bootstrap parameters are kept on the URL. Feedback on the changes points out a duplicate entry of Param.PendoTrackingKey in the BOOTSTRAP_URL_PARAMS set.

Comment thread src/embed/ts-embed.ts
@shivam-kumar-ts
shivam-kumar-ts force-pushed the SCAL-337466 branch 4 times, most recently from f5a9c30 to 123203e Compare September 10, 2026 07:17
@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@thoughtspot/visual-embed-sdk@663

commit: 67e12b9

@shivam-kumar-ts

Copy link
Copy Markdown
Contributor Author

@gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the sendConfigAsPostMessage option, which allows sending embed configurations via postMessage (HostEvent.UpdateEmbedParams) instead of encoding them in the iframe URL, keeping the URL short and clean. To support this, various embed components were updated to use the new getUrlQueryParamsObject helper, and comprehensive tests were added. Feedback on the changes includes a request to reorder JSDoc tags in src/types.ts to comply with the repository style guide, and to remove a redundant this.viewConfig assignment in the SearchBarEmbed constructor.

Comment thread src/types.ts
Comment thread src/embed/search-bar.tsx
@shivam-kumar-ts
shivam-kumar-ts force-pushed the SCAL-337466 branch 3 times, most recently from 062782a to 1d23ad2 Compare September 14, 2026 14:37

This branch has not been deployed

No deployments
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.

1 participant