Skip to content

Commit af5068a

Browse files
SCAL-274111 Added hideTagFilterChips option to AppEmbed
1 parent 3e6d3d4 commit af5068a

File tree

4 files changed

+3630
-3494
lines changed

4 files changed

+3630
-3494
lines changed

src/embed/app.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,37 @@ describe('App embed tests', () => {
402402
});
403403
});
404404

405+
test('Should add the hideTagFilterChips true to the iframe src', async () => {
406+
const appEmbed = new AppEmbed(getRootEl(), {
407+
...defaultViewConfig,
408+
showPrimaryNavbar: false,
409+
hideTagFilterChips: true,
410+
} as AppViewConfig);
411+
412+
appEmbed.render();
413+
await executeAfterWait(() => {
414+
expectUrlMatchesWithParams(
415+
getIFrameSrc(),
416+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`,
417+
);
418+
});
419+
});
420+
421+
test('Should add the hideTagFilterChips false to the iframe src', async () => {
422+
const appEmbed = new AppEmbed(getRootEl(), {
423+
...defaultViewConfig,
424+
showPrimaryNavbar: false,
425+
hideTagFilterChips: false,
426+
} as AppViewConfig);
427+
appEmbed.render();
428+
await executeAfterWait(() => {
429+
expectUrlMatchesWithParams(
430+
getIFrameSrc(),
431+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`,
432+
);
433+
});
434+
});
435+
405436
test('Should add enableSearchAssist flagto the iframe src', async () => {
406437
const appEmbed = new AppEmbed(getRootEl(), {
407438
...defaultViewConfig,

src/embed/app.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,32 @@ export interface AppViewConfig extends AllEmbedViewConfig {
367367
* ```
368368
*/
369369
tag?: string;
370+
/**
371+
* Hide tag filter chips that appear when content is filtered by tags.
372+
* When enabled, this automatically:
373+
* - Hides tag filter indicators/chips from the UI
374+
* - Adds Action.ManageTags to hiddenActions (if not already present)
375+
* - Adds ListPageColumns.Tags to hiddenListColumns (if not already present)
376+
*
377+
* This provides a clean interface without tag-related UI elements.
378+
*
379+
* Supported embed types: `AppEmbed`
380+
* @version SDK: 1.42.1 | ThoughtSpot: 10.14.0.cl
381+
* @example
382+
* ```js
383+
* // Simple usage - automatically hides all tag-related UI
384+
* const embed = new AppEmbed('#tsEmbed', {
385+
* ... // other embed view config
386+
* tag: 'Some Tag',
387+
* hideTagFilterChips: true, // This is all you need!
388+
* });
389+
*
390+
* // No need to manually specify:
391+
* // hiddenActions: [Action.ManageTags],
392+
* // hiddenListColumns: [ListPageColumns.Tags]
393+
* ```
394+
*/
395+
hideTagFilterChips?: boolean;
370396
/**
371397
* The array of GUIDs to be hidden
372398
*
@@ -625,6 +651,7 @@ export class AppEmbed extends V1Embed {
625651
protected getEmbedParams() {
626652
const {
627653
tag,
654+
hideTagFilterChips,
628655
hideObjects,
629656
liveboardV2,
630657
showPrimaryNavbar,
@@ -682,6 +709,7 @@ export class AppEmbed extends V1Embed {
682709
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
683710
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
684711
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
712+
params[Param.HideTagFilterChips] = hideTagFilterChips;
685713

686714
params = this.getBaseQueryParams(params);
687715

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4246,6 +4246,7 @@ export enum Param {
42464246
HideResult = 'hideResult',
42474247
UseLastSelectedDataSource = 'useLastSelectedSources',
42484248
Tag = 'tag',
4249+
HideTagFilterChips = 'hideTagFilterChips',
42494250
AutoLogin = 'autoLogin',
42504251
searchTokenString = 'searchTokenString',
42514252
executeSearch = 'executeSearch',

0 commit comments

Comments
 (0)