App icon indicating copy to clipboard operation
App copied to clipboard

[$250] [HOLD for payment 2024-12-11] Android - Expense - Save button moves up and down when keyboard is open

Open IuliiaHerets opened this issue 1 year ago • 20 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.67-1 Reproducible in staging?: Y Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y **Email or phone of affected tester (no customers):**[email protected] Issue reported by: Applause Internal Team

Action Performed:

  1. Launch ND or hybrid app.
  2. Go to workspace chat.
  3. Tap + > Submit expense > Manual.
  4. Enter amount > Next.
  5. Tap Merchant.
  6. Might have to exit merchant editor and tap Merchant field again to see Save button move when keyboard is open.

Expected Result:

Save button will not move up and down when the keyboard is open.

Actual Result:

Save button moves up and down when the keyboard is open.

Similar behavior is seen across the app when keyboard is open and where there is Save or Submit button.

Workaround:

Unknown

Platforms:

  • [x] Android: Standalone
  • [x] Android: HybridApp
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Standalone
  • [ ] iOS: HybridApp
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/c576183f-5213-4e66-939c-d2e20fcd0b3a

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021865866933542877637
  • Upwork Job ID: 1865866933542877637
  • Last Price Increase: 2024-12-08
Issue OwnerCurrent Issue Owner: @jliexpensify
Issue OwnerCurrent Issue Owner: @jliexpensify

IuliiaHerets avatar Nov 27 '24 07:11 IuliiaHerets

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

Triggered auto assignment to @mountiny (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

💬 A slack conversation has been started in #expensify-open-source

melvin-bot[bot] avatar Nov 27 '24 07:11 melvin-bot[bot]

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

github-actions[bot] avatar Nov 27 '24 07:11 github-actions[bot]

I already mentioned this problem here - https://github.com/Expensify/App/pull/42143#discussion_r1858383050

This is PR that introduced new hook useSafePaddingBottomStyle hook, that updates style from JS thread. However new implementation of KeyboardAvoidingView is based on reanimated usage (i. e. synchronous style changes depending on keyboard position), but this hook performs updates in JS (which are slower) and because of that we see this two stage update on Android.

We can fix it:

  • by making useSafePaddingBottomStyle returning an instance of useAnimatedStyle;
  • or by specifying necessary margin pb5 as keyboardVerticalOffset property in KeyboardAvoidingView (this approach is preferable, because we don't need to create many animated views and a single view will control keyboard interpolation).

However it's pretty big changes in both variants and it will take some time to implement (because useSafePaddingBottomStyle implicitly gets used in many places already, so we will have to go through each screen and verify that there is no jumps).

@mountiny do you think we can deprioritise this and remove blocker label? It was kind of something expected to see such instant button shifts, and I wanted to handle it in follow up tickets (but again it'll take some time to prepare a PR).

kirillzyusko avatar Nov 27 '24 15:11 kirillzyusko

I agree, lets do this properly without rushing. I think its not that major to block deploy, user can use the app fine

mountiny avatar Nov 27 '24 15:11 mountiny

I have a standing Android <> ios bug swap with @jliexpensify.

kadiealexander avatar Nov 28 '24 23:11 kadiealexander

@mountiny - if @kirillzyusko needs some time to work on this, shall we make this a weekly?

jliexpensify avatar Nov 28 '24 23:11 jliexpensify

I think we can keep it daily so @kirillzyusko can work on this with urgency in the coming days.

Can you base your changes on this PR, @kirillzyusko please? https://github.com/Expensify/App/pull/53250

mountiny avatar Nov 29 '24 09:11 mountiny

⚠️ 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.

melvin-bot[bot] avatar Dec 01 '24 08:12 melvin-bot[bot]

@kirillzyusko, @allroundexperts, @jliexpensify, @mountiny, @ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Dec 02 '24 09:12 melvin-bot[bot]

PR in main

mountiny avatar Dec 02 '24 10:12 mountiny

@mountiny should we change PR title to show that the fix in main branch?

kirillzyusko avatar Dec 03 '24 15:12 kirillzyusko

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Dec 04 '24 01:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.70-9 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/53250

If no regressions arise, payment will be issued on 2024-12-11. :confetti_ball:

For reference, here are some details about the assignees on this issue:

  • @kirillzyusko does not require payment (Contractor)
  • @allroundexperts requires payment through NewDot Manual Requests
  • @ZhenjaHorbach requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Dec 04 '24 01:12 melvin-bot[bot]

@allroundexperts / @ZhenjaHorbach @jliexpensify @allroundexperts / @ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

melvin-bot[bot] avatar Dec 04 '24 01:12 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~021865866933542877637

melvin-bot[bot] avatar Dec 08 '24 21:12 melvin-bot[bot]

Current assignees @allroundexperts and @ZhenjaHorbach are eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Dec 08 '24 21:12 melvin-bot[bot]

Payment Summary

  • C: @ZhenjaHorbach $250 (paid via Upworks)
  • C+: @allroundexperts $250 (to be paid via ND)
  • @kirillzyusko (Agency)

Upworks job

jliexpensify avatar Dec 08 '24 21:12 jliexpensify

BugZero Checklist:

  • [x] [Contributor] Classify the bug:

Source of bug:

  • [x] 1a. Result of the original design (eg. a case wasn't considered)
  • [ ] 1b. Mistake during implementation
  • [ ] 1c. Backend bug
  • [ ] 1z. Other:

Where bug was reported:

  • [ ] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • [ ] 2b. Reported on staging (eg. found during regression or PR testing)
  • [x] 2d. Reported on a PR
  • [ ] 2z. Other:

Who reported the bug:

  • [ ] 3a. Expensify user

  • [ ] 3b. Expensify employee

  • [ ] 3c. Contributor

  • [ ] 3d. QA

  • [x] 3z. Other: Agency member

  • [x] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: https://github.com/Expensify/App/pull/42143#discussion_r1858383050

  • [x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • [x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • Login to the App using an account that has a workspace chat.

Test:

  1. Launch NewDot App.
  2. Go to workspace chat.
  3. Tap + > Submit expense > Manual.
  4. Enter amount > Next.
  5. Tap Merchant.
  6. Exit the merchant editor and tap Merchant field again.

Verify that the save button will not move up and down when the keyboard is open.

Do we agree 👍 or 👎

allroundexperts avatar Dec 08 '24 21:12 allroundexperts

Paid and job closed, @allroundexperts here is the payment summary.

jliexpensify avatar Dec 12 '24 02:12 jliexpensify

$250 approved for @allroundexperts

JmillsExpensify avatar Jun 10 '25 08:06 JmillsExpensify