Skip to content

Commit 97ff446

Browse files
authored
SCAL-227976 isUnifiedSearchExperienceEnabled flag (#43)
1 parent bf4cb85 commit 97ff446

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

src/embed/app.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,21 @@ describe('App embed tests', () => {
405405
});
406406
});
407407

408+
test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => {
409+
const appEmbed = new AppEmbed(getRootEl(), {
410+
...defaultViewConfig,
411+
isUnifiedSearchExperienceEnabled: false,
412+
} as AppViewConfig);
413+
414+
appEmbed.render();
415+
await executeAfterWait(() => {
416+
expectUrlMatchesWithParams(
417+
getIFrameSrc(),
418+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`,
419+
);
420+
});
421+
});
422+
408423
test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
409424
const appEmbed = new AppEmbed(getRootEl(), {
410425
...defaultViewConfig,

src/embed/app.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
431431
* ```
432432
*/
433433
showLiveboardReverifyBanner?: boolean;
434+
/**
435+
* This flag is used to enable unified search experience for full app embed.
436+
* @type {boolean}
437+
* @default true
438+
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
439+
* @example
440+
* ```js
441+
* const embed = new AppEmbed('#embed-container', {
442+
* ... // other options
443+
* isUnifiedSearchExperienceEnabled: true,
444+
* })
445+
* ```
446+
*/
447+
isUnifiedSearchExperienceEnabled?: boolean;
434448
}
435449

436450
/**
@@ -487,6 +501,7 @@ export class AppEmbed extends V1Embed {
487501
showLiveboardVerifiedBadge = true,
488502
showLiveboardReverifyBanner = true,
489503
homePageSearchBarMode,
504+
isUnifiedSearchExperienceEnabled = true,
490505
} = this.viewConfig;
491506

492507
let params = {};
@@ -503,6 +518,7 @@ export class AppEmbed extends V1Embed {
503518
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
504519
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
505520
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
521+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
506522

507523
params = this.getBaseQueryParams(params);
508524

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,6 +3261,7 @@ export enum Param {
32613261
ShowLiveboardReverifyBanner = 'showLiveboardReverifyBanner',
32623262
LiveboardHeaderV2 = 'isLiveboardHeaderV2Enabled',
32633263
SpotterEnabled = 'isSpotterExperienceEnabled',
3264+
IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
32643265
}
32653266

32663267
/**

0 commit comments

Comments
 (0)