diff --git a/src/css-variables.ts b/src/css-variables.ts index 8b8b98e6..f4f28155 100644 --- a/src/css-variables.ts +++ b/src/css-variables.ts @@ -44,6 +44,51 @@ export interface CustomCssVariables { */ '--ts-var-nav-color'?: string; + /** + * Background color of the left navigation panel. + */ + '--ts-var-left-nav-background'?: string; + + /** + * Background color of the active tab in the left navigation panel. + */ + '--ts-var-left-nav-active-tab-background'?: string; + + /** + * Border color of the active tab in the left navigation panel. + */ + '--ts-var-left-nav-active-tab-border-color'?: string; + + /** + * Font color of the section title in the left navigation panel. + */ + '--ts-var-left-nav-section-title-color'?: string; + + /** + * Font color of the items in the left navigation panel. + */ + '--ts-var-left-nav-item-color'?: string; + + /** + * Font color of the selected item in the left navigation panel. + */ + '--ts-var-left-nav-item-selection-color'?: string; + + /** + * Background color of the selected item in the left navigation panel. + */ + '--ts-var-left-nav-item-selection-background'?: string; + + /** + * Color of the active tab icon in the left navigation panel. + */ + '--ts-var-left-nav-tab-icon-active-color'?: string; + + /** + * Color of the inactive tab icon in the left navigation panel. + */ + '--ts-var-left-nav-tab-icon-inactive-color'?: string; + /** * Background color of the *Search data* button. */ diff --git a/src/embed/app.spec.ts b/src/embed/app.spec.ts index 64e860da..689d9048 100644 --- a/src/embed/app.spec.ts +++ b/src/embed/app.spec.ts @@ -4,7 +4,6 @@ import { DataPanelCustomColumnGroupsAccordionState, Page, HomePageSearchBarMode, - PrimaryNavbarVersion, HomePage, ListPage, } from './app'; @@ -138,7 +137,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -152,7 +151,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -166,7 +165,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -180,7 +179,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -194,7 +193,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -227,7 +226,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`, ); cleanUp(); }); @@ -261,7 +260,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`, ); cleanUp(); }); @@ -278,7 +277,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/foo/bar`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/foo/bar`, ); }); }); @@ -301,7 +300,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -324,7 +323,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -348,7 +347,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`, ); }); }); @@ -366,7 +365,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&${defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`, ); }); }); @@ -381,7 +380,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -395,7 +394,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -409,7 +408,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -423,7 +422,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -437,7 +436,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -448,7 +447,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -462,7 +461,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -476,7 +475,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -489,7 +488,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -503,7 +502,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -517,7 +516,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -530,7 +529,7 @@ describe('App embed tests', () => { homePage: HomePage.Focused, }, } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v4${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homepageVersion=v4&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); @@ -543,7 +542,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -557,7 +556,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -571,7 +570,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -587,7 +586,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -603,7 +602,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -617,7 +616,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -644,7 +643,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -658,7 +657,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -672,7 +671,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -686,7 +685,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -700,7 +699,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -716,7 +715,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&tag=Finance${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&tag=Finance${defaultParamsPost}#/home`, ); }); }); @@ -732,7 +731,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`, ); }); }); @@ -747,7 +746,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`, ); }); }); @@ -761,7 +760,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -777,7 +776,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -793,7 +792,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -808,7 +807,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -824,7 +823,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -840,7 +839,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -855,7 +854,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -871,7 +870,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -887,7 +886,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -902,7 +901,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -917,7 +916,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -932,7 +931,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -947,7 +946,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -962,7 +961,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -977,7 +976,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -993,7 +992,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); appEmbedTrue.destroy(); @@ -1008,7 +1007,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); appEmbedFalse.destroy(); @@ -1022,7 +1021,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1037,7 +1036,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1052,7 +1051,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1066,7 +1065,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1080,7 +1079,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1095,7 +1094,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1110,7 +1109,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&hideHomepageLeftNav=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHomepageLeftNav=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1127,7 +1126,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1144,93 +1143,18 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); - test('Should add navigationVersion=v3 when primaryNavbarVersion is Sliding to the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, - homePage: HomePage.Modular, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home` - ); - }); - - test('Should not add navigationVersion=v3 when primaryNavbarVersion is not added to the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - discoveryExperience: { - homePage: HomePage.Modular, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home` - ); - }); - - test('Should add navigationVersion=v3 & modularHomeExperience=true when primaryNavbarVersion is Sliding to the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - // homePage v2 config not included under discoveryExperience - discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home` - ); - }); - - test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when Sliding and ModularWithStylingChanges configured in the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, - homePage: HomePage.ModularWithStylingChanges, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home` - ); - }); - - test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - // primaryNavbarVersion is not included under - // discoveryExperience, then it set navigationVersion=v2 and - // modularHomeExperience=false. - discoveryExperience: { - homePage: HomePage.ModularWithStylingChanges, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home` - ); - }); - - test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => { - await testUrlParams( - { - ...defaultViewConfig, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${defaultParams}${defaultParamsPost}#/home` - ); - }); - test('Should add enableAskSage flag to the iframe src', async () => { await testUrlParams( { ...defaultViewConfig, enableAskSage: true, } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&enableAskSage=true${defaultParams}${defaultParamsPost}#/home` + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableAskSage=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home` ); }); @@ -1242,30 +1166,28 @@ describe('App embed tests', () => { listPageVersion: ListPage.ListWithUXChanges, }, } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&listpageVersion=v3${defaultParams}${defaultParamsPost}#/home` + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&listpageVersion=v3&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home` ); }); - test('Should add listpageVersion=v2 by default when no discoveryExperience is provided', async () => { + test('Should send navigationVersion=v3 & homepageVersion=v3 by default when no discoveryExperience is provided', async () => { await testUrlParams( { ...defaultViewConfig, } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${defaultParams}${defaultParamsPost}#/home` + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home` ); }); - test('Should add listpageVersion=v2 by default when discoveryExperience is provided but listPageVersion is not specified', async () => { - await testUrlParams( - { - ...defaultViewConfig, - discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, - homePage: HomePage.Modular, - }, - } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home` - ); + test('Should not send modularHomeExperience param by default when not specified', async () => { + const appEmbed = new AppEmbed(getRootEl(), { + ...defaultViewConfig, + } as AppViewConfig); + appEmbed.render(); + await executeAfterWait(() => { + const url = new URL(getIFrameSrc()); + expect(url.searchParams.has('modularHomeExperience')).toBe(false); + }); }); @@ -1274,12 +1196,10 @@ describe('App embed tests', () => { { ...defaultViewConfig, discoveryExperience: { - primaryNavbarVersion: PrimaryNavbarVersion.Sliding, - homePage: HomePage.Modular, listPageVersion: ListPage.ListWithUXChanges, }, } as AppViewConfig, - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&listpageVersion=v3${defaultParams}${defaultParamsPost}#/home` + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&listpageVersion=v3${defaultParams}${defaultParamsPost}#/home` ); }); @@ -1292,7 +1212,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); @@ -1305,7 +1225,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1319,7 +1239,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -1333,7 +1253,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`, ); }); }); @@ -1358,7 +1278,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=objectSearch${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=objectSearch&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1373,7 +1293,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=aiAnswer${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=aiAnswer&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1388,7 +1308,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=none${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=none&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1405,7 +1325,7 @@ describe('App embed tests', () => { await executeAfterWait(() => { expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST${defaultParams}${defaultParamsPost}#/home`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`, ); }); }); @@ -1466,7 +1386,7 @@ describe('App embed tests', () => { appEmbed.navigateToPage(path); expectUrlMatchesWithParams( getIFrameSrc(), - `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`, + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`, ); }); diff --git a/src/embed/app.ts b/src/embed/app.ts index 935813df..c4b21923 100644 --- a/src/embed/app.ts +++ b/src/embed/app.ts @@ -110,6 +110,9 @@ export enum HomePage { /** * Modular (v2) introduces the updated Modular Home Experience. * It serves as the foundational version of the home page. + * Use {@link HomePage.ModularWithStylingChanges} (V3) or + * {@link HomePage.Focused} (V4) instead. + * @deprecated V1 and V2 home page experiences are deprecated. */ Modular = 'v2', /** @@ -119,7 +122,7 @@ export enum HomePage { ModularWithStylingChanges = 'v3', /** * Focused (v4) introduces the V4 homepage experience - * in which Watchlist and recents and incorporated together + * in which Watchlist and recents and incorporated together * to form a more focused homepage. * Pre-requisite : spotter enablement * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl @@ -186,13 +189,14 @@ export interface AppViewConfig extends AllEmbedViewConfig { showPrimaryNavbar?: boolean; /** * Control the visibility of the left navigation panel on the home page - * in the V2 and V3 navigation and home page experience. + * in the V3 and V4 navigation and home page experience. * If `showPrimaryNavbar` is true, that is, if the Global and Homepage * navigation bars are visible, this flag will only hide the left navigation bar * on the home page. * The `showPrimaryNavbar` flag takes precedence over the `hideHomepageLeftNav`. * - * **Note**: This attribute is not supported in the classic (V1) experience. + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. This attribute applies to V3 and V4 home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl @@ -258,11 +262,10 @@ export interface AppViewConfig extends AllEmbedViewConfig { hideHamburger?: boolean; /** * Control the visibility of the object search - * on the top navigation bar in the - * V2 and V3 navigation experience. + * on the top navigation bar in the V3 navigation experience. * - * **Note**: This attribute is not supported - * in the classic (V1) experience. + * **Note**: The classic (V1) and V2 navigation experiences are + * deprecated. This attribute applies to the V3 navigation experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl @@ -280,8 +283,8 @@ export interface AppViewConfig extends AllEmbedViewConfig { * Control the visibility of the notification icon * on the top navigation bar in V3 navigation experience. * - * **Note**: This attribute is not supported - * in the classic (V1) and V2 experience modes. + * **Note**: The classic (V1) and V2 experience modes are deprecated. + * This attribute applies to the V3 experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl @@ -296,14 +299,14 @@ export interface AppViewConfig extends AllEmbedViewConfig { */ hideNotification?: boolean; /** - * Control the visibility of the application selection menu - * in the top navigation bar in the V2 experience. + * Control the visibility of the application selection menu. * In the V3 experience, it shows or hides application selection * icons on the left navigation panel. * By default, the application selection menu and icons are * shown in the UI. * - * **Note**: This attribute is not supported in the classic (V1) experience. + * **Note**: The classic (V1) and V2 experiences are deprecated. + * This attribute applies to the V3 experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl @@ -321,7 +324,8 @@ export interface AppViewConfig extends AllEmbedViewConfig { * Control the visibility of the Org switcher button on the nav-bar. * By default, the Org switcher button is shown. * - * **Note**: This attribute is not supported in the classic (V1) experience. + * **Note**: The classic (V1) experience is deprecated. This attribute + * applies to V2 (deprecated), V3 and V4 experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl @@ -480,6 +484,10 @@ export interface AppViewConfig extends AllEmbedViewConfig { * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl * @default false + * Use the discoveryExperience.homePage option with + * {@link HomePage.ModularWithStylingChanges} (V3) or + * {@link HomePage.Focused} (V4) instead. + * @deprecated The V1 and V2 home page experiences are deprecated. * @example * ```js * const embed = new AppEmbed('#tsEmbed', { @@ -893,7 +901,7 @@ export class AppEmbed extends V1Embed { isLiveboardMasterpiecesEnabled = false, newChartsLibrary, hideHomepageLeftNav = false, - modularHomeExperience = false, + modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, @@ -1084,7 +1092,6 @@ export class AppEmbed extends V1Embed { params[Param.DataPanelV2Enabled] = dataPanelV2; params[Param.HideHomepageLeftNav] = hideHomepageLeftNav; - params[Param.ModularHomeExperienceEnabled] = modularHomeExperience; params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar; params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups; if (dataPanelCustomGroupsAccordionInitialState @@ -1105,41 +1112,21 @@ export class AppEmbed extends V1Embed { params[Param.ModularHomeExperienceEnabled] = modularHomeExperience; } - // Set navigation to v2 by default to avoid problems like the app - // switcher (9-dot menu) not showing when v3 navigation is turned on - // at the cluster level. - // To use v3 navigation, we must manually set the discoveryExperience - // settings. - params[Param.NavigationVersion] = 'v2'; - // Set homePageVersion to v2 by default to reset the LD flag value - // for the homepageVersion. - params[Param.HomepageVersion] = 'v2'; - if (discoveryExperience) { - // primaryNavbarVersion v3 will enabled the new left navigation - if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) { - params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion; - // Enable the modularHomeExperience when Sliding is enabled. - params[Param.ModularHomeExperienceEnabled] = true; - } - - // homePage v2 will enable the modular home page - // and it will override the modularHomeExperience value - if (discoveryExperience.homePage === HomePage.Modular) { - params[Param.ModularHomeExperienceEnabled] = true; - } - - // ModularWithStylingChanges (v3) introduces the styling changes - // to the Modular Homepage. - // v3 will be the base version of homePageVersion. - if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) { - params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges; - } + // Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the + // default experience, Need to send navigationVersion=v3 and + // homepageVersion=v3 even when the no discoveryExperience / + // modularHomeExperience config is set. Without these + // params, older TSA versions (< 26.7) fall back to V2 for nav and + // home page, so the defaults must be sent explicitly from the SDK. + params[Param.NavigationVersion] = PrimaryNavbarVersion.Sliding; + params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges; + if (discoveryExperience) { // listPageVersion can be changed to v2 or v3 if (discoveryExperience.listPageVersion !== undefined) { params[Param.ListPageVersion] = discoveryExperience.listPageVersion; } - + if (discoveryExperience.homePage === HomePage.Focused) { params[Param.HomepageVersion] = HomePage.Focused; } diff --git a/src/types.ts b/src/types.ts index 1bf46c2f..afd7ab2b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -176,7 +176,9 @@ export enum AuthType { } /** * - * **Note**: This attribute is not supported in the classic (V1) homepage experience. + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. This attribute applies to V3 (ModularWithStylingChanges) and + * V4 (Focused) home page experiences. * */ @@ -1512,7 +1514,9 @@ export interface HomePageConfig { * To specify the modules, import the `HomepageModule` enum. * For example: `hiddenHomepageModules = [HomepageModule.MyLibrary]` * - * **Note**: This attribute is not supported in the classic (v1) experience. + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. This attribute applies to V3 (ModularWithStylingChanges) + * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw @@ -1521,7 +1525,7 @@ export interface HomePageConfig { * import { HomepageModule } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { - * ... // V2/V3 navigation and home page experience attributes + * ... // V3 navigation and home page experience attributes * hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning], * //...other embed view configuration attributes * }) @@ -1532,8 +1536,11 @@ export interface HomePageConfig { * Reorder home page modules. * To specify the modules, import the `HomepageModule` enum. * For example: `reorderedHomepageModules = [HomepageModule.MyLibrary, - * HomepageModule.Watchlist]` **Note**: This attribute is not supported in the - * classic (v1) homepage. + * HomepageModule.Watchlist]` + * + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. This attribute applies to V3 (ModularWithStylingChanges) + * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw @@ -1542,7 +1549,7 @@ export interface HomePageConfig { * import { HomepageModule } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { - * ...//V2/V3 navigation and home page experience attributes + * ...//V3 navigation and home page experience attributes * reorderedHomepageModules:[HomepageModule.Favorite,HomepageModule.MyLibrary], * //... other embed view configuration attributes * }) @@ -1554,7 +1561,9 @@ export interface HomePageConfig { * on the home page left navigation panel. * To specify the menu items, import the `HomeLeftNavItem` enum. * - * **Note**: This attribute is not supported in the classic (v1) homepage. + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. This attribute applies to V3 (ModularWithStylingChanges) + * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw @@ -2148,7 +2157,9 @@ export enum RuntimeFilterOp { * via `hiddenHomepageModules` and reordered via * `reorderedHomepageModules`. * - * **Note**: This option is not supported in the classic (v1) experience. + * **Note**: The classic (V1) and Modular (V2) home page experiences are + * deprecated. These modules apply to V3 (ModularWithStylingChanges) and + * V4 (Focused) home page experiences. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw */