Skip to content

feat: Embed SDK 2.0 #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 99 commits into from
Apr 29, 2025
Merged

feat: Embed SDK 2.0 #210

merged 99 commits into from
Apr 29, 2025

Conversation

bryans99
Copy link
Collaborator

No description provided.

@bryans99
Copy link
Collaborator Author

The beginnings of Embed SDK 2.0.

Very much a WIP but I want to get a backup

2. Upgrade karma type script packages.
3. Update documentation.
4. Reduce exposed embed sdk 2.0.0 classes to the minumum.
5. Update version to 2.0.0
6. Fix minor issue with comment in demo.
7. Correct copyright dates.
   out code.
2. Fix internal event handler setup so that users of the sdk can
   listen to events (internal event handler was overwriting handlers
   added with "on".
3. Fix cookieless login. Incorrect separator used.
4. Fix asLookConnection return type. Was ILookerEmbedExtension. Now
   is ILookerEmbedLook (copy pasta error).
5. Fix LookerEmbedSDKFactory constructor input type. Now is interface.
6. Initial karma tests for 2.0.
2. Various fixes for issues found while writing tests for
   LokerEmbedExSDK
2. Add more withApiHost and withAuth tests to LookerEmbedExSDK tests
3. Hide internal properties and methods from documentation
4. Regenerate documentation
2. LookerEmbedExSDK test update
3. doc cleanup
4. Clean up function names
5. Remove unnecessary assertions
6. Clean up generateTokens error handling
7. Fix appendRequiredParameters processing for sandboxed host
8. Add clarifying comments for sandboxed host
9. Fix connect for private embed
10. Fix isCookielessEmbed check (replaces assertions)
2. Update docs to reflect generatTokens change
   does not support it)
2. fix generateTokens handling of fetch init object
3. clean up generate error handling
4. correct initCookieless generateTokens typing
5. more EmbedClientEx tests
2. Updated documentation to reflect removed method
3. EmbedConnection.loadUrl method is the only method for setting
   default values for pushHistory and waitUntilLoaded
4. DashbordConnection tests
5. Updated EmbedClientEx tests to spy on mocks instead of
   connection. Spy ons now callThrough.
6. EmbedConnection tests
7. Add mock sendAndReceive method
2. ExploreConnection test
3. ExtensionConnection test
4. LookConnection test
   SDK.
2. Rename original demo to multi frame demo
3. Rename new demo to single frame demo
4. Change title of message example tp Embed Message API Demo
2. use auto gen cert for npm start
Copy link
Contributor

@jkaster jkaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are still more readme changes pending?

jkaster
jkaster previously approved these changes Apr 3, 2025
Copy link
Contributor

@jkaster jkaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update for certs

jkaster
jkaster previously approved these changes Apr 3, 2025
2. Embed sdk sanitizes the URL before determining the page type
3, createLookWithId accepts a string and a number
4. Increased test coverage
5. Added history fallback to dev and demo servers
6. Added history support to demo.
7. Updated docs
jkaster
jkaster previously approved these changes Apr 6, 2025
jkaster
jkaster previously approved these changes Apr 6, 2025
@bryans99 bryans99 changed the title feat: Embed SDK 2.0 Development (wip) feat: Embed SDK 2.0 Development Apr 28, 2025
@bryans99 bryans99 changed the title feat: Embed SDK 2.0 Development feat: Embed SDK 2.0 Apr 28, 2025
Co-authored-by: John Kaster <[email protected]>
jkaster
jkaster previously approved these changes Apr 29, 2025
Copy link
Contributor

@jkaster jkaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking suggestions on the README


The _frontend_ process using the Embed SDK entails:
In order to use the Embed SDK on the frontend you must supply a backend service that handles signing of the Embed URL. This service is called by the Embed SDK to generate a signed URL that is unique to the requesting user. The backend process can either generate the signed embed URL itself using an embed secret or can generate the URL by calling the [Looker Create Signed Embed URL API](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Auth/create_sso_embed_url). Manual URL generation and signing avoids calling the Looker API resulting in decreased latency. Calling the Looker API requires less code and is easier to maintain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to use the Embed SDK on the frontend you must supply a backend service that handles signing of the Embed URL. This service is called by the Embed SDK to generate a signed URL that is unique to the requesting user. The backend process can either generate the signed embed URL itself using an embed secret or can generate the URL by calling the [Looker Create Signed Embed URL API](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Auth/create_sso_embed_url). Manual URL generation and signing avoids calling the Looker API resulting in decreased latency. Calling the Looker API requires less code and is easier to maintain.
In order to use the Embed SDK on the frontend you must supply a backend service that handles signing of the Embed URL. This service is called by the Embed SDK to generate a signed URL that is unique to the requesting user. The backend process can either generate the signed embed URL itself using an embed secret or can generate the URL by calling the [Looker Create Signed Embed URL API](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Auth/create_sso_embed_url). Manual URL generation and signing avoids calling the Looker API, resulting in decreased latency. Calling the Looker API requires less code and is easier to maintain.

Not a blocker

Co-authored-by: John Kaster <[email protected]>
bryans99 and others added 3 commits April 29, 2025 07:51
Co-authored-by: John Kaster <[email protected]>
Co-authored-by: John Kaster <[email protected]>
Copy link

@ryandunlavy ryandunlavy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bryans99 bryans99 merged commit 9ef9bf7 into master Apr 29, 2025
6 checks passed
@bryans99 bryans99 deleted the bnr/development-2.0 branch April 29, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants