Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
14 changes: 14 additions & 0 deletions src/embed/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,20 @@ describe('App embed tests', () => {
});
});

test('Should add isLiveboardPermissionV2Enabled flag to the iframe src', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
isEnhancedFilterInteractivityEnabled: false,
} as AppViewConfig);
appEmbed.render();
await executeAfterWait(() => {
expectUrlMatchesWithParams(
getIFrameSrc(),
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${defaultParams}${defaultParamsPost}#/home`,
);
});
});

test('Should add default values of flags to the iframe src', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
Expand Down
2 changes: 2 additions & 0 deletions src/embed/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ export class AppEmbed extends V1Embed {
showLiveboardVerifiedBadge = true,
showLiveboardReverifyBanner = true,
hideIrrelevantChipsInLiveboardTabs = false,
isEnhancedFilterInteractivityEnabled = false,
homePageSearchBarMode,
isUnifiedSearchExperienceEnabled = true,
enablePendoHelp = true,
Expand All @@ -699,6 +700,7 @@ export class AppEmbed extends V1Embed {
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
params[Param.IsFullAppEmbed] = true;
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
Expand Down
15 changes: 15 additions & 0 deletions src/embed/liveboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,21 @@ describe('Liveboard/viz embed tests', () => {
});
});

test('should set isLiveboardPermissionV2Enabled to true in url', async () => {
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
isEnhancedFilterInteractivityEnabled: true,
...defaultViewConfig,
liveboardId,
} as LiveboardViewConfig);
liveboardEmbed.render();
await executeAfterWait(() => {
expectUrlMatchesWithParams(
getIFrameSrc(),
`http://${thoughtSpotHost}/?embedApp=true${defaultParams}&isLiveboardPermissionV2Enabled=true${prefixParams}#/embed/viz/${liveboardId}`,
);
});
});

test('should set isPNGInScheduledEmailsEnabled to true in url', async () => {
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
isPNGInScheduledEmailsEnabled: true,
Expand Down
2 changes: 2 additions & 0 deletions src/embed/liveboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ export class LiveboardEmbed extends V1Embed {
showLiveboardVerifiedBadge = true,
showLiveboardReverifyBanner = true,
hideIrrelevantChipsInLiveboardTabs = false,
isEnhancedFilterInteractivityEnabled = false,
enableAskSage,
enable2ColumnLayout,
dataPanelV2 = true,
Expand Down Expand Up @@ -569,6 +570,7 @@ export class LiveboardEmbed extends V1Embed {
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
params[Param.DataPanelV2Enabled] = dataPanelV2;
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
Expand Down
18 changes: 17 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,22 @@ export interface LiveboardAppEmbedViewConfig {
* ```
*/
isLinkParametersEnabled?: boolean;


/**
* This flag is used to enable or disable the enhanced filter interactivity in liveboard.
*
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
* @version SDK: 1.42.0 | ThoughtSpot: 10.15.0.cl
* @example
* ```js
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
* const embed = new <EmbedComponent>('#tsEmbed', {
* ... // other embed view config
* isEnhancedFilterInteractivityEnabled: true,
* })
* ```
*/
isEnhancedFilterInteractivityEnabled?: boolean;
}

export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig { }
Expand Down Expand Up @@ -4368,6 +4383,7 @@ export enum Param {
ShowLiveboardReverifyBanner = 'showLiveboardReverifyBanner',
LiveboardHeaderV2 = 'isLiveboardHeaderV2Enabled',
HideIrrelevantFiltersInTab = 'hideIrrelevantFiltersAtTabLevel',
IsEnhancedFilterInteractivityEnabled = 'isLiveboardPermissionV2Enabled',
SpotterEnabled = 'isSpotterExperienceEnabled',
IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
OverrideOrgId = 'orgId',
Expand Down
Loading
Loading