Skip to content

feat(expo): Part 1 - add native logo max height theme option#9154

Open
swolfand wants to merge 3 commits into
mainfrom
sam/mobile-590-expose-native-logoapp-icon-size-in-expo-theme-config
Open

feat(expo): Part 1 - add native logo max height theme option#9154
swolfand wants to merge 3 commits into
mainfrom
sam/mobile-590-expose-native-logoapp-icon-size-in-expo-theme-config

Conversation

@swolfand

@swolfand swolfand commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a logoMaxHeight prop to Expo's native AuthView
  • forward the prop through the Android and iOS native view bridges
  • preserve the configured Android theme while overriding ClerkDesign.logoMaxHeight for that AuthView
  • apply the value through .clerkAppIcon(maxHeight:) on iOS
  • add prop-forwarding coverage and a patch changeset

Why

The native Clerk Android and iOS SDKs support configuring the managed application logo height, but Expo apps could not pass that value to AuthView.

Because the setting only affects authentication screens, it is exposed as a component prop rather than as part of the global native theme configuration:

<AuthView logoMaxHeight={64} />
simulator_screenshot_B014A7EA-7CC6-4F73-8E35-8E2FE6E4433A image

Summary by CodeRabbit

  • New Features

    • Added an optional logoMaxHeight setting to Expo’s native AuthView.
    • Developers can control the maximum logo height on both Android and iOS.
    • The setting supports density-independent pixels and defaults to 44.
  • Tests

    • Added coverage confirming the logo height setting is passed to the native authentication view.

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 87eef36

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 14, 2026 7:32pm
swingset Ready Ready Preview, Comment Jul 14, 2026 7:32pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: f93a0b84-00c4-4a9d-a540-d2a744e815ab

📥 Commits

Reviewing files that changed from the base of the PR and between c2056f8 and 87eef36.

📒 Files selected for processing (1)
  • packages/expo/ios/ClerkAuthNativeView.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/expo/ios/ClerkAuthNativeView.swift

📝 Walkthrough

Walkthrough

Expo AuthView gains an optional logoMaxHeight prop, forwards it through native interfaces, and applies it to Android theme configuration and iOS logo rendering. Tests verify JavaScript-to-native prop forwarding, and a patch changeset documents the feature.

Changes

Expo logo height support

Layer / File(s) Summary
AuthView prop contract and forwarding
packages/expo/src/native/..., packages/expo/src/specs/..., packages/expo/src/native/__tests__/..., .changeset/...
AuthView documents and forwards optional logoMaxHeight, native prop types expose it for both platforms, and tests verify forwarding.
Android logo height theming
packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
The Android module accepts logoMaxHeight, updates ClerkTheme.design.logoMaxHeight, and passes the derived theme to AuthView.
iOS logo height rendering
packages/expo/ios/ClerkAuthNativeView.swift, packages/expo/ios/ClerkNativeBridge.swift
The iOS native view stores and forwards logoMaxHeight, while the wrapper conditionally applies clerkAppIcon(maxHeight:).

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AuthView
  participant NativeClerkAuthView
  participant ClerkAuthViewModule
  participant ClerkInlineAuthWrapperView
  AuthView->>NativeClerkAuthView: Forward logoMaxHeight
  NativeClerkAuthView->>ClerkAuthViewModule: Set native prop
  ClerkAuthViewModule->>ClerkInlineAuthWrapperView: Pass platform configuration
  ClerkInlineAuthWrapperView->>ClerkInlineAuthWrapperView: Apply max-height logo rendering
Loading

Suggested reviewers: mikepitre, wobsoriano

Poem

A rabbit hops with logos bright,
Capped to fit just right.
Android themes and iOS views,
Carry the height through native queues.
“Patch it!” says the bunny—what a sight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding native logo max-height support for Expo auth theming.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9154

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9154

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9154

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9154

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9154

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9154

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9154

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9154

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9154

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9154

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9154

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9154

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9154

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9154

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9154

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9154

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9154

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9154

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9154

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9154

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9154

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9154

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9154

commit: 87eef36

@swolfand swolfand changed the title feat(expo): add native logo max height theme option feat(expo): Part 1 - add native logo max height theme option Jul 14, 2026
@swolfand swolfand marked this pull request as ready for review July 14, 2026 16:56
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-14T19:33:17.608Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 1

@clerk/expo

Current version: 3.7.4
Recommended bump: MINOR → 3.8.0

Subpath ./native

🟢 Additions (1)

Added: AuthViewProps.logoMaxHeight
+ logoMaxHeight?: number;

Added property AuthViewProps.logoMaxHeight


Report generated by Break Check

Last ran on 87eef36.

@mikepitre

mikepitre commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Is this approach better than a param on the AuthView? This feels very AuthView specific to be sticking in the theme

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/expo/src/__tests__/appPlugin.theme.test.js (1)

128-135: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add coverage for the zero boundary.

Since validation explicitly allows non-negative values, add logoMaxHeight: 0 to a valid-input test to guard the lower boundary.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/expo/src/__tests__/appPlugin.theme.test.js` around lines 128 - 135,
Add logoMaxHeight: 0 to an existing valid-input test for validateThemeJson,
ensuring the zero boundary is covered as an accepted non-negative value while
preserving the current invalid-input cases.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/expo/src/__tests__/appPlugin.theme.test.js`:
- Around line 128-135: Add logoMaxHeight: 0 to an existing valid-input test for
validateThemeJson, ensuring the zero boundary is covered as an accepted
non-negative value while preserving the current invalid-input cases.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d09edc0e-d13c-4c95-bd97-2a4106077ecc

📥 Commits

Reviewing files that changed from the base of the PR and between 1de44bf and 911b259.

📒 Files selected for processing (5)
  • .changeset/expo-native-logo-max-height.md
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/app.plugin.js
  • packages/expo/ios/ClerkNativeBridge.swift
  • packages/expo/src/__tests__/appPlugin.theme.test.js

@wobsoriano wobsoriano self-requested a review July 14, 2026 17:59
@swolfand

Copy link
Copy Markdown
Contributor Author

@mikepitre good call, switched that

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/expo/src/native/AuthView.tsx`:
- Around line 40-45: Validate logoMaxHeight in AuthView before passing it to
either native implementation: reject or coerce values that are non-finite or
negative, while preserving valid values. Add coverage for non-finite and
negative inputs, confirming invalid values never cross the native bridge.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ae113a9-e40d-489b-825b-5c21a4881f57

📥 Commits

Reviewing files that changed from the base of the PR and between 911b259 and c2056f8.

📒 Files selected for processing (10)
  • .changeset/expo-native-logo-max-height.md
  • packages/expo/.npmrc
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/ios/ClerkAuthNativeView.swift
  • packages/expo/ios/ClerkNativeBridge.swift
  • packages/expo/src/native/AuthView.tsx
  • packages/expo/src/native/AuthView.types.ts
  • packages/expo/src/native/__tests__/AuthView.test.tsx
  • packages/expo/src/specs/NativeClerkAuthView.android.ts
  • packages/expo/src/specs/NativeClerkAuthView.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/expo-native-logo-max-height.md

Comment on lines +40 to +45
export function AuthView({
mode = 'signInOrUp',
isDismissible = true,
logoMaxHeight,
onDismiss,
}: AuthViewProps): ReactElement {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant file and nearby references
git ls-files 'packages/expo/src/native/AuthView.tsx' 'packages/expo/**' | sed -n '1,120p'

echo
echo "== AuthView.tsx =="
cat -n packages/expo/src/native/AuthView.tsx | sed -n '1,220p'

echo
echo "== Search for logoMaxHeight =="
rg -n "logoMaxHeight" packages/expo -S

echo
echo "== Search for AuthViewProps =="
rg -n "type AuthViewProps|interface AuthViewProps|AuthViewProps" packages/expo -S

Repository: clerk/javascript

Length of output: 11533


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== AuthView props =="
cat -n packages/expo/src/native/AuthView.types.ts | sed -n '1,180p'

echo
echo "== iOS Auth view =="
cat -n packages/expo/ios/ClerkAuthNativeView.swift | sed -n '1,180p'

echo
echo "== Android Auth view =="
cat -n packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt | sed -n '1,220p'

echo
echo "== Native spec =="
cat -n packages/expo/src/specs/NativeClerkAuthView.ts | sed -n '1,120p'
echo
cat -n packages/expo/src/specs/NativeClerkAuthView.android.ts | sed -n '1,120p'

Repository: clerk/javascript

Length of output: 11312


Validate logoMaxHeight before forwarding it to native.

It’s passed through unchanged, and both native implementations use it directly. Reject or coerce non-finite or negative values before crossing the bridge, and add coverage for invalid inputs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/expo/src/native/AuthView.tsx` around lines 40 - 45, Validate
logoMaxHeight in AuthView before passing it to either native implementation:
reject or coerce values that are non-finite or negative, while preserving valid
values. Add coverage for non-finite and negative inputs, confirming invalid
values never cross the native bridge.

Source: Coding guidelines

@mikepitre mikepitre requested a review from seanperez29 July 14, 2026 18:54
setNeedsHostedViewUpdate()
}

func setLogoMaxHeight(_ logoMaxHeight: Double?) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can this parameter directly take a CGFloat? instead of conversion after?

Comment thread packages/expo/.npmrc Outdated
@@ -0,0 +1 @@

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can this be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants