Skip to content

fix(mobile): stretch context menu content to full width - #767

Merged
guytepper merged 1 commit into
mainfrom
guytepper/fix-ios-list-padding
Sep 11, 2026
Merged

guytepper merged 1 commit into
mainfrom
guytepper/fix-ios-list-padding

Conversation

@guytepper

Copy link
Copy Markdown
Member

Since the Expo SDK 57 upgrade (@expo/ui 57.0.15), content wrapped in a native context menu shrinks to its own width. On iOS this left route cards off-center, with a large gap on one side. Favorite route boxes and the fares profile picker were affected too, and the picker on Android as well.

Adds a fillWidth prop to ContextMenu that gives the content the container's width, and uses it in those three places.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: f3baa031-427e-4c9d-9e6e-bcb1d3e90006

📥 Commits

Reviewing files that changed from the base of the PR and between fad4906 and 0ea0c11.

📒 Files selected for processing (7)
  • apps/mobile/src/components/context-menu/context-menu.ios.tsx
  • apps/mobile/src/components/context-menu/context-menu.tsx
  • apps/mobile/src/components/context-menu/fill-width.tsx
  • apps/mobile/src/components/context-menu/types.ts
  • apps/mobile/src/components/favorite-routes/favorite-route-box.tsx
  • apps/mobile/src/components/route-card/route-card.tsx
  • apps/mobile/src/screens/route-list/fares-screen.tsx

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The mobile ContextMenu now supports optional full-width rendering. FillWidth measures available width and passes it to native menu content. Favorite routes, route cards, and fare selection enable this behavior.

Changes

Context menu full-width rendering

Layer / File(s) Summary
Width contract and measurement
apps/mobile/src/components/context-menu/types.ts, apps/mobile/src/components/context-menu/fill-width.tsx
ContextMenuProps adds optional fillWidth. FillWidth measures its container with layout callbacks and getBoundingClientRect, then passes the measured width to its children.
Measured native menu rendering
apps/mobile/src/components/context-menu/context-menu.tsx, apps/mobile/src/components/context-menu/context-menu.ios.tsx
ContextMenu delegates native rendering to NativeMenu. When fillWidth is enabled, FillWidth supplies the measured width to the menu wrapper.
Full-width menu call sites
apps/mobile/src/components/favorite-routes/favorite-route-box.tsx, apps/mobile/src/components/route-card/route-card.tsx, apps/mobile/src/screens/route-list/fares-screen.tsx
These ContextMenu instances now pass fillWidth.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant ContextMenu
  participant FillWidth
  participant NativeMenu
  ContextMenu->>FillWidth: render with width callback
  FillWidth->>FillWidth: measure container width
  FillWidth->>NativeMenu: render content with measured width
  NativeMenu->>ContextMenu: invoke onPressAction
Loading

Merge Risk: ⚪ Minimal · up to 0ea0c

The full-width context-menu update preserves existing behavior while applying measured widths at the intended mobile call sites.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the Expo SDK 57 layout issue, the new fillWidth prop, and the affected components.
Title check ✅ Passed The title clearly and concisely describes the main change: stretching ContextMenu content to full width on mobile.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T11:38:23.051467Z 0ea0c11 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@guytepper
guytepper merged commit 10d134d into main Sep 11, 2026
4 checks passed
@guytepper
guytepper deleted the guytepper/fix-ios-list-padding branch September 11, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant