-
Notifications
You must be signed in to change notification settings - Fork 42
Drive service saves permanent assets as drive files and renders thumbnails on listing and theme-creator #5698
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
Conversation
|
…port theme image linking
…to thumbnail-in-gdrive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's file an issue to remove code duplication and reuse existing blob/base64 primitives we already have in @google-labs/breadboard-ai
const thumbnailUrl = appProperties.thumbnailUrl; | ||
if (thumbnailUrl) { | ||
const thumbnailFileId = getFileId(thumbnailUrl); | ||
const response = await retryableFetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This basically rolls all the fetches into a single call that blocks loading. Ok for now, but I think we will need to figure out how to make this go asynchronously, especially when people have a large number of boards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have a way in mind - return here and fetch from the UI layer after the list is rendered showing generic icons in meanwhile. This is how it's done in the theme generator currently.
There is a small code duplication, but I couldn't find a good place to put it in common, LMK if you have suggestions?