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

[New Lib] heic2any #35798

Closed
BartoszGrajdek opened this issue Feb 5, 2024 · 12 comments
Closed

[New Lib] heic2any #35798

BartoszGrajdek opened this issue Feb 5, 2024 · 12 comments
Assignees
Labels
AutoAssignerAppLibraryReview Auto assign someone to review a new library being added to App Weekly KSv2

Comments

@BartoszGrajdek
Copy link
Contributor

Name of library: heic2any

Details

We want to handle previews of image files, HEIC files included which are not fully supported yet.

Recently we have added expo-image to the project, this allows us to handle HEIC files on Android & iOS, but unfortunately web/desktop is still not supported (docs).

Now we have discussed a few possibilities (here's the Slack thread), but in the end settled on using expo-image we already have in the project for mobile and heic2any on web/desktop. This way we won't change the mobile bundle size and have all devices with working previews.

  • Number of stars in GH: 519
  • Number of monthly downloads: ~370k in the last month
  • Number of releases in the last year: 1
  • Level of activity in the repo: low - 17 open issues, 0 open PRs
  • Alternatives:

The main alternative (it's ~0.4MB bigger) we could consider using is libheif, but the problem is that it's written in C++ and it's not providing any easy-to-use JS bundle. To utilize it we would need to set up a custom way to include it in our project i.e. using web assembly.

  • Are security concerns brought up and addressed in the library's repo?
    Not that I know of, but this is not the type of library that would raise any security concerns.
  • How many dependencies does this lib use that will be brought into our code?
    0
  • What will the effect be on the bundle size of our code?
    This library would add 1.3MB to web & desktop bundles, but since won't use it on mobile we want to make sure it doesn't affect iOS/android bundle sizes.
@BartoszGrajdek BartoszGrajdek added AutoAssignerAppLibraryReview Auto assign someone to review a new library being added to App Weekly KSv2 labels Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

Triggered auto assignment to @Julesssss (AutoAssignerAppLibraryReview), see https://stackoverflowteams.com/c/expensify/questions/17737 for more details.

Copy link

melvin-bot bot commented Feb 5, 2024

New Library Review

  • Are all the answers in the main description filled out properly and make sense?
  • Who maintains the library and how well is it maintained?
  • How viable are the alternatives?
  • Should we build it ourselves instead?

Once these questions are answered, start a thread in #engineering-chat, ping the @app_deployers group, and call for a vote to accept the new library. Once the vote is complete, update this issue with the outcome and procede accordingly. Here is a sample post:

Hey @app_deployers,

There is a request to add a new library to App that we need to consider. Please look at this GH and then vote :+1: or :-1: on accepting this new library or not.

GH_LINK

@Julesssss
Copy link
Contributor

Hi @BartoszGrajdek, before we discuss the library can you comment on the linked issue and add a proposal for how this resolves the issue? Thanks.

@Julesssss
Copy link
Contributor

Reading through the discussion here it looks positive, but I'll need to share a brief overview comment and tag the internal team.

@BartoszGrajdek
Copy link
Contributor Author

@Julesssss done 😄 #12531 (comment)

@Julesssss
Copy link
Contributor

Proposal for solution

  • Are all the answers in the main description filled out properly and make sense?
  • Who maintains the library and how well is it maintained?
  • How viable are the alternatives?
    • Not viable. We'd have to ignore a major issue where we don't support images on certain platforms. Or we'd have to implement backend logic with unnecessarily complicated logic
  • Should we build it ourselves instead?
    • No. Lets save our time and rely on a widely used existing solution.

@Julesssss
Copy link
Contributor

Here's the Slack vote

@Julesssss
Copy link
Contributor

Tagging @Expensify/mobile-deployers again, as the final vote will be on this issue.

@Julesssss
Copy link
Contributor

After a good discussion, we are aligned on not implementing the library and not trying to solve the problem with an alternative solution.

We'll do nothing for now as this is an edge case with solutions relying on workarounds, large libraries, and non-cross-platform solutions.

Closing this issue.

@Beamanator
Copy link
Contributor

Reopening b/c we have a new request to use this library here: #47078 (comment)

I am working on writing this up in Slack today 🙏

@Beamanator Beamanator reopened this Nov 13, 2024
@Julesssss
Copy link
Contributor

@Beamanator can you create a new issue for the updated conversation please

@Beamanator
Copy link
Contributor

Surrreeeeeeeeeeeee nothingmoreintheworldthati'dratherdoooooooooooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerAppLibraryReview Auto assign someone to review a new library being added to App Weekly KSv2
Projects
None yet
Development

No branches or pull requests

3 participants