[ios][ui] Add per-axis scaleEffect support to view modifiers#43228
[ios][ui] Add per-axis scaleEffect support to view modifiers#43228amandeepmittal merged 4 commits intoexpo:mainfrom
Conversation
|
Subscribed to pull request
Generated by CodeMention |
8ca0d33 to
9ddcef8
Compare
9ddcef8 to
20684f0
Compare
|
@ramonclaudio thanks for the PR. We can achieve this by passing |
d498c63 to
df37a1b
Compare
df37a1b to
e9a36c4
Compare
|
@intergalacticspacehighway I agree. Reworked it. Removed the inverted prop, docs additions, and native-component-list changes. PR now only touches the modifier layer. |
amandeepmittal
left a comment
There was a problem hiding this comment.
Docs change looks good to me!
|
I've merged this PR since @intergalacticspacehighway already approved it, but if there are any follow-up changes, let me know. Happy to follow up in a separate PR. Thank you for your contirbution @ramonclaudio! |
|
NP! Thank you @amandeepmittal @intergalacticspacehighway |
feat(@expo/ui): add npm/pnpm patches for per-axis scaleEffect (expo/expo#43228)
scaleEffectnow takesnumber | { x: number; y: number }. When passed a number, TS normalizes it to{ x, y }before hitting native. Swift side is a straight pass-through tocontent.scaleEffect(x: x, y: y). Same structure asOffsetModifier(non-optional@Fieldvars with identity defaults, single-line body).Usage: Inverted List
Flip the
Listvertically, flip each row back, reverse the data — messages anchor to the bottom and new content pushes up naturally:Existing
scaleEffect(number)calls still work —scaleEffect(0.5)normalizes to{ x: 0.5, y: 0.5 }.Changes
Only touches modifiers:
src/swift-ui/modifiers/index.ts: union type, typeof dispatch (+2/-1)ios/Modifiers/ViewModifierRegistry.swift:@Field var x/ywith 1.0 defaults (+2/-2)CHANGELOG.md: single entrybuild/type declarations rebuiltTest Plan
yarn clean,yarn lint --fix,yarn lint,yarn buildall pass.yarn testhas no test suites in expo-ui (exits with "No tests found"). Rebased on upstream/main.Existing
scaleEffect(number)calls still work since the TS layer normalizesscaleEffect(0.5)to{ x: 0.5, y: 0.5 }. Per-axis usage:scaleEffect({ x: 1, y: -1 })passesxandydirectly to native.