Repository navigation
Conversation
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>
There was a problem hiding this comment.
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.
| /** | ||
| * 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 | ||
| */ |
There was a problem hiding this comment.
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
*/
commit: |
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.