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
16 changes: 8 additions & 8 deletions src/embed/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
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&modularHomeExperience=false&homepageVersion=v4${defaultParams}${defaultParamsPost}#/home`,
);
});

Expand Down Expand Up @@ -1390,27 +1390,27 @@
);
});

test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => {
test('Should add homepageVersion=v3 & modularHomeExperience=false to the iframe src when homePage is ModularWithStylingChanges', async () => {
await testUrlParams(
{
...defaultViewConfig,
// primaryNavbarVersion is not included under
// discoveryExperience, then it set navigationVersion=v2 and
// modularHomeExperience=false.
// discoveryExperience, so navigationVersion is left unset and
// the server's GA default applies, while modularHomeExperience is set to false.

Check warning on line 1399 in src/embed/app.spec.ts

View workflow job for this annotation

GitHub Actions / build

Comments may not exceed 80 characters
discoveryExperience: {
homePage: HomePage.ModularWithStylingChanges,
},
} as AppViewConfig,
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
);
});

test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
test('Should not add navigationVersion 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`
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`
);
});

Expand Down Expand Up @@ -1441,7 +1441,7 @@
{
...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&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`
);
});

Expand Down
12 changes: 3 additions & 9 deletions src/embed/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
isPNGInScheduledEmailsEnabled?: boolean;

/**
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page

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
* following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
* This feature is GA from version 26.5.0.cl. It is disabled by default in embed deployments.
*
Expand Down Expand Up @@ -1181,15 +1181,9 @@
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';
// Don't force a navigation/homepage version by default. Let the
// server's GA default take over (v3 on 26.8+, v2 on older clusters).
// Only override when the user explicitly sets discoveryExperience.
if (discoveryExperience) {
// primaryNavbarVersion v3 will enabled the new left navigation
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
Expand Down Expand Up @@ -1231,7 +1225,7 @@
this.iFrame,
this.viewConfig.enableScrollableContainerLazyLoading,
);
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true

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

View workflow job for this annotation

GitHub Actions / build

Comments may not exceed 80 characters
if(this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight){
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
}
Expand Down
Loading