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
7 changes: 7 additions & 0 deletions modules/ROOT/pages/best-practices.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ The SDK provides different packages for embedding ThoughtSpot components in your
+
To avoid page scroll as visualizations load on a Liveboard, you can set the `fullHeight` property to `true` in the `LiveboardEmbed` code.

// SOURCE: SCAL-351912
Size the embed frame appropriately::
ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high*. +
Set frame dimensions with `frameParams` or apply `min-width` and `min-height` constraints to the host container element in your CSS. +
For `LiveboardEmbed` and `AppEmbed` using `fullHeight: true`, set `minimumHeight` to 580 or higher — the default of 500 can clip parts of the UI. +
For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].

Prefetch and cache resources::
Use the `prefetch` method in the SDK to xref:prefetch-and-cache.adoc[prefetch and cache] static resources required for loading the embedded components. You can achieve this in two ways:

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/embed-a-viz.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const liveboardEmbed = new LiveboardEmbed(document.getElementById('ts-embed'), {



frameParams:: Sets the `width` and `height` dimensions to render the visualization object. You can set the `width` and `height` attribute values in pixels or as a percentage.
frameParams:: Sets the `width` and `height` dimensions to render the visualization object. You can set the `width` and `height` attribute values in pixels or as a percentage. For the recommended minimum frame size, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].


include::{path}/additional-flags.adoc[]
Expand Down
8 changes: 8 additions & 0 deletions modules/ROOT/pages/embed-new-spotter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ const appEmbed = new AppEmbed(document.getElementById('ts-embed'), {
appEmbed.render();
----

[NOTE]
====
// SOURCE: SCAL-351912, SCAL-347722
ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high*. When using `height: '100%'`, make sure the host container is at least 580 px high. The `fullHeight` and `minimumHeight` parameters do not apply to `SpotterEmbed`. +
From ThoughtSpot Cloud release 26.11.0.cl, the Spotter landing panel scrolls in frames shorter than 580 px so the prompt input remains reachable. The 580 px minimum is still recommended for the full experience without scrolling. +
For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].
====

== Spotter on Liveboards in embedded apps

When the new experience is enabled, you'll see the following behavior:
Expand Down
6 changes: 6 additions & 0 deletions modules/ROOT/pages/embed-pinboard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ const liveboardEmbed = new LiveboardEmbed(document.getElementById('ts-embed'), {
});
----

[NOTE]
====
// SOURCE: SCAL-351912
ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high*. When using `height: '100%'`, make sure the host container is at least 580 px high. For full-height Liveboards, set `minimumHeight` to 580 or higher. For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].
====

For more information about the Liveboard embed object, classes, methods, interface properties, and enumeration members, see the following pages:

* xref:LiveboardEmbed.adoc[LiveboardEmbed]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/embed-search.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const searchEmbed = new SearchEmbed(document.getElementById('ts-embed'), {
////

frameParams::
Sets the `width` and `height` dimensions to render the search object in a web browser. You can set the `width` and `height` attribute values in pixels or as a percentage.
Sets the `width` and `height` dimensions to render the search object in a web browser. You can set the `width` and `height` attribute values in pixels or as a percentage. ThoughtSpot recommends an embed frame size of at least 300 px wide × 580 px high. The `fullHeight` and `minimumHeight` parameters do not apply to `SearchEmbed`, so set the frame size with `frameParams` or by sizing the host container. For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].


include::{path}/additional-flags.adoc[]
Expand Down
8 changes: 8 additions & 0 deletions modules/ROOT/pages/embed-spotter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ const spotterEmbed = new SpotterEmbed(document.getElementById('ts-embed'), {
});
----

[NOTE]
====
// SOURCE: SCAL-351912, SCAL-347722
ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high* for Spotter. The `fullHeight` and `minimumHeight` parameters do not apply to `SpotterEmbed`. Set frame dimensions using `frameParams` or by applying `min-height: 580px` to the host container element in your CSS. +
From ThoughtSpot Cloud release 26.11.0.cl, the Spotter landing panel scrolls in frames shorter than 580 px so the prompt input remains reachable. The 580 px minimum is still recommended for the full experience without scrolling. +
For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].
====

=== Customize your embed (Optional)
The SDK provides configuration settings to customize the embedded Spotter interface.
For example, you can hide sample questions or disable data source selection using the `hideSampleQuestions` and `disableSourceSelection` parameters.
Expand Down
6 changes: 6 additions & 0 deletions modules/ROOT/pages/full-embed.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ const appEmbed = new AppEmbed(document.getElementById('ts-embed'), {
});
----

[NOTE]
====
// SOURCE: SCAL-351912
ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high*. If you set `fullHeight: true`, also set `minimumHeight` to 580 or higher, because the default of 500 can clip parts of the UI. For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].
====

The `AppEmbed` component allows you to embed a specific application page or the entire application experience. If you are embedding the full experience, you can xref:set-default-page.adoc[set a specific application page as the default page when the embedded content loads] using the `pageId` or `path` property.


Expand Down
56 changes: 51 additions & 5 deletions modules/ROOT/pages/lazy-loading-fullheight.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,51 @@
:toc: true
:toclevels: 1

:page-title: Lazy loading of viusalizations on a Liveboard
:page-title: Lazy loading of visualizations on a Liveboard
:page-pageid: lazy-load-fullHeight
:page-description: Load visualizations progressively on embedded Liveboard

The Visual Embed SDK provides configuration options to control how embedded apps handle the height of frame and loading of visualizations on an embedded Liveboard.

// SOURCE: SCAL-351912
[#min-embed-size]
== Recommended minimum embed size

ThoughtSpot recommends an embed frame size of at least *300 px wide × 580 px high* for all embedded components. Frames smaller than this may clip parts of the UI.

You can set frame dimensions using the `frameParams` parameter in the embed configuration, or by applying `min-width` and `min-height` constraints to the host container element in your CSS.

[source,JavaScript]
----
const embed = new LiveboardEmbed('#embed', {
frameParams: {
width: '100%',
height: '100%', // Fills the host container
},
liveboardId: 'your-liveboard-id',
});
----

[source,CSS]
----
#embed {
min-width: 300px;
min-height: 580px;
}
----

[NOTE]
====
// SOURCE: SCAL-347722 fix (26.11.0.cl)
From 26.11.0.cl, the Spotter landing panel scrolls when the embed frame height is less than 580 px, so the prompt input remains reachable in short frames. The 580 px minimum is still recommended for the full experience without scrolling.
====

[IMPORTANT]
====
// SOURCE: SCAL-351912
The `fullHeight` and `minimumHeight` parameters apply only to `LiveboardEmbed` and `AppEmbed`. For `SearchEmbed`, `SearchBarEmbed`, and `SpotterEmbed`, size the embed frame using `frameParams` or by sizing the host container element.
====

== Loading visualizations in the Liveboard viewport
To dynamically resize the height of the Liveboard embed container, the Visual Embed SDK provides the `fullHeight` property.

Expand Down Expand Up @@ -54,22 +93,29 @@ const embed = new LiveboardEmbed("#your-embed-div", {
});
----

// SOURCE: SCAL-351912
== Full height with minimum height setting
In addition to `fullHeight`, the SDK also provides the `minimumHeight` parameter to set the minimum height (in pixels) for this container. The value defined for the `minimumHeight` attribute is applied only when `fullHeight` is set to `true`.

This ensures that even if the Liveboard is empty or has little content, the container maintains at least the specified minimum height.
In addition to `fullHeight`, the SDK provides the `minimumHeight` parameter to set the minimum height in pixels for the Liveboard or full application embed container. The `minimumHeight` parameter is available from Visual Embed SDK v1.44.2 and ThoughtSpot Cloud 10.15.0.cl, and replaces the deprecated `defaultHeight` parameter. The `minimumHeight` value applies only when `fullHeight` is set to `true`.

Setting `minimumHeight` ensures that the container maintains at least the specified height even when the Liveboard is empty or has little content.

[WARNING]
====
The `minimumHeight` parameter defaults to *500 px*, which is below the recommended minimum height of 580 px. A full-height embed left at the default may clip parts of the UI. Set `minimumHeight` to *580 or higher* to avoid this. For more information, see xref:lazy-loading-fullheight.adoc#min-embed-size[Recommended minimum embed size].
====

[source,JavaScript]
----
const embed = new LiveboardEmbed('#embed', {
// other liveboard view config
fullHeight: true,
minimumHeight: 600,
minimumHeight: 580, // Set to 580 or higher; the default of 500 can clip the UI
});
----

== Additional resources
* xref:embed-pinboard.adoc[Embedding a Liveboard]
* xref:full-embed.adoc[Embedding the full application]
* xref:LiveboardViewConfig.adoc[Liveboard embed view configuration properties]
* xref:AppViewConfig.adoc[Full app embed view configuration properties]

Loading