Skip to content

[HOLD for payment 2023-10-13] [$500] [Distance] - App does not refocus on address field on delete and cancel #27182

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Click plus and open request money
  3. Click on distance
  4. Click on Add stop
  5. Open newly created stop
  6. Click on 3 dots and click on delete waypoint
  7. Click cancel in confirmation popup
  8. Observe that address field is not focused

Expected Result:

App should focus back on address field on delete and cancel as we do for normal report messages

Actual Result:

App does not focus back on address field on delete and cancel

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.67.2
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
Notes/Photos/Videos: Any additional supporting documentation

no.focus.back.on.delete.cancel.address.field.mp4
Recording.4396.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694111463191149

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0115c7c503e332eb0f
  • Upwork Job ID: 1701291764562169856
  • Last Price Increase: 2023-09-11
  • Automatic offers:
    • Krishna2323 | Contributor | 26724773

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 11, 2023
  2. changed the title [-][Distance] - App does not refocus on address field on delete and cancel[/-] [+][$500] [Distance] - App does not refocus on address field on delete and cancel[/+] on Sep 11, 2023
  3. melvin-bot commented on Sep 11, 2023

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  4. melvin-bot commented on Sep 11, 2023

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 11, 2023
  6. melvin-bot commented on Sep 11, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Sep 11, 2023

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  8. melvin-bot commented on Sep 11, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

  9. Krishna2323 commented on Sep 11, 2023

    @Krishna2323
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    App does not refocus on address field on delete and cancel.

    What is the root cause of that problem?

    We are not refocusing on input when modal is closed.

    What changes do you think we should make in order to solve the problem?

    We need to focus on the input using input ref when waypoint delete modal is closed by passing onModalHide prop to ConfirmModal.

    onModalHide={() => {
        InteractionManager.runAfterInteractions(() => {
            if (!textInput.current) return;
            textInput.current.focus();
        });
    }}
    

    <ConfirmModal
    title={translate('distance.deleteWaypoint')}
    isVisible={isDeleteStopModalOpen}
    onConfirm={deleteStopAndHideModal}
    onCancel={() => setIsDeleteStopModalOpen(false)}
    prompt={translate('distance.deleteWaypointConfirmation')}
    confirmText={translate('common.delete')}
    cancelText={translate('common.cancel')}
    danger

    Result

  10. yh-0218 commented on Sep 11, 2023

    @yh-0218
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    App does not refocus on address field on delete and cancel.

    What is the root cause of that problem?

    We are not focusing on input when modal is closed.

    What changes do you think we should make in order to solve the problem?

    We can call this function when close modal.

        const onModalHide = useCallback(() => {
            setIsDeleteStopModalOpen(false)
            if (textInput === null || textInput.current === null) {
                return;
            }
            const timeout = _.delay(() => {
                textInput.current.focus();
            }, 500);
            return () => clearTimeout(timeout);
        }, [textInput]);
    

    <ConfirmModal
    title={translate('distance.deleteWaypoint')}
    isVisible={isDeleteStopModalOpen}
    onConfirm={deleteStopAndHideModal}
    onCancel={() => setIsDeleteStopModalOpen(false)}
    prompt={translate('distance.deleteWaypointConfirmation')}
    confirmText={translate('common.delete')}
    cancelText={translate('common.cancel')}
    danger

    What alternative solutions did you explore? (Optional)

  11. 56 remaining items

  12. Beamanator commented on Oct 12, 2023

    @Beamanator
    Contributor

    Quick bump, can we fix #28921 as part of this one, or should it be separate?

  13. amyevans commented on Oct 13, 2023

    @amyevans
    Contributor

    @Beamanator sorry, I totally missed your question the first time. The summary of this GH is that we've introduced no changes to the app and the GH will be closed as expected behavior. I see you've added them both to the tracking issue, thanks! I think that's the best course of action - we can come back to these GHs at a later date and approach more holistically, because honestly it's not efficient trying to address them each separately with a different group of individuals.

  14. CortneyOfstad commented on Oct 13, 2023

    @CortneyOfstad
    Contributor

    After an internal discussion with the team, it was decided that this is expected behavior, so this GH will be closed.

    However, due to the work by @mananjadhav and @Krishna2323 as C+ and contributor on working on the PR, it was decided to offer a 50% payment.

    @dhanashree-sawant also offering you 50% for the reporting — this has been paid in Upwork 👍

    @mananjadhav if you would like to request that in NewDot, I will get a payment summary posted below.

    @Krishna2323 I've paid you via Upwork, so you are all set 👍

    Once all payments are completed (just waiting on NewDot), we will close this 👍

  15. mananjadhav commented on Oct 13, 2023

    @mananjadhav
    Collaborator

    Thanks @CortneyOfstad, yes would need payment summary.

  16. tienifr commented on Oct 13, 2023

    @tienifr
    Contributor

    @CortneyOfstad I was the one who spotted the expected behavior and raised here: #27182 (comment). Would love to get compensated for that as well.

  17. CortneyOfstad commented on Oct 16, 2023

    @CortneyOfstad
    Contributor

    @amyevans Does that sound fair to you for compensating @tienifr as well? Just want a second pair of eyes — thanks!

  18. amyevans commented on Oct 17, 2023

    @amyevans
    Contributor

    👍

  19. CortneyOfstad commented on Oct 17, 2023

    @CortneyOfstad
    Contributor

    Alright @tienifr, after an internal discussion it was decided to offer $50 as a "bug reporter" for this issue in regards to expected behavior.

    If possible, can you send over your Upwork profile so I can make sure that I am sending the proposal to the correct individual? Thanks!

  20. tienifr commented on Oct 17, 2023

    @tienifr
    Contributor
  21. CortneyOfstad commented on Oct 17, 2023

    @CortneyOfstad
    Contributor

    Perfect! Just sent the proposal @tienifr 👍

  22. CortneyOfstad commented on Oct 17, 2023

    @CortneyOfstad
    Contributor

    @tienifr you have been paid 👍

    Payment Summary

    External issue reporter – @dhanashree-sawant paid $25 (50%) in Upwork
    Contributor that fixed the issue — @Krishna2323 paid $250 (50%) in Upwork
    Contributor+ that helped on the issue and/or PR — @mananjadhav to be paid $250 (50%) in NewDot
    Additional payment — @tienifr paid $50 in Upwork for helping to find that it was expected behavior, not a bug

  23. JmillsExpensify commented on Oct 17, 2023

    @JmillsExpensify
    Contributor

    @250 payment approved for @mananjadhav based on summary above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions