Skip to content

Commit

Permalink
Update README and regenerated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bryans99 committed Jan 16, 2025
1 parent b478e4c commit 16ad381
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 87 deletions.
61 changes: 1 addition & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Embed SDK version 2.0.0

The following document has been updated to reflect the usage of Embed SDK 2.0.0. The API associated with Embed SDK 1.8.x is still available but in order to take advantage of features added to Embed SDK 2.0.0 an embedding application will need to refactored slightly. See the section [Upgrading to Embed SDK 2.0.0](#upgrading_sdk) for more information.
The following document has been updated to reflect the implementation of Embed SDK 2.0.0. Technically the 2.0.0 API is backwards compatible with Embed SDK 1.8.x but the underlying implementation has changed for some functionality. SDK 1.8.x exported a number of classes. SDK 2.0.0 replaces these classes with deprecated interfaces. It is preferred that application that uses the SDK use the 'I' prefixed interfaces (which are identical to the non prefixed interaces). Applications upgrading to SDK 2.0.0 should behave the same. In order to take advantage of the API improvements some refactoring will be required.

## Introduction

Expand Down Expand Up @@ -696,62 +696,3 @@ const connection = await getEmbedSDK()
```
This functionality is also available to the javascript API. See [here](demo/message_example.ts) for how to add this functionality.
<a name='ugrading_sdk' id='upgrading_sdk'></a>
## Upgrading to Embed SDK 2.0.0
Embed SDK 2.0.0 is not a breaking change as upgrading the package will NOT break an existing embedded application as the version `1.8.x` API still exists in and has not been removed from the package. It will however be removed in a future release.
In order to take advantage of the new features (loading different Looker dashboards, looks and explores without creating a new IFRAME), the embedding application will need to refactored slightly. The section of the document outlines the changes that will need to be made.
### SDK Initialization
```javascript
// Version 1.8.x
LookerEmbedSDK.init('looker.example.com', '/auth')

// Version 2.0.x
getEmbedSDK().init('looker.example.com', '/auth')
```
### Creating and interacting with an IFRAME
```javascript
// Version 1.8.x
try {
const dashboard = await LookerEmbedSDK
.createDashboardWithId('42)
.withAllowAttr('fullscreen')
.appendTo('#dashboard')
.on('dashboard:loaded', () => updateStatus('Loaded'))
.build()
.connect()
dashboard.run()
} catch(error) {
// Error handling
}
// Version 2.0.x
try {
const connection = getEmbedSDK()
.createDashboardWithId('42)
.withAllowAttr('fullscreen')
.appendTo('#embed_container')
.on('dashboard:loaded', () => updateStatus('Loaded'))
.build()
.connect()

// The following still works but is deprecated and will be
// removed if a future release
connection.run()

// The following is the preferred mechanism running a dashboard.
// There are equivalent methods for explores (asExploreConnection)
// and looks (asLookConnection).
connection.asDashboardConnection().run()
} catch(error) {
// Error handling
}
```
7 changes: 0 additions & 7 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
--dark-hl-9: #4EC9B0;
--light-hl-10: #000000FF;
--dark-hl-10: #D4D4D4;
--light-hl-11: #CD3131;
--dark-hl-11: #F44747;
--light-code-background: #F5F5F5;
--dark-code-background: #1E1E1E;
}
Expand All @@ -39,7 +37,6 @@
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
} }

Expand All @@ -55,7 +52,6 @@
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
} }

Expand All @@ -71,7 +67,6 @@ body.light {
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
}

Expand All @@ -87,7 +82,6 @@ body.dark {
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
}

Expand All @@ -102,5 +96,4 @@ body.dark {
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
.hl-10 { color: var(--hl-10); }
.hl-11 { color: var(--hl-11); }
pre, code { background: var(--code-background); }
Loading

0 comments on commit 16ad381

Please sign in to comment.