-
Notifications
You must be signed in to change notification settings - Fork 392
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
CB-4681 fix: content downloading in value panel #2417
CB-4681 fix: content downloading in value panel #2417
Conversation
Line 16 in 9bc6647
cause we can now see image presentation for Blob which are not images in ValuePanel |
...packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx
Outdated
Show resolved
Hide resolved
...packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx
Outdated
Show resolved
Hide resolved
@@ -165,69 +149,81 @@ export class ResultSetDataContentAction extends DatabaseDataAction<any, IDatabas | |||
|
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.
async getFileDataUrl(element: IResultSetElementKey) {
lets make this function private. it is not in use outside of this action scope. moreover, it is easy to mess up with logic:
- use it outside to get link
- forget to put cached link into the cache so we can use it
- have a bug somewhere
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.
fixed
} | ||
}); | ||
|
||
return url; | ||
} | ||
|
||
async resolveFileDataUrl(element: IResultSetElementKey) { | ||
const cachedUrl = this.retrieveFileDataUrlFromCache(element); | ||
const cachedUrl = this.retrieveBlobFromCache(element); | ||
|
||
if (cachedUrl) { | ||
return cachedUrl; | ||
} | ||
|
||
const url = await this.getFileDataUrl(element); |
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 function sets cache loading state as expects
but we have a somekind of freeze in view button cause const blob = await downloadFromURL(url);
below is not handled with loader, I suppose
I've send you the video
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.
will be fixed later
No description provided.