Skip to content

[expo-router][ios] support xcasset in header items#43046

Merged
Ubax merged 1 commit intomainfrom
@ubax/02-10-_expo-router_ios_support_xcasset_in_header_items
Feb 12, 2026
Merged

[expo-router][ios] support xcasset in header items#43046
Ubax merged 1 commit intomainfrom
@ubax/02-10-_expo-router_ios_support_xcasset_in_header_items

Conversation

@Ubax
Copy link
Copy Markdown
Contributor

@Ubax Ubax commented Feb 10, 2026

Why

In #42867, the support for xcassets was added to native tabs. In this PR the same option is added to header items

How

Test Plan

  1. Unit tests
  2. Manual testing
Simulator Screenshot - iPhone 17 Pro - 2026-02-11 at 10 11 27

Checklist

Copy link
Copy Markdown
Contributor Author

Ubax commented Feb 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds iOS support for using Xcode asset-catalog images (.xcassets) as toolbar/header icons in expo-router’s stack toolbar utilities.

Changes:

  • Extend StackToolbarIconProps with a new xcasset option (iOS).
  • Convert StackToolbarIcon xcasset="..." into the corresponding native-stack header icon shape ({ type: 'xcasset', name }).
  • Add/extend iOS test coverage for xcasset conversion behavior (including submenu warning behavior).

Reviewed changes

Copilot reviewed 6 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/expo-router/src/layouts/stack-utils/toolbar/toolbar-primitives.tsx Adds xcasset to the StackToolbarIcon prop union with iOS-focused documentation.
packages/expo-router/src/layouts/stack-utils/toolbar/shared.ts Implements xcasset conversion in shared header-item conversion; adds extractXcassetName.
packages/expo-router/src/layouts/stack-utils/tests/shared.test.ios.tsx Adds tests validating xcasset icon conversion + extractXcassetName behavior.
packages/expo-router/src/layouts/stack-utils/tests/StackToolbarMenu.test.ios.tsx Adds test ensuring submenu warns when xcasset icons are used (non-SF-symbol limitation).
packages/expo-router/src/layouts/stack-utils/tests/StackToolbarButton.test.ios.tsx Adds test ensuring xcasset icon is extracted for header button conversion.
packages/expo-router/build/layouts/stack-utils/toolbar/toolbar-primitives.js.map Build artifact update reflecting new xcasset prop typing/docs.
packages/expo-router/build/layouts/stack-utils/toolbar/toolbar-primitives.d.ts.map Build artifact update reflecting new xcasset prop typing/docs.
packages/expo-router/build/layouts/stack-utils/toolbar/toolbar-primitives.d.ts Build artifact update reflecting new xcasset prop typing/docs.
packages/expo-router/build/layouts/stack-utils/toolbar/shared.js.map Build artifact update reflecting xcasset conversion + new helper export.
packages/expo-router/build/layouts/stack-utils/toolbar/shared.js Build artifact update reflecting xcasset conversion + new helper export.
packages/expo-router/build/layouts/stack-utils/toolbar/shared.d.ts.map Build artifact update reflecting new helper export.
packages/expo-router/build/layouts/stack-utils/toolbar/shared.d.ts Build artifact update reflecting new helper export.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ubax Ubax force-pushed the @ubax/02-10-_expo-router_ios_support_xcasset_in_header_items branch from 8a8b560 to 6b517b1 Compare February 11, 2026 09:13
Copy link
Copy Markdown
Contributor Author

@Ubax Ubax Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file will render as the filled rectangle, because currently there is no way to change the render mode via expo-assets plugin

@Ubax Ubax force-pushed the @ubax/02-10-_expo-router_ios_support_xcasset_in_header_items branch from 6b517b1 to f50ae59 Compare February 11, 2026 09:20
@Ubax Ubax marked this pull request as ready for review February 11, 2026 09:20
@github-actions
Copy link
Copy Markdown
Contributor

Subscribed to pull request

File Patterns Mentions
docs/** @amandeepmittal
packages/expo-router/** @EvanBacon, @Ubax, @hassankhan, @kitten

Generated by CodeMention

@Ubax Ubax requested a review from hassankhan February 11, 2026 09:21
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Feb 11, 2026
@Ubax Ubax force-pushed the @ubax/02-10-_expo-router_ios_support_xcasset_in_header_items branch from f50ae59 to e7d7e38 Compare February 11, 2026 12:25
@Ubax Ubax requested a review from amandeepmittal February 11, 2026 12:27
Copy link
Copy Markdown
Member

@amandeepmittal amandeepmittal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs change lg to me!

@Ubax Ubax merged commit 0070e37 into main Feb 12, 2026
31 checks passed
@Ubax Ubax deleted the @ubax/02-10-_expo-router_ios_support_xcasset_in_header_items branch February 12, 2026 07:16
@alanjhughes alanjhughes added the published Changes from the PR have been published to npm label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants