react-native icon indicating copy to clipboard operation
react-native copied to clipboard

JS plumbing to get filters into native

Open joevilches opened this issue 1 year ago • 3 comments

Summary: This is the JS plumbing to get it so that views can now use filters. The typing looks like

filter: [{brightness: 1.5}, {hueRotate: '90deg'}]

which is different than web which would look like filter: brightness(1.5) hue-rotate(90deg). I feel like the web version is overly complicated and not very react native-y. Transform uses the array based approach (albeit they also accept a string). Open to changing this but really feel like the web format is silly and bad since it would just involve parsing some arbitrary string.

The diff includes:

  • Style sheet changes so typing is valid
  • Process function to turn filter format into {name: string, amount: string}
  • Test for process function
  • View config changes on Android, iOS and ReactNativeStyleAttributes

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D56845572

joevilches avatar May 07 '24 21:05 joevilches

This pull request was exported from Phabricator. Differential Revision: D56845572

facebook-github-bot avatar May 07 '24 21:05 facebook-github-bot

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,496,261 +1,007
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,868,016 +469
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: be09d12667044f237f08af410b2838062eb8e657 Branch: main

analysis-bot avatar May 07 '24 21:05 analysis-bot

This pull request was exported from Phabricator. Differential Revision: D56845572

facebook-github-bot avatar May 07 '24 22:05 facebook-github-bot

This pull request has been merged in facebook/react-native@0dceac9f02c337d9f5d9f15bb4257ad69b1ebc4e.

facebook-github-bot avatar May 08 '24 20:05 facebook-github-bot