Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(android): Setting String Value to Width And Height #10668

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 2 commits into
base: main
Choose a base branch
Loading
from

Conversation

db-r-hashimoto
Copy link

PR Checklist

What is the current behavior?

Currently, when a string value is assigned to the width or height property of ImageAssetOptions, an error occurs on Android. This issue prevents users from specifying these properties as strings, which can be problematic in scenarios where string-based dimensions are used.

What is the new behavior?

With this update, assigning a string value to the width or height property of ImageAssetOptions no longer results in an error on Android. The system now properly handles string-based dimensions, providing a more flexible and consistent experience for users.

Fixes/Implements/Closes #6289 .

@CatchABus
Copy link
Contributor

CatchABus commented Jan 17, 2025

Let me point out that this looks like a requested feature.
Docs and TypeScript definitions (even if you use JavaScript) indicate that options will expect a type of number for dimensions so as long as you use it the right way, it will work.
Also, you can always make use of functions like parseInt or parseFloat to pass the value as a number.
Regarding the error, core could also be strict and print a warning message about it instead to let users know that one has to use numeric values.

Few things to point out:

  • Some linting rules like single quotes aren't being followed.

@db-r-hashimoto
Copy link
Author

@CatchABus Strings should use single quotes, as per the coding conventions outlined here. I'll fix it accordingly.

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.

Setting string value to width or height of ImageAssetOptions results in an error on android
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.