Open nd0ut opened 3 weeks ago
The recent changes introduce asynchronous operations across various parts of the codebase. The primary focus is on updating methods to use async/await
for handling promises. This shift facilitates better error handling and more straightforward asynchronous control flow, particularly in functions that handle URLs and image processing.
File | Change Summary |
---|---|
abstract/Block.js |
proxyUrl method changed to async with error handling. |
blocks/CloudImageEditor/src/CloudImageEditorBlock.js |
Introduced await before proxyUrl() call for generating cdnUrl . |
blocks/CloudImageEditor/src/EditorFilterControl.js |
Refactored to use async/await ; moved init$ initialization to constructor; updated various event handlers. |
blocks/CloudImageEditor/src/EditorImageCropper.js |
Changed _waitForImage method to be asynchronous. |
blocks/CloudImageEditor/src/EditorImageFader.js |
Multiple methods updated to use async/await for better control flow. |
blocks/EditorToolbar.js |
Made _preloadEditedImage method asynchronous and added await before proxyUrl call. |
blocks/FileItem/FileItem.js |
Added await before proxyUrl call for thumbnail generation. |
types/exported.d.ts |
Updated SecureDeliveryProxyUrlResolver return type to Promise<string> | string . |
sequenceDiagram
participant User
participant CloudImageEditorBlock
participant Block
participant SecureDeliveryProxy
User ->> CloudImageEditorBlock: Request Image Edit
CloudImageEditorBlock ->> Block: Call createCdnUrl()
Block -->> CloudImageEditorBlock: Returns Cdn Url
CloudImageEditorBlock ->> Block: await proxyUrl(cdnUrl)
Block ->> SecureDeliveryProxy: Request Secure Url
SecureDeliveryProxy -->> Block: Returns Secure Url
Block -->> CloudImageEditorBlock: Returns Secure Url
CloudImageEditorBlock -->> User: Edited Image with Secure Url
🐰 In code's wise embrace, changes unfurled,
Async threads weave a more stable world.
URLs now await secure proxy fates,
As images transform and editing elates.
These updates dance with promises made,
Bringing smooth flow to this digital arcade. 🌟
Description
Checklist
Summary by CodeRabbit
New Features
Improvements
Bug Fixes