Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/embed/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,21 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
* @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl
*/
excludeRuntimeParametersfromURL?: boolean;
/**
* enablePastConversationsSidebar : Controls the visibility of the past conversations sidebar.
*
* Supported embed types: `SpotterEmbed`
* @default false
* @example
* ```js
* const embed = new SpotterEmbed('#tsEmbed', {
* ... //other embed view config
* enablePastConversationsSidebar : true,
* })
* ```
* @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl
*/
enablePastConversationsSidebar?: boolean;
Comment on lines +167 to +181
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 TSDoc for the new enablePastConversationsSidebar property has a couple of issues:

  1. Formatting: There's an extra space before the colon in the property description (line 168) and in the example code (line 176). For consistency with other properties in this file, the format should be propertyName: description.
  2. Version Number: The @version on line 179 is set to SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl. This appears to be an old version, especially when compared to other recent additions (e.g., excludeRuntimeParametersfromURL is versioned 1.41.0). This might be a copy-paste error and could be misleading for SDK users. Please verify and update it to the correct version for this feature.

I've provided a suggestion to correct the formatting.

Suggested change
/**
* enablePastConversationsSidebar : Controls the visibility of the past conversations sidebar.
*
* Supported embed types: `SpotterEmbed`
* @default false
* @example
* ```js
* const embed = new SpotterEmbed('#tsEmbed', {
* ... //other embed view config
* enablePastConversationsSidebar : true,
* })
* ```
* @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl
*/
enablePastConversationsSidebar?: boolean;
/**
* enablePastConversationsSidebar: Controls the visibility of the past conversations sidebar.
*
* Supported embed types: `SpotterEmbed`
* @default false
* @example
* ```js
* const embed = new SpotterEmbed('#tsEmbed', {
* ... //other embed view config
* enablePastConversationsSidebar: true,
* })
* ```
* @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl
*/
enablePastConversationsSidebar?: boolean;

}

/**
Expand Down Expand Up @@ -205,6 +220,7 @@ export class SpotterEmbed extends TsEmbed {
dataPanelV2,
showSpotterLimitations,
hideSampleQuestions,
enablePastConversationsSidebar,
runtimeFilters,
excludeRuntimeFiltersfromURL,
runtimeParameters,
Expand Down Expand Up @@ -246,10 +262,15 @@ export class SpotterEmbed extends TsEmbed {
excludeRuntimeFiltersfromURL,
runtimeParameters,
excludeRuntimeParametersfromURL,
enablePastConversationsSidebar,
} = this.viewConfig;
const path = 'insights/conv-assist';
const queryParams = this.getEmbedParamsObject();

if (!isUndefined(enablePastConversationsSidebar)) {
queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
}

let query = '';
const queryParamsString = getQueryParamString(queryParams, true);
if (queryParamsString) {
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4367,6 +4367,7 @@ export enum Param {
LiveboardXLSXCSVDownload = 'isLiveboardXLSXCSVDownloadEnabled',
isPNGInScheduledEmailsEnabled = 'isPNGInScheduledEmailsEnabled',
isLinkParametersEnabled = 'isLinkParametersEnabled',
EnablePastConversationsSidebar = 'enablePastConversationsSidebar',
}

/**
Expand Down
Loading