Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add option to choose image/video quality like WhatsApp #6316 #6321

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

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

JASIM0021
Copy link
Contributor

@JASIM0021 JASIM0021 commented Apr 25, 2025

Proposed changes

Added a button on the ShareView header to toggle between SD/HD. It can be just a text for now.

Default SD

Issue(s)

#6316
NATIVE-849

How to test or reproduce

Screenshots

Screenshot 2025-04-25 at 16 43 47

Image with HD quality

WhatsApp Image 2025-04-25 at 16 39 20

Same Image with SD quality

WhatsApp Image 2025-04-25 at 16 39 21

video with HD quality

WhatsApp Image 2025-04-25 at 23 08 13

Same video with SD quality

WhatsApp Image 2025-04-25 at 23 08 14

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

@JASIM0021 JASIM0021 requested a review from diegolmello April 25, 2025 18:27
@JASIM0021 JASIM0021 requested a review from diegolmello April 26, 2025 14:13
@diegolmello
Copy link
Member

@JASIM0021 Is it working when sharing from share extension?

This change enables users to share media in its original, uncompressed quality via the share extension.  It also removes  plugin on app.json since it's not used anymore.
…t.Chat.ReactNative into feat/add_option_to_image
@JASIM0021
Copy link
Contributor Author

JASIM0021 commented Apr 28, 2025

@JASIM0021 Is it working when sharing from share extension?

@diegolmello Yes, it is working correctly when sharing from the share extension.

Here’s a demonstration:

poc_with_share.mov

@diegolmello
Copy link
Member

@JASIM0021 Awesome.
Make sure to do an output comparison of the same image uploaded both on SD and HD.
We should check size and quality.
Post a comment with it.

@JASIM0021
Copy link
Contributor Author

@JASIM0021 Awesome. Make sure to do an output comparison of the same image uploaded both on SD and HD. We should check size and quality. Post a comment with it.

@JASIM0021 Awesome. Make sure to do an output comparison of the same image uploaded both on SD and HD. We should check size and quality. Post a comment with it.

Using SD with share extension

WhatsApp Image 2025-04-28 at 21 49 59

Using HD with share extension

WhatsApp Image 2025-04-28 at 21 49 58

@JASIM0021 JASIM0021 requested a review from diegolmello April 28, 2025 16:42
@diegolmello
Copy link
Member

@JASIM0021 Looking good!
We're just designing the SD/HD toggle icons and we're going to update your PR.
We've been also discussing if we should save the user choice on MMKV, so it's saved for future uploads.

We can take it from here.
It may not land on this month's release. Probably end of May.
Thanks for your contribution 👊🏼

@JASIM0021
Copy link
Contributor Author

@JASIM0021 Looking good! We're just designing the SD/HD toggle icons and we're going to update your PR. We've been also discussing if we should save the user choice on MMKV, so it's saved for future uploads.

We can take it from here. It may not land on this month's release. Probably end of May. Thanks for your contribution 👊🏼

Thanks for the update!
Appreciate the heads-up on the timeline—glad to contribute!

@diegolmello

@diegolmello
Copy link
Member

@JASIM0021 we've already made a decision regarding MMKV and I think you can do it to make sure this is merged faster.

  • Rename this option to Media
    title='Media_auto_download'
  • Add a title here
    • <List.Section title='Media_auto_download'> should do it
  • Add a new List.Section above it for Media quality, similar to Media auto download
  • The options are (List.Item title and subtitle)
    • Standard: Faster to send, smaller file size
    • High definition: Slower to send, can be a few times larger
  • Add a List.Info with Choose the quality of media files to be sent
  • Read useUserPreferences usage to understand how to implement this. It's very straightforward.

Thanks!

@jeanfbrito
Copy link

jeanfbrito commented Apr 28, 2025

gif

@JASIM0021
Copy link
Contributor Author

@diegolmello Thank you for your words! 🚀
I'm fully energised and on it. I'll make the necessary changes and push for updates as soon as possible.

@JASIM0021
Copy link
Contributor Author

@diegolmello @jeanfbrito Done ✅.
All requested changes have been implemented. Please review when you have time. Thanks!

ezyZip.mp4

This commit introduces a media quality setting, allowing users to choose between standard and high definition for media files. It also refactors code to use the  and  types from a single source.
@JASIM0021 JASIM0021 requested a review from diegolmello April 29, 2025 13:52
@diegolmello
Copy link
Member

@JASIM0021 Going to focus back on this after the release, which should happen this Monday

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