Skip to content
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

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

Wroud
Copy link
Member

@Wroud Wroud commented Feb 26, 2024

No description provided.

@Wroud Wroud self-assigned this Feb 26, 2024
@sergeyteleshev
Copy link
Contributor

- add here something like

return !['application/octet-stream', null].includes(getMIME(value.binary || ''));

cause we can now see image presentation for Blob which are not images in ValuePanel

@sergeyteleshev sergeyteleshev self-requested a review February 27, 2024 11:07
@@ -165,69 +149,81 @@ export class ResultSetDataContentAction extends DatabaseDataAction<any, IDatabas

Copy link
Contributor

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:

  1. use it outside to get link
  2. forget to put cached link into the cache so we can use it
  3. have a bug somewhere

Copy link
Member Author

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);
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

will be fixed later

@serge-rider serge-rider merged commit e4e8fb9 into devel Feb 27, 2024
4 checks passed
@Wroud Wroud deleted the fix/cb-4681/content-downloading-value-panel branch February 28, 2024 06:39
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