Repository navigation
Conversation
|
@codex please review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
I need to test this one using real iphone duo so I will do it on Monday |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
VisionCamera rotates every output by the interface orientation alone, so the camera is turned 90 degrees on the iPhone Duo's inner display. The patch is the upstream fix from margelo/react-native-vision-camera#4251.
On the iPhone Duo's inner display the photo's shape doesn't follow the UI orientation, so a photo-shaped viewfinder crops the preview. In a tablet-sized window the viewfinder now fills its area, the preview fits the whole frame in it, and the odometer photo is no longer cropped to the viewfinder.
The list and its category headers took the window's width, so in the card a tablet-sized window shows the last two emoji columns were cut off.
9.0.4 adds the ancestor's safe area on top of the inherited one, so tab content in Create expense is cut short on the iPhone Duo. Same change as Expensify#108303.
|
|
|
Yeah that's feeling A LOT better! Onboarding missing the scrim, is that a separate bug? The only thing I think would be worth improving is that all illustrations get cut off cause it doesn't follow the aspect ratio. I guess we could:
I'm curious what @Expensify/design think here. I'm hesitant to invest loooads of time in this for now and wonder if we should do 3 until we decide it's worth it later. I think 1 would potentially be a tad weird for the Duo and other foldables, but not against that either. 2 is probably not worth it. Curious for your take too @GCyganek and if there's other things that comes to mind for you |
From what I recall, that’s how it works on tablets in landscape mode, but I can check if there can be something done with it |
…olded-duo # Conflicts: # src/pages/iou/request/step/IOURequestStepScan/components/Camera/index.native.tsx
|
Cool. Definitely wanna fix it as a follow-up for whatever is going on there since it looks broken atm |
|
Also it looks like only multi-scan is using fixed height, so switching it to aspect ratio should fix the problem, but I'm checking other illustrations as well |
|
You a machine! That looks great |
|
Thanks, I will fix the onboarding screen backdrop in a follow-up to not make this PR too big. I will test everything again and make sure I did not break anything on iOS/Android tablets and then switch this PR to review |
|
Nice, looking good! And totally agree that we need to fix the onboarding flow. |
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e645b2ed0a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I will try to finally switch this PR to review tomorrow morning as I was busy today with fixing new deploy blockers |
|
@codex please review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |









Explanation of Change
This PR makes the app usable on an unfolded iPhone Duo, whose inner display is a tablet-sized window on a device that reports itself as a phone. Most of the changes apply to every tablet-sized native window (unfolded Duo, iPad, Android tablet). The camera changes apply only to the Duo's inner display.
1. Landscape detection (#106376, #106385)
On native,
isInLandscapeModeonly excluded devices that report as tablets, so an unfolded Duo held sideways got the layout meant for a short phone window. That layout caps heights, which caused the Save button in the middle of Split (#106376) and the suggestion list showing two emojis per scroll (#106385).isInLandscapeModenow also returns false when the window's short side is at leastTABLET_MIN_SCREEN_DIMENSION(600, now shared with webisTabletviaisTabletSizedWindow). The window is read on every call, so folding the phone brings the landscape layout back.2. Camera on the Duo's inner display (#106375)
The inner display is mounted a quarter turn from the camera, which caused two problems:
The preview and photos were turned 90°. VisionCamera rotates the camera output based on the screen's orientation, which assumes the screen is aligned with the camera. This is fixed with a VisionCamera patch taken from the upstream fix (margelo/react-native-vision-camera#4251). Devices whose screen is aligned with the camera are unaffected. The patch can be dropped once the fix is released.
The viewfinder didn't match the photo. On the inner display, a photo is wide when the phone is held upright and tall when it's held sideways, the opposite of the screen. Our viewfinder takes its shape from the screen, so it showed a different crop than the photo it saved. VisionCamera doesn't tell the app which rotation it applied, so on the unfolded Duo (
isDisplayRotatedFromCamera: a phone with a tablet-sized window) we flip the viewfinder's shape and fit it inside the camera area.useReceiptPhotoOutputnow works out the photo's shape from the window instead of takingisInLandscapeMode: since an unfolded foldable phone no longer uses the landscape layout (section 1), the layout can't tell that it takes a wide photo in a wide window. Phones and tablets keep the viewfinder they had before. Once VisionCamera reports the rotation, this special case can be replaced.The camera screens keep their own landscape check. Scan, Odometer and the attachment camera read
useShouldUseCameraLandscapeLayoutinstead ofuseIsInLandscapeMode. It is the check frommain(a phone with a window wider than tall) and leaves out only the unfolded Duo. That way the change in section 1 doesn't reach the camera.3. Modals and headers in tablet-sized native windows
On native, the layout is always narrow, so these windows got phone UI stretched across a much wider window.
shouldShowBottomDockedModalAsCard). Held upright, they stay full-width sheets as on a phone. The card skips the side safe-area padding, because it doesn't reach the window's edges.ReanimatedModalcontainer: for bottom-docked modals only, its animated wrapper now haspointerEvents="box-none". A tap beside the card then reaches the backdrop and closes the modal, as a tap above it already did. On a phone the wrapper is exactly as wide as the sheet, so nothing changes there. Other modal types keep the wrapper catching taps, so their outside-tap behavior is unchanged.useHasFixedWidth).useShouldDisplayButtonsInSeparateLine/index.native.ts), since there is room next to the title. This includes the expense report header (MoneyReportHeader,MoneyReportHeaderActions), which now reads the same hook. On an iPad and an Android tablet, the buttons used to sit on a separate line in both orientations.Fixed Issues
$ #106376
$ #106375
$ #106385
PROPOSAL: N/A
Tests
Preconditions:
Test 1: Split Save button (#106376)
Test 2: Emoji suggestions (#106385)
:smin the composer.Test 3: Bottom-docked modals
Test 4: Emoji picker
Test 5: Header buttons
Test 6: Multi-scan education modal
Precondition: an account that has never seen the multi-scan education modal.
Test 7: Camera (physical Duo only)
Test 8: Regular iPhone regression
Test 9: iPad
Test 10: Android tablet and foldable
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari