-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$1000] iOS - Deepliink - Keyboard displayed upon splash screen if open new chat deeplink #24473
Comments
Triggered auto assignment to @isabelastisser ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When a user taps on a deep link to open the "New Chat" page in the app, the keyboard appears upon loading the splash screen. The expected behavior is for the "New Chat" tab and keyboard to appear only after the splash screen is dismissed. What is the root cause of that problem?The shouldFocusOnSelectRow prop of the OptionsSelector component within the NewChatPage is set to true immediately upon rendering, triggering the keyboard to display. Line 201 in a03a21d
What changes do you think we should make in order to solve the problem?Use React's Context API to modify the shouldFocusOnSelectRow prop based on the isSplashHidden state: Create a New Context: import { createContext } from 'react';
const AppContext = createContext();
export default AppContext; Provide the Context in Expensify.js: import AppContext from './path_to_AppContext';
// ... other code ...
return (
<AppContext.Provider value={{ isSplashHidden }}>
{/* Your existing components, including navigators */}
</AppContext.Provider>
); Consume the Context in NewChatPage.js: import React, { useContext } from 'react';
import AppContext from './path_to_AppContext';
function NewChatPage(props) {
const { isSplashHidden } = useContext(AppContext);
// ... rest of your component logic ...
} Modify the shouldFocusOnSelectRow Prop: Update the prop in the OptionsSelector component: <OptionsSelector
...
shouldFocusOnSelectRow={props.isGroupChat && !Browser.isMobile() && isSplashHidden}
...
/> What alternative solutions did you explore? (Optional) |
I was assigned this when I was OOO. I will review this soon! |
Job added to Upwork: https://www.upwork.com/jobs/~0100e6a84621057a16 |
Current assignee @isabelastisser is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Keyboard appears upon loading splash screen. What is the root cause of that problem?The issue happens for any screen that uses At that time the Splash screen did not hide yet, causing the issue. It doesn't happen for other screens like workspace members invite page because in those pages, we use This is only happening for iOS, because for Android, the keyboard will not be displayed until the text input becomes visible (at that time the splash screen already hides), this is native platform behavior. What changes do you think we should make in order to solve the problem?A potential solution is to use But I prefer the below since it doesn't rely on timeouts: We need to standardise on the autofocusing of the TextInput so that:
What alternative solutions did you explore? (Optional)Another way is to get the |
@rayane-djouah I don't think your RCA is correct, if I set @tienifr Leaning towards your proposal, but I'd just like to understand the benefit of your main solution over the alternative, which sounds simpler to me at first glance! What is the benefit of using the Can either of you still replicate the issue, as these related issues are being reported as no longer occurring on staging or prod. |
@jjcoffee if we put
I can still replicate it. |
@tienifr Thanks, that makes sense! I will come back for a full review on Monday. |
@tienifr Weird, I can't replicate on an iOS simulator (on latest main). Were you replicating on a physical device? Looks like there have been several changes to @lanitochka17 are you able to retest on latest main? |
@jjcoffee No, I use Simulator (iPhone SE, iOS 16.2), still reproducible on latest Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-22.at.17.46.00.mp4 |
@tienifr Haha yes I did have the keyboard turned on! I'm no longer sure if this is really a bug if it now always works the same as in your repro video. The keyboard is showing just as the splash screen is transitioning, rather than way before like in the video in the issue description. I feel like that's acceptable behaviour. Asking for feedback on Slack. Separately, your RCA doesn't cover why the issue would be happening on iOS but not on Android. Do you have any thoughts on that? |
@jjcoffee I bumped your question in Slack. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@isabelastisser We got two votes for not a bug, not sure if that's enough to close? 😄 |
Issue reproducible on Build 1.3.56-18 0-02-01-2f1b86409e6fa4ea5ea75a4f312dffb317c736c5f6806629fa523e1ce06d80be_32da22cc25454b1b.mp4 |
Closing this per slack discussion. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Bump @jjcoffee can you please review the updated proposal above? Thanks! |
Sorry higher priority PR got in the way, will review tomorrow! |
@jjcoffee, @isabelastisser Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@jjcoffee yes that pattern is applicable and my proposal already follows that pattern (The pattern was implemented in the |
Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Just a quick update - PR has been approved by me, so just waiting for @danieldoglas to approve. |
Bump @danieldoglas for the comment above. Thanks! |
@isabelastisser PR has been merged! |
interesting, this was deployed to production but it didn't post the summary yet. It was deployed on the 9th, so this should be good for payment next tomorrow @isabelastisser |
Regression Test Proposal
Do we agree 👍 or 👎 |
@isabelastisser Friendly bump for payment, checklist is completed above! |
I'm sorry for the payment delay @jjcoffee and @tienifr. I've processed the payments in Upwork now. @danieldoglas, can you please review the Regression Test Proposal above and let me know if one should be created? Thanks! |
@isabelastisser I think it should be created |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #24126
Action Performed:
Precondition - Make sure that the app is completely closed (killed) and doesn't run in the background
deeplink (e.g. in notes)
Expected Result:
"New chat" tab and keyboard appear after splash screen is dismissed
Actual Result:
Keyboard appears upon loading splash screen.
In Production the issue is reproducible when user interacts with staging deeplinks. If user taps on production deeplinks they will land in mWeb, not iOS app
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.53.1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6161781_IMG_8918.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: