Skip to content

[pull] main from expo:main#845

Merged
pull[bot] merged 5 commits into
code:mainfrom
expo:main
May 8, 2026
Merged

[pull] main from expo:main#845
pull[bot] merged 5 commits into
code:mainfrom
expo:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 8, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

intergalacticspacehighway and others added 5 commits May 8, 2026 10:31
# Why

Currently a few screenshots are broken in mobile screen and also causing
layout shift when image loads as it has no fixed aspect ratio/size. Same
will be done for Jetpack Compose.
 
<img width="200" height="auto" alt="Screenshot 2026-05-08 at 8 38 08 AM"
src="https://github.com/user-attachments/assets/638bc816-40f3-41fc-8a11-f892a585776a"
/>


<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Adds predefined aspect ratio. landscape (3/2) or portrait (9/16). This
fixes the layout shift. Components are divided in two categories, some
need portrait screenshots (bottomsheet, tabview, contextmenu), and rest
of them work better in landscape.
- Recaptured all the screenshot in the new aspect ratios

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- Tested on different viewport sizes.
- Made sure there's no layout shift when image loads.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

`ExpoModulesJSI` fails to build when `useFrameworks: "static"` when
building React Native from source.

In all other combinations `ExpoModulesJSI` builds without failure.

`Package.swift` finds React headers under `Pods/Headers/Public/<Pod>/`.
Under `useFrameworks: "static"` + `buildReactNativeFromSource: true`,
those directories are empty — each pod compiles as a static framework,
so its headers end up inside `<Pod>.framework/Headers/` instead. The
build then fails on `<jsi/jsi.h>`, `<react/...>`, `<folly/...>`, etc.

Closes #ENG-21087

# How

Fixed this:

1. `Package.swift` — append eight `-I` fallback paths after the existing
 `Pods/Headers/Public/...` entries:
-
`node_modules/react-native/ReactCommon{,/jsi,/runtimeexecutor,/callinvoker}`
 — for `<jsi/...>`, `<react/...>`, `<ReactCommon/...>`.
- `Pods/{RCT-Folly,fmt/include,glog/src,DoubleConversion}` — for the
transitively-included third-party deps.

2. `scripts/generate-modulemap.sh` — write the `jsi` Clang module's
umbrella
header to whichever of `Pods/Headers/Public/React-jsi/jsi/jsi.h` or
`node_modules/react-native/ReactCommon/jsi/jsi/jsi.h` exists.

No explicit `if static_frameworks` branch in either spot — clang
silently ignores `-I` paths that don't exist, and the modulemap
generator picks the first existing candidate. So the fallbacks are
zero-cost no-ops in every
configuration except the one that needs them. 

The path to node_modules/react-native is resolved once in
build-xcframework.sh via Node's
require.resolve("react-native/package.json") and forwarded to
Package.swift and the modulemap generator as RN_ROOT (through env -i),
so the fix works in any node_modules layout (standard apps, pnpm/yarn
workspaces, hoisted monorepos), with a relative-path fallback when node
is unavailable.

# Test-plan

Verified against all three previously-passing cells (no-frameworks +
prebuilt, static + prebuilt, no-frameworks + source-built), the
previously-failing static + source-built cell, and a hoisted-monorepo
simulation where node_modules/react-native only exists at a parent
node_modules/.

# Check-list

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
…ag`s (#45521)

# Why

Resolves #45504

Related to #44781 and #44806

# How

- Bump to `whatwg-url-minimum@0.1.2`, See:
kitten/whatwg-url-minimum#3

# Test Plan

- Unit tested in other repo / similar enough to #44806

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

This was causing our `pnpm-lock.yaml` to basically change
back-and-forth. The unresolved `@types/node` peer of some dependencies
(that really shouldn't define a peer on `@types/node`, which just isn't
right) was causing issues.

The main cause seems to be that `jest` and `ts-node` are installed in
multiple places, but the top-level dependency we have (which we might be
able to remove in the future) had their `@types/node` peer unresolved,
which pnpm wasn't happy about.

# How

Any subsequent dependency could then duplicate `@types/node` to latest,
since the peer is set to `*` if the dependency is rewritten.

I believe we don't have to add a resolution and the top-level
`@types/node` should help. I'm hoping this doesn't cause TypeScript
type-isolation issues down the line though.

Ideally we'd remove `ts-node` and `jest` from being top-level monorepo
deps in the future.

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

Cleanup pass on the universal (web) `expo-ui` components. Inline style
objects rebuilt every render, duplicated style values across variants,
and missing web-only typings made the components harder to maintain and
less performant on web.

# How

<!--
How did you build this feature or fix this bug and why?
-->

- Migrated `Button`, `Checkbox`, `Column`, `FieldGroup` /
`FieldSection`, `Row`, `ScrollView`, `Slider`, `Spacer`, `Switch`, and
`Text` to `StyleSheet.create` with composed style arrays instead of
per-render inline objects.
- Added a local `react-native-web.d.ts` declaration file under
`packages/expo-ui/src/ts-declarations/` to type web-only APIs
(`unstable_createElement`, extended `Role` / `display` values) used by
the universal components.
- Tightened prop handling: default values for `disabled`/`hidden`,
dropped a `useState`-based hover tracker on `Button` in favor of
`Pressable` state styling, added `role="button"`, and reordered props
for consistency.

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

- `pnpm build` and `pnpm lint --max-warnings 0` in `packages/expo-ui`.
- Verified each touched component renders and behaves identically on web
in NCL (hover, disabled, hidden states for `Button`; labelled/disabled
`Switch`; `FieldGroup` / `FieldSection` layout; `ScrollView`, `Slider`,
`Row` / `Column` / `Spacer` spacing).

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit 66940d1 into code:main May 8, 2026
23 of 30 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants