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

[image-manipulator] Introduce a new API for image manipulation on Web #30194

Merged
merged 4 commits into from
Jul 5, 2024

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented Jul 4, 2024

Why

Following up on #30135

How

Implemented the new API for expo-image-manipulator on Web, added tests to test-suite and fixed a few small things

Test Plan

For both legacy and the new API, NCL examples and tests work fine

@expo-bot
Copy link
Collaborator

expo-bot commented Jul 4, 2024

The Pull Request introduced fingerprint changes against the base commit: 3bcb234

Fingerprint diff
[
  {
    "op": "changed",
    "source": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid"
      ],
      "hash": "8a34008159f55e3f7b9ec93bb08729d0f671fdfe"
    }
  }
]

Generated by PR labeler 🤖

Base automatically changed from @tsapeta/ios/image-manipulator-new-api to main July 4, 2024 17:06
An error occurred while trying to automatically change base from @tsapeta/ios/image-manipulator-new-api to main July 4, 2024 17:06
@tsapeta tsapeta force-pushed the @tsapeta/web/image-manipulator-new-api branch from 87b8493 to 11cfcfc Compare July 4, 2024 18:15
@tsapeta tsapeta force-pushed the @tsapeta/web/image-manipulator-new-api branch from 11cfcfc to 672109d Compare July 4, 2024 18:17
@expo-bot
Copy link
Collaborator

expo-bot commented Jul 4, 2024

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against d74a426

Copy link
Member Author

Choose a reason for hiding this comment

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

This has been renamed to *.ts, but git shows it as deleted 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

This file now contains equivalent tests but for the new API, the previous one are described as ImageManipulator (Legacy)

Copy link
Member Author

Choose a reason for hiding this comment

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

Everything was just moved from ExpoImageManipulator.web.ts to here

@@ -95,7 +95,7 @@ class SharedObject<TEventsMap extends Record<never, never>>
implements SharedObjectType
{
release(): void {
throw new Error('Method not implemented.');
// no-op on Web, but subclasses can override it if needed.
Copy link
Member Author

Choose a reason for hiding this comment

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

We shouldn't throw from here by default as some methods (especially hooks like useReleasingSharedObject) can call this and catching the errors doesn't seem reasonable

@tsapeta tsapeta marked this pull request as ready for review July 5, 2024 09:18
@tsapeta tsapeta merged commit 536ad0f into main Jul 5, 2024
11 checks passed
@tsapeta tsapeta deleted the @tsapeta/web/image-manipulator-new-api branch July 5, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants