Skip to content

Commit

Permalink
Update document (#24)
Browse files Browse the repository at this point in the history
* update document

* Update

---------

Co-authored-by: ziyuhehe <[email protected]>
  • Loading branch information
ziyuhehe and ziyuhehe authored Jun 21, 2024
1 parent 1e419e1 commit cfebe32
Show file tree
Hide file tree
Showing 31 changed files with 2,993 additions and 2,447 deletions.
4 changes: 2 additions & 2 deletions contributing/content-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ The list below shows the usage of emojis in our Docs site:
- If the description of the link is related to the title of some page, use sentence case. For example:

```md
[Ability to customize dossier pages from embedding Library home page](./embed-library-main-page/embed-custom-ui-on-all-pages.md)
[Ability to customize dashboard pages from embedding Library home page](./embed-library-main-page/embed-custom-ui-on-all-pages.md)
```

- If the description of the link is in the middle of the sentence and it is a brief explanation of what the link is, use proper cases as needed. For example:

```md
New properties allow you to [customize features and the UI](./add-functionality/methods-and-properties.md) for an embedded dossier.
New properties allow you to [customize features and the UI](./add-functionality/methods-and-properties.md) for an embedded dashboard.
```

## Naming conventions
Expand Down
8 changes: 4 additions & 4 deletions docs/add-functionality/add-functionality.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
title: Add functionality to an embedded dashboard
description: Once you have embedded a dossier, you can use helper methods in the Embedding SDK to add other functionality. The topics in this section describe how to implement different kinds of functionalities with code examples.
description: Once you have embedded a dashboard, you can use helper methods in the Embedding SDK to add other functionality. The topics in this section describe how to implement different kinds of functionalities with code examples.
---

Once you have embedded a dossier, you can use helper methods in the Embedding SDK to add other functionality. The topics in this section describe how to implement different kinds of functionalities with code examples.
Once you have embedded a dashboard, you can use helper methods in the Embedding SDK to add other functionality. The topics in this section describe how to implement different kinds of functionalities with code examples.

- [Methods and properties for an embedded dashboard](./methods-and-properties.md)

Describes the properties that can be set for an embedded dashboard. Provides an example that modifies UI elements like the navigation bar and size of the embedded dashboard through properties.

- [Add navigation](./add-nav.md)

Describes the methods that can be used for navigation within an embedded dashboard. For example, the Embedding SDK lets you add code to get the table of contents for the dossier, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations. Provides an example that illustrates how to include navigation controls to allow users to page through the various chapters and pages of an embedded dashboard.
Describes the methods that can be used for navigation within an embedded dashboard. For example, the Embedding SDK lets you add code to get the table of contents for the dashboard, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations. Provides an example that illustrates how to include navigation controls to allow users to page through the various chapters and pages of an embedded dashboard.

- [Add event handling](./add-event.md)

Describes events that an embedded dashboard can use to communicate with the container page and methods and wrapper functions for registering event handlers. For example, the Embedding SDK lets you add code to capture selection events from one dashboard and apply them as a filter to a second dashboard. Provides an example that illustrates how to capture selection events from one embedded dashboard and apply them as a filter to a second dashboard.

- [Retrieve and apply filters](./filters.md)

Describes how to retrieve and apply filters for an embedded dashboard and shows the filter details for each filter type, with code examples. For example, you can apply different kinds of filters to a chapter in a dossier, either during execution or after a dashboard has been rendered. Provides examples on how to retrieve filters and apply each different type of filter.
Describes how to retrieve and apply filters for an embedded dashboard and shows the filter details for each filter type, with code examples. For example, you can apply different kinds of filters to a chapter in a dashboard, either during execution or after a dashboard has been rendered. Provides examples on how to retrieve filters and apply each different type of filter.

- [Error handling](./error-handling.md)

Expand Down
6 changes: 3 additions & 3 deletions docs/add-functionality/add-nav.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Add navigation
description: Once you have embedded a dossier, you can use helper methods in the Embedding SDK to let users navigate within the dashboard. For example, you can add code to get the table of contents for the dossier, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.
description: Once you have embedded a dashboard, you can use helper methods in the Embedding SDK to let users navigate within the dashboard. For example, you can add code to get the table of contents for the dashboard, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.
---

The Embedding SDK allows you to quickly integrate dossiers into a web application in a responsive manner. Once you have embedded a dossier, you can use helper methods in the Embedding SDK to let users navigate within the dashboard. For example, you can add code to get the table of contents for the dossier, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.
The Embedding SDK allows you to quickly integrate dossiers into a web application in a responsive manner. Once you have embedded a dashboard, you can use helper methods in the Embedding SDK to let users navigate within the dashboard. For example, you can add code to get the table of contents for the dashboard, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.

:::tip

Expand All @@ -13,7 +13,7 @@ To help you get started, we have provided a [page navigation example in the Embe

## Helper methods for navigation

You can use the methods described below to navigate within the dashboard. You can get the table of contents for the dossier, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.
You can use the methods described below to navigate within the dashboard. You can get the table of contents for the dashboard, go to the previous or next page, navigate to a specific page, get the current page or chapter, get a specific page, or get a list of pages, chapters and visualizations.

Most of the navigation is performed using methods of the Dossier class, but there is one method for navigation in the Chapter class.

Expand Down
4 changes: 2 additions & 2 deletions docs/add-functionality/authoring-library.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Author an embedded dashboard
description: To allow users to conveniently edit a dossier, Embedding SDK allows embedding a dashboard in the authoring mode, whether it is during the initial load or in the view mode of the dashboard.
description: To allow users to conveniently edit a dashboard, Embedding SDK allows embedding a dashboard in the authoring mode, whether it is during the initial load or in the view mode of the dashboard.
---

Embedding MicroStrategy content within critical business applications empowers users to make smarter decisions by taking advantage of the dashboard development efforts that occur behind the scenes. To allow users to conveniently edit a dossier, Embedding SDK allows embedding a dashboard in the authoring mode, whether it is during the initial load or in the view mode of the dashboard.
Embedding MicroStrategy content within critical business applications empowers users to make smarter decisions by taking advantage of the dashboard development efforts that occur behind the scenes. To allow users to conveniently edit a dashboard, Embedding SDK allows embedding a dashboard in the authoring mode, whether it is during the initial load or in the view mode of the dashboard.

:::tip

Expand Down
14 changes: 14 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,17 @@ If you are using MicroStrategy 2021 Update 5 or before, make the following chang
1. Restart Tomcat.

For more information, see [Chrome v80 Cookie Behavior and the Impact on MicroStrategy Deployments](https://community.microstrategy.com/s/article/Chrome-v80-Cookie-Behavior-and-the-impact-on-MicroStrategy-Deployments?language=en_US).

## The Partitioned Cookie Change

Before MicroStrategy 2024 Update 6, when the Library server and the client website are in different domains, the Embedding SDK requires third-party cookies to be allowed to work correctly. In the past, Chrome's default setting was only "Block third-party cookies in Incognito mode", so the customer can use Embedding SDK without changing the Chrome settings.

![The default Chrome preference](./images/chrome-preference.png)

However, third-party cookies are on their way out. Google is expected to stop the use of third-party cookies by [2025 Q2](https://developers.google.com/privacy-sandbox/3pcd). At that time, Chrome will block third-party cookies by default, and the customer can't use Embedding SDK unless he changes the Chrome preference to enable the 3rd party cookies manually.

To avoid the changes of third-party cookies default setting breaking the Embedding SDK workflow, we adopt [CHIPS](https://developer.chrome.com/docs/privacy-sandbox/chips/)(Cookies Having Independent Partitioned State) solution to put the Library server's cookie into partitioned storage. The user needs to enable the partitioned cookie in the Library settings to use this solution:

![The partitioned cookie setting](./images/partitioned-cookie.png)

After this change, the customer can use most of the Embedding SDK functionalities even if 3rd party cookies are blocked in the Chrome preference. But for the SAML/OIDC login, the old workflow changes, and the user need to do more to make it work. The details can be seen in [SAML or OIDC authentication after MicroStrategy 2024 Update 6](./support-for-different-authentication-environments/authentication-saml#for-microstrategy-2024-update-6-or-after).
103 changes: 100 additions & 3 deletions docs/embed-bot-consumption-page/embed-bot-consumption-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,31 @@ microstrategy.embeddingContexts.embedBotConsumptionPage({
});
```

### `disableHyper`

<Available since="2024 Update6" />
Use the `disableHyper` boolean value to decide if the hyper extension should highlight the bot consumption page or not

#### Required?

No

#### Default value

undefined

#### Sample

```js
microstrategy.embeddingContexts.embedBotConsumptionPage({
serverUrl: "https://demo.microstrategy.com/MicroStrategyLibrary",
projectId: "B19DEDCC11D4E0EFC000EB9495D0F44F",
objectId: "D9AB379D11EC92C1D9DC0080EFD415BB",
placeholder: document.getElementById("container"),
disableHyper: true,
});
```

### `customUi`

Specifies the custom UI settings on the embedded pages, including MicroStrategy Library home page, bot consumption page,bot authoring page, and report consumption page.
Expand All @@ -319,19 +344,72 @@ Use the `addToLibraryBanner` object to customize the "Add To Library" banner on
- Enable the Library "Add To Library" banner or not. If the banner is disabled in custom application, the true value wouldn’t take effect.
- Default value: `false`.

#### `theme`

<Available since="2024 Update6" />
Use the `theme` object to customize the "theme" in the MicroStrategy Library including bot consumption page. All detailed properties below are `Boolean`.

- `enabled`
- Enable the Library "theme" colors or not. The value can be true or false. If the value isn't defined, the default is true.

##### `botConsumption`

Use the `botConsumption` object to customize UI of the bot consumption page. All detailed properties below are `Boolean`.

- `snapshot.enabled`
- `snapshot.enabled` <Deprecated since="2024 Update6" />

- Enable the snapshot panel on the bot consumption page or not.
- Default value: `true`.

- `topicsPanel.enabled` <Deprecated since="2024 Update6" />

- Enable the topics panel on the bot consumption page or not.
- Default value is undefined, which falls back to true.

- `navigationBar.enabled`

- Enable the navigation bar on the bot consumption page or not.
- Default value: `false`.

- `aiBot` <Available since="2024 Update6" />

- Enable title bars, the snapshot panel, topics panel, chat panel(show clear history, show give topics, show welcome page bot image, should load history, should save to history) on the bot consumption page or not.
- Default value is undefined, which falls back to the following:

```javascript
{
titleBar: {
enabled: true,
},
snapshotPanel: {
enabled: true,
},
topicsPanel: {
enabled: true,
},
chatPanel: {
showClearHistory: true,
showGiveTopics: true,
showWelcomePageBotImg: true,
showCopyBtn: true,
shouldExpandRelatedSuggestionsOnInit: true,
shouldLoadHistory: true,
shouldSaveToHistory: true,
}
}
```

- `aiBot.titleBar.enabled`: This field specifies whether to enable the title bar of chat panel, snapshot panel and topic panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true. However, it's ignored when the field isn't defined or defined as true. Only when the value is false, the title bars of panels are hidden.
- `aiBot.snapshotPanel.enabled`: This field specifies whether to enable the snapshot panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.topicsPanel.enabled`: This field specifies whether to enable the topic panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.showClearHistory`: This field specifies whether to show clear history in the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.showGiveTopics`: This field specifies whether to show give topics in the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.showWelcomePageBotImg`: This field specifies whether to show bot image in the welcome page of the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.showCopyBtn`: This field specifies whether to show copy button in the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.shouldExpandRelatedSuggestionsOnInit`: This field specifies whether to show the related suggestions list in the chat panel as expanded or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.shouldLoadHistory`: This field specifies whether to load chat history in the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.
- `aiBot.chatPanel.shouldSaveToHistory`: This field specifies whether to save chat history in the chat panel on the bot consumption page or not. The value can be true or false. If this field isn't defined, the default is true.

#### Sample

```js
Expand All @@ -344,9 +422,28 @@ microstrategy.embeddingContexts.embedBotConsumptionPage({
addToLibraryBanner: {
enabled: true,
},
theme: {
enabled: false,
},
botConsumption: {
snapshot: {
enabled: false,
aiBot: {
titleBar: {
enabled: false,
},
snapshotPanel: {
enabled: false,
},
topicsPanel: {
enabled: false,
},
chatPanel: {
showClearHistory: false,
showGiveTopics: false,
showWelcomePageBotImg: false,
showCopyBtn: false,
shouldLoadHistory: false,
shouldSaveToHistory: false,
},
},
navigationBar: {
enabled: true,
Expand Down
54 changes: 54 additions & 0 deletions docs/embedding-context/bot-consumption-page-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Bot consumption page APIs
description: Describes which Embedding SDK APIs are available on the MicroStrategy Bot consumption page.
---

The `embedBotConsumptionPage` object is the manipulator of the MicroStrategy dashboard consumption page. It could be got by `embeddingContext.embedBotConsumptionPage`.

The details of the `embeddingContext` object could be seen in [Embedding context](./embedding-context.md).

The APIs under embed botConsumption page object are as below.

### `askQuestion(questionParams)`

#### Description

This API can be used to ask a question to a bot consumption page which is already loaded.
If the bot consumption page is loading then the question will be triggered after it is initialized

#### Class

`BotConsumptionService`

#### Input Parameters

- `questionParams`:

**Data Type**

`object`

**Required?**

Yes

#### Return type

This API would return a Promise object that resolves to nothing.

#### Example

```js
await embeddingContext.botConsumptionService.askQuestion({
questionText: "how are you?",
type: "text",
});
```

#### API errors

This API would report an error in these 3 cases:

- When the whole `questionParams` is not provided.
- When `questionText` is not provided.
- When `type` is not provided.
Loading

0 comments on commit cfebe32

Please sign in to comment.