-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix badly positioned screen with autofocus #53699
Fix badly positioned screen with autofocus #53699
Conversation
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
@jnowakow Can you please fill in the QA steps too and add videos? You have not added any @DylanDylann can you please test this one? thanks! |
This comment has been minimized.
This comment has been minimized.
@mountiny I've updated the comment (I've had problems with running ND on mobile browsers so I'll try to record those videos later) |
I can only test on ND, this change looks safe for ND |
@jnowakow The app is crashed when going to an invalid report URL Screen.Recording.2024-12-10.at.16.58.17.mov |
@DylanDylann please check once more |
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@jnowakow We have a bit of a difference between the main branch when the screen is loading Main branchScreen.Recording.2024-12-11.at.17.26.16.movCurrent PRScreen.Recording.2024-12-11.at.17.27.44.mov |
@DylanDylann I can't see the difference. Are you sure you it's not the same recording two times? |
Ops, wrong video |
@jnowakow I already updated again |
@DylanDylann yeah, now I see the difference :) |
@jnowakow any update here? |
@mountiny I worked on it but it's hard to debug. It's caused by I think I'll try to find some workaround (and maybe clean up a bit |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
// There are cases in hybird app on android that screen goes up when there is autofocus on keyboard. (e.g. https://github.com/Expensify/App/issues/53185) | ||
// Workaround for this issue is to maunally focus keyboard after it's acutally rendered which is done by useAutoFocusInput hook. | ||
// */ | ||
autoFocus={Platform.OS !== 'android' ? autoFocus : false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jnowakow Because we already used useAutoFocusInput, could we remove this line?
autoFocus={Platform.OS !== 'android' ? autoFocus : false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this line iOS doesn't work. It's quite strange issue
ios-without-autofocus.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jnowakow Thanks. It doesn't work on IOS only. I think it relates to this problem: facebook/react-native#47576
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like it may be this problem
@mountiny |
@jnowakow We avoid using Platform checking on our codebase. Could you apply this pattern to this PR? https://github.com/Expensify/App?tab=readme-ov-file#platform-specific-file-extensions |
@DylanDylann I can see some usages of |
What is next for this pr? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-12-19.at.18.19.23.movAndroid: mWeb ChromeScreen.Recording.2024-12-10.at.16.53.56.moviOS: NativeScreen.Recording.2024-12-19.at.18.18.09.moviOS: mWeb SafariScreen.Recording.2024-12-10.at.16.45.43.movMacOS: Chrome / SafariScreen.Recording.2024-12-10.at.16.53.29.movMacOS: DesktopScreen.Recording.2024-12-10.at.16.48.31.mov |
@DylanDylann I've checked iOS on hybrid app without @mountiny I think this workaround fixes the issue so we can proceed it. I would check if it also fixes #53571 but I'm not able to reproduce it locally |
@jnowakow Ops, It is not my mean |
Hmmm, It is so minor. Could you please revert the latest commit and use getPlatform function |
dd8e0a6
to
8f6fbfc
Compare
@DylanDylann done |
🚧 @Julesssss has triggered a test hybrid app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
2 similar comments
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.78-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.78-6 🚀
|
Explanation of Change
Composer isn't displayed on first render of
ReportScreen
when navigating to new chat. It renders when there are already components on screen. In such situationComposer
hasautoFocus
set to true which opens keyboard automatically when it renders. But since it's not first render it seems that some calculation breaks on android hybrid app.Fixed Issues
$ #53185
PROPOSAL: N/A
Tests
Start new chat
.Offline tests
Same as in Tests
QA Steps
Same as in Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Hybrid:
hybrid-app.mov
ND:
android-standalone.mov
Android: mWeb Chrome
N/A
iOS: Native
Hybrid:
iOS-hybrid.mov
ND:
ios-ND.mov
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov