Closed kbecciv closed 6 months ago
Job added to Upwork: https://www.upwork.com/jobs/~01241daac204a80575
Triggered auto assignment to @bfitzexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (External
)
When adding a new member, the button lags whenever the keypad is opened or closed, regardless of whether a checkbox is selected.
π£ @maazakn! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: thesamuelralak@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~011e010bd867c901e3
Mismatch in timing of the keyboard's retraction animation and button's position update
A similar behaviour can be observed in the following routes:
Set shouldEnableMaxHeight
prop of ScreenWrapper
to false or just don't include it. This makes the button position static, gracefully hiding it behind the keyboard when input is in focus thus maintaining a consistent user experience with the following routes:
Incorporate the KeyboardAvoidingView component, along with appropriate padding and animation configurations, to automatically adjust the layout when the keyboard is visible. Disclaimer - this is a trial and error approach, mostly due to my limited familiarity with the codebase now.
β Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal in https://github.com/Expensify/App/issues/33546#issuecomment-1868421370 ready for review when you get a moment @shubham1206agra
mWeb - Workspace - "Next" button's placement has a delay after the keypad disappears
The windowHeight
get from useWindowDimensions return is delayed after the keyboard open or close, due to indeep the implemetation at react-native-web
using window.visualViewport and the resize event from window.visualViewport
isn't triggered immediately after the keyboard opens or closes.
This issue also happen on a lot of page has ScreenWrapper
using shouldEnableMaxHeight
so we will apply one fix for all page.
At hook useWindowDimensions for web we will create varible initalViewportHeight
and cachedViewportHeight
if Browser.isMobile
we will add listener focusin
and focusout
for input, textarea, ...element can trigger keyboard, If keyboard is open we will set windowHeight
to cachedViewportHeight
and when keyboard is close we will set windowHeight
to initalViewportHeight
const [windowHeight, setWindowHeight] = useState(height);
const handleFocusIn = (event: FocusEvent) => {
const targetElement = event.target as HTMLElement;
if (targetElement.tagName === "INPUT" || targetElement.tagName === "TEXTAREA") {
setWindowHeight(cachedViewportHeight);
}
}
useEffect(() => {
if (!Browser.isMobileSafari()) return;
window.addEventListener('focusin', handleFocusIn)
return () => {
window.removeEventListener('focusin', handleFocusIn)
}
},[]);
const handleFocusOut = (event: FocusEvent) => {
const targetElement = event.target as HTMLElement;
if (targetElement.tagName === "INPUT" || targetElement.tagName === "TEXTAREA") {
setWindowHeight(initalViewportHeight);
}
}
useEffect(() => {
if (!Browser.isMobileSafari()) return;
window.addEventListener('focusout', handleFocusOut)
return () => {
window.removeEventListener('focusout', handleFocusOut)
}
},[])
useEffect(() => {
// check is mobile browser and portrait mode
if (Browser.isMobileSafari() && height > windowWidth) {
if (height < initalViewportHeight) {
cachedViewportHeight = height;
}
}
setWindowHeight(height);
}, [windowWidth, height])
We also can update condition useWindowDimensions at ScreenWrapper
only handle when shouldEnableMaxHeight
is true and Browser.isMobileSafari()
, some thing like that to reduce affect for code change above
const {windowHeight, isSmallScreenWidth} = useWindowDimensions({shouldHandleKeyboardOpenHeight: shouldEnableMaxHeight && Browser.isMobileSafari()});
full implementation at this commit
@suneox The proposal looks promising (I just need to test it on few different cases). I have some questions about it
Why can't we do the fix upstream in this case?
Hi @shubham1206agra
Why can't we do the fix upstream in this case?
We should fix it inside the app implementation because we have a specific use case. Currently, this hook is used on a lot of pages so we don't have the context to make the assumption
I have cleanup the code lint for my change at this commit could you please check-out it to verify?
@bfitzexpensify, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Thoughts on https://github.com/Expensify/App/issues/33546#issuecomment-1869276001 @shubham1206agra?
Sorry @bfitzexpensify. I haven't tested this yet. I will test this today.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@bfitzexpensify, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Any update here @shubham1206agra?
@bfitzexpensify I have checked this problem. The solution works on ios mweb, but still seems sluggish on android mweb. Can we have someone from expert group for this bug? Or maybe @suneox create a PR and test this on real device on adhoc build.
@suneox I noticed some delay on first opening of keyboard on iOS. Is this by design?
The solution works on ios mweb, but still seems sluggish on android mweb. Can we have someone from expert group for this bug? Or maybe @suneox create a PR and test this on real device on adhoc build.
@shubham1206agra I just tested on a real Android device and this issue only happens on ios Safari so we just need to change the condition check Browser.isMobile
to Browser.isMobileSafari()
Could you please re-verify at this commit?
I noticed some delay on first opening of keyboard on iOS. Is this by design?
Yes my proposal is caching the ViewportHeight so we have to get the viewport height while the first time opens keyboard, and it still matches the expectation when the keyboard is hidden the button will fixed to the bottom immediately
@suneox's proposal looks good to me.
π π π C+ Reviewed
Additional note - Lag in Android mWeb most probably due to device problem, and not App issue.
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@techievivek @bfitzexpensify @shubham1206agra this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
π£ @shubham1206agra π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @suneox π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
This issue has not been updated in over 15 days. @suneox, @techievivek, @bfitzexpensify, @shubham1206agra eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Hi @techievivek @shubham1206agra I would like to confirm the viewport delay only happens on mWeb/Safari we can check on the latest staging on your real device mobile device (iOS/Safari & Android/Chrome)
The latest staging | iOS/Safari | Android/Chrome |
---|
https://github.com/Expensify/App/assets/11959869/8a63eabd-b582-4827-86e1-6f2d6bba3029
https://github.com/Expensify/App/assets/11959869/063688f2-079a-4c3d-98ac-4260bc15d176
The raw structure at this link | iOS/Safari | Android/Chrome |
---|
https://github.com/Expensify/App/assets/11959869/5d1f5232-d15a-4175-9297-374a35d623fe
https://github.com/Expensify/App/assets/11959869/273fce4d-fb0d-4307-8f08-c2f5d55a7214
β οΈ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.39-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-02-19. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Holding payment on the regression
PR is merged
Looks like this caused another regression https://github.com/Expensify/App/issues/37090 @shubham1206agra @suneox
The bug looks serious to me. Should I raise a revert for now in this case?
@suneox Meanwhile, please investigate this bug ASAP.
The bug looks serious to me. Should I raise a revert for now in this case?
@suneox Meanwhile, please investigate this bug ASAP.
@shubham1206agra I'll double-check and create PR within 1 hour by adding props to ScreenWrapper only handle the workspace screen instead of apply for all page, base on a page structure we will handle case by case
The PR is ready to create but the issue doesn't happen at PR so I'd like to continue to double check the related issues in few hours
@shubham1206agra I have created PR to fix case by case, first we can go ahead with this page due to we don't have a context to fix as globally, some page has a magic logic against with this.
Friendly bump @shubham1206agra
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.46-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-03-11. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Switching this to Daily so that I'm on top of payment
Payment due Monday
@suneox, @techievivek, @bfitzexpensify, @shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick!
Payment complete for @suneox
@shubham1206agra, I had to re-issue your contract, that's been sent now. Also, a bump on the BZ checklist - thanks!
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
@bfitzexpensify Can you hold my payment temporarily as per https://expensify.slack.com/archives/C02NK2DQWUX/p1710150138788529?
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.16.3 Reproducible in staging?: y Reproducible in production?: y 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Expected Result:
There shouldn't be a delay.
Actual Result:
"Next" button's placement has a delay after the keypad disappears.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/dc17851c-df3b-4063-9001-65e785c39587
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @shubham1206agra