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
15 changes: 0 additions & 15 deletions src/embed/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -980,21 +980,6 @@ describe('App embed tests', () => {
});
});

test('Should add default isLiveboardMasterpiecesEnabled false when not specified', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
showPrimaryNavbar: false,
} as AppViewConfig);

appEmbed.render();
await executeAfterWait(() => {
expectUrlMatchesWithParams(
getIFrameSrc(),
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`,
);
});
});

test('Should add newChartsLibrary true to the iframe src', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
Expand Down
31 changes: 21 additions & 10 deletions src/embed/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
* })
* ```
*/
isContinuousLiveboardPDFEnabled?: boolean;

Check warning on line 617 in src/embed/app.ts

View workflow job for this annotation

GitHub Actions / build

Comments may not exceed 90 characters

/**
* This flag is used to enable/disable the XLSX/CSV download option for Liveboards
Expand Down Expand Up @@ -920,7 +920,7 @@
showLiveboardTitle = true,
showLiveboardDescription = true,
showMaskedFilterChip = false,
isLiveboardMasterpiecesEnabled = false,
isLiveboardMasterpiecesEnabled,
newChartsLibrary,
hideHomepageLeftNav = false,
modularHomeExperience = false,
Expand All @@ -931,16 +931,16 @@
enableCustomColumnGroups = false,
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
collapseSearchBar = true,
isLiveboardCompactHeaderEnabled = false,
isLiveboardCompactHeaderEnabled,
showLiveboardVerifiedBadge = true,
showLiveboardReverifyBanner = true,
hideIrrelevantChipsInLiveboardTabs = false,
isEnhancedFilterInteractivityEnabled = false,
hideIrrelevantChipsInLiveboardTabs,
isEnhancedFilterInteractivityEnabled,
homePageSearchBarMode,
isUnifiedSearchExperienceEnabled = true,
enablePendoHelp = true,
discoveryExperience,
coverAndFilterOptionInPDF = false,
coverAndFilterOptionInPDF,
isLiveboardStylingAndGroupingEnabled,
isPNGInScheduledEmailsEnabled = false,
isLiveboardXLSXCSVDownloadEnabled = false,
Expand All @@ -966,21 +966,32 @@
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
if (!isUndefined(isLiveboardMasterpiecesEnabled)) {
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
}
if (newChartsLibrary !== undefined) {
params[Param.EnableNewChartLibrary] = newChartsLibrary;
}
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
params[Param.IsFullAppEmbed] = true;
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
if (!isUndefined(isLiveboardCompactHeaderEnabled)) {
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
}
if (!isUndefined(isEnhancedFilterInteractivityEnabled)) {
params[Param.IsEnhancedFilterInteractivityEnabled] =
isEnhancedFilterInteractivityEnabled;
}
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
if (!isUndefined(hideIrrelevantChipsInLiveboardTabs)) {
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
}
if (isUnifiedSearchExperienceEnabled !== undefined) {
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
}
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
if (!isUndefined(coverAndFilterOptionInPDF)) {
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
Comment thread
goutham-sidhardha marked this conversation as resolved.
}

params = this.getBaseQueryParams(params);

Expand Down Expand Up @@ -1203,7 +1214,7 @@
/**
* Constructs the URL of the ThoughtSpot app page to be rendered.
* @param pageId The ID of the page to be embedded.
*/

Check warning on line 1217 in src/embed/app.ts

View workflow job for this annotation

GitHub Actions / build

Comments may not exceed 80 characters
public getIFrameSrc(): string {
const { pageId, path, modularHomeExperience } = this.viewConfig;
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
Expand Down
31 changes: 21 additions & 10 deletions src/embed/liveboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,22 +653,22 @@ export class LiveboardEmbed extends V1Embed {
showLiveboardDescription,
showLiveboardTitle,
isLiveboardHeaderSticky = true,
isLiveboardCompactHeaderEnabled = false,
isLiveboardCompactHeaderEnabled,
showLiveboardVerifiedBadge = true,
showLiveboardReverifyBanner = true,
hideIrrelevantChipsInLiveboardTabs = false,
hideIrrelevantChipsInLiveboardTabs,
showMaskedFilterChip = false,
isLiveboardMasterpiecesEnabled = false,
isLiveboardMasterpiecesEnabled,
newChartsLibrary,
isEnhancedFilterInteractivityEnabled = false,
isEnhancedFilterInteractivityEnabled,
enableAskSage,
enable2ColumnLayout,
dataPanelV2 = true,
enableCustomColumnGroups = false,
oAuthPollingInterval,
isForceRedirect,
dataSourceId,
coverAndFilterOptionInPDF = false,
coverAndFilterOptionInPDF,
isLiveboardStylingAndGroupingEnabled,
isPNGInScheduledEmailsEnabled = false,
isLiveboardXLSXCSVDownloadEnabled = false,
Expand Down Expand Up @@ -816,16 +816,27 @@ export class LiveboardEmbed extends V1Embed {
}

params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
if (!isUndefined(isLiveboardCompactHeaderEnabled)) {
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
}
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
if (!isUndefined(hideIrrelevantChipsInLiveboardTabs)) {
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
}
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
if (!isUndefined(isLiveboardMasterpiecesEnabled)) {
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
}
if (!isUndefined(isEnhancedFilterInteractivityEnabled)) {
params[Param.IsEnhancedFilterInteractivityEnabled] =
isEnhancedFilterInteractivityEnabled;
}
params[Param.DataPanelV2Enabled] = dataPanelV2;
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
if (!isUndefined(coverAndFilterOptionInPDF)) {
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
}

const queryParams = getQueryParamString(params, true);

Expand Down
Loading
Loading