Skip to content

[SCAL-343863] Use liveboardEmbed in HostEvent.AskSpotter docs - #729

Open
ruchI9897 wants to merge 1 commit into
mainfrom
SCAL-343863-ask-spotter-docs
Open

ruchI9897 wants to merge 1 commit into
mainfrom
SCAL-343863-ask-spotter-docs

Conversation

@ruchI9897

Copy link
Copy Markdown
Contributor

AskSpotter is only handled in Liveboard embed, but its reference showed a spotterEmbed example and described vizId as the visualization ID in Spotter embed. Change both to Liveboard embed.

AskSpotter is only handled in Liveboard embed, but its reference
showed a spotterEmbed example and described vizId as the
visualization ID in Spotter embed. Change both to Liveboard embed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ruchI9897
ruchI9897 requested a review from a team as a code owner October 29, 2026 11:57

@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 updates the JSDoc documentation for HostEvent.AskSpotter in src/types.ts to correctly reference Liveboard embed and liveboardEmbed instead of Spotter embed and spotterEmbed. The review feedback identifies a style guide violation in the @Version tag formatting within the same JSDoc block, recommending the use of ThoughtSpot Cloud instead of ThoughtSpot to comply with the repository's formatting rules.

Comment thread src/types.ts
Comment on lines 7012 to 7026
/**
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
* Payload: {@link RequiredVizRequest}.
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
* @param - `vizId` refers to the Visualization ID in Liveboard embed and is required.
* @example
* ```js
* let latestSpotterVizId = '';
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
* liveboardEmbed.on(EmbedEvent.Data, (payload) => {
* latestSpotterVizId = payload.data.id;
* });
*
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
* liveboardEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
* ```
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
*/

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.

medium

The JSDoc block for HostEvent.AskSpotter has a style guide violation regarding version formatting:

Version Formatting: The @version tag should use ThoughtSpot Cloud instead of ThoughtSpot as required by the style guide (@version SDK: X.Y.Z | ThoughtSpot Cloud: A.B.C.cl). Note that we should keep the @version tag at the end of the block to follow file-specific conventions for JSDoc tag ordering.

Here is the corrected JSDoc block:

    /**
     * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
     * Payload: {@link RequiredVizRequest}.
     * @param - `vizId` refers to the Visualization ID in Liveboard embed and is required.
     * @example
     * ```js
     * let latestSpotterVizId = '';
     * liveboardEmbed.on(EmbedEvent.Data, (payload) => {
     *   latestSpotterVizId = payload.data.id;
     * });
     * 
     * liveboardEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
     * ```
     * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.12.0.cl
     */
References
  1. Use @version SDK: X.Y.Z | ThoughtSpot Cloud: A.B.C.cl — no colon after @version itself. (link)
  2. Follow file-specific conventions for JSDoc tag ordering (such as keeping @Version last) even if they differ from the general style guide.

@shivam-kumar-ts shivam-kumar-ts 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.

LGTM

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: a4c2494

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.

2 participants