-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Improve handling of invalid DimensionValue usage #36346
Conversation
This pull request was exported from Phabricator. Differential Revision: D43153075 |
Summary: Pull Request resolved: facebook#36346 1. Remove Paper native assertions for converting DimensionValue string to Yoga unit, and fix a case where Fabric could throw on invalid value. 2. Move DimensionValue types in TypeScript to use template literal types, to show malformed strings in-editor, during typechecking. Update min TS version to allow this (in conformance with the min TS version used by DefinitelyTyped). Changelog: [General][Added] - Improve handling of invalid DimensionValue usage Differential Revision: D43153075 fbshipit-source-id: 84ca0e1fca88c97b44482e8e98d07c918a12bea1
Base commit: 71157f6 |
de9fc7c
to
324464f
Compare
This pull request was exported from Phabricator. Differential Revision: D43153075 |
This pull request has been merged in 02e29ab. |
Summary: ## Changelog: [General][Fixed] - facebook#36346 added some typing improvements, however there was a typo in `AnimatableStringValue` type definition, that broke tests on CI. Reviewed By: cortinico, cipolleschi, hoxyq Differential Revision: D43770412 fbshipit-source-id: dc54a3593989050f5680c67c67fb61ed7d367c2f
Summary: Pull Request resolved: #36366 ## Changelog: [General][Fixed] - #36346 added some typing improvements, however there was a typo in `AnimatableStringValue` type definition, that broke tests on CI. Reviewed By: cortinico, cipolleschi, hoxyq Differential Revision: D43770412 fbshipit-source-id: 7b4f234b5cf04df9271e0c98cf51655c87e3bebb
Summary: Pull Request resolved: facebook#36346 1. Remove Paper native assertions for converting DimensionValue string to Yoga unit, and fix a case where Fabric could throw on invalid value. 2. Move DimensionValue types in TypeScript to use template literal types, to show malformed strings in-editor, during typechecking. Update min TS version to allow this (in conformance with the min TS version used by DefinitelyTyped). Changelog: [General][Added] - Improve handling of invalid DimensionValue usage Reviewed By: javache Differential Revision: D43153075 fbshipit-source-id: db4e813df6e81cbd3158edad7c07c7a90c009803
Summary: Pull Request resolved: facebook#36366 ## Changelog: [General][Fixed] - facebook#36346 added some typing improvements, however there was a typo in `AnimatableStringValue` type definition, that broke tests on CI. Reviewed By: cortinico, cipolleschi, hoxyq Differential Revision: D43770412 fbshipit-source-id: 7b4f234b5cf04df9271e0c98cf51655c87e3bebb
@NickGerleman doesn't DimensionValue also support px strings eg. |
As of today, no. Please see:
There are some caveats. I think under the new architecture, the parser might end up being more permissive, and interpret anything starting with a number as a px value.
|
Summary:
Changelog:
[General][Added] - Improve handling of invalid DimensionValue usage
Differential Revision: D43153075