Skip to content

[$250] iOS - Keyboard opens in front of the hold banner #53572

Closed

Description

@vincdargento

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: 9.0.71-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: #49971
Email or phone of affected tester (no customers): nathanmulugetatesting+2264@gmail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Open hybrid app on a new account
  2. Create a workspace
  3. Submit expenses
  4. Go into the transaction thread of one of the expenses
  5. Tap on header > Hold

Expected Result:

The keyboard doesn't open while the banner is shown

Actual Result:

The keyboard opens up in front of the hold banner

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866934797160828341
  • Upwork Job ID: 1866934797160828341
  • Last Price Increase: 2024-12-11
  • Automatic offers:
    • truph01 | Contributor | 105371091
Issue OwnerCurrent Issue Owner: @anmurali

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 4, 2024
  2. melvin-bot commented on Dec 4, 2024

    @melvin-bot

    Triggered auto assignment to @anmurali (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.

  3. truph01 commented on Dec 4, 2024

    @truph01
    Contributor

    Proposal

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

    • The keyboard opens up in front of the hold banner

    What is the root cause of that problem?

    • When we "Hold expense", we display the popover:

    {isSmallScreenWidth && shouldShowHoldMenu && (
    <ProcessMoneyRequestHoldMenu

    {isSmallScreenWidth && shouldShowHoldMenu && (
    <ProcessMoneyRequestHoldMenu

    Meanwhile, the input will be focused automatically if we are focusing on it before, so the composer is focused and the keyboard is opening.

    As a result, the keyboard opens in front of the hold banner.

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

            const composerStatusBeforeModalShowRef = useRef(false);
            <Popover
                ...
                onClose={() => {
                    if (composerStatusBeforeModalShowRef.current) {
                        ReportActionComposeFocusManager.focus(true);
                        composerStatusBeforeModalShowRef.current = false;
                    }
                    onClose?.();
                }}
                onModalShow={() => {
                    composerStatusBeforeModalShowRef.current = ReportActionComposeFocusManager.isFocused();
                    Keyboard.dismiss();
                }}
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    What alternative solutions did you explore? (Optional)

    Alternative solution 1:

    • We can add an useEffect to ReportScreen, which will auto close the keyboard if there is any modal will be opened:
        const [modal] = useOnyx(ONYXKEYS.MODAL);
        const prevModal = usePrevious(modal);
        useEffect(() => {
            if (modal?.willAlertModalBecomeVisible && !prevModal?.willAlertModalBecomeVisible) {
                Keyboard.dismiss();
            }
        }, [modal, prevModal]);
    

    Alternative solution 2:

    • We can call Keyboard.dismiss() in:

    Modal.willAlertModalBecomeVisible(true, type === CONST.MODAL.MODAL_TYPE.POPOVER || type === CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED);

    • Should add a flag param such as shouldCloseKeyboardOnOpen and just call Keyboard.dismiss() if that param is true

    Note: These two alternative solutions will work in all other modals, not only the hold modal. And, the feature "after the popover is closed, we should focus on the composer if it is focused before (Optional)" is handled like what I mentioned in the main solution.

  4. melvin-bot commented on Dec 10, 2024

    @melvin-bot

    @anmurali Huh... This is 4 days overdue. Who can take care of this?

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 11, 2024
  6. changed the title [-]iOS - Keyboard opens in front of the hold banner[/-] [+][$250] iOS - Keyboard opens in front of the hold banner[/+] on Dec 11, 2024
  7. melvin-bot commented on Dec 11, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 11, 2024
  9. melvin-bot commented on Dec 11, 2024

    @melvin-bot

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

  10. 33 remaining items

  11. rlinoz commented on Jan 14, 2025

    @rlinoz
    Contributor

    Not awaiting payment, the solution was reverted

  12. removed
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on Jan 14, 2025
  13. changed the title [-][HOLD for payment 2025-01-21] [$250] iOS - Keyboard opens in front of the hold banner[/-] [+][$250] iOS - Keyboard opens in front of the hold banner[/+] on Jan 14, 2025
  14. truph01 commented on Jan 23, 2025

    @truph01
    Contributor

    I am unable to reproduce this issue anymore:

    Screen.Recording.2025-01-23.at.17.31.08.mov
  15. rlinoz commented on Jan 27, 2025

    @rlinoz
    Contributor

    Double checking #53572 (comment)

  16. rlinoz commented on Jan 27, 2025

    @rlinoz
    Contributor

    Can't repro anymore either

  17. anmurali commented on Jan 29, 2025

    @anmurali

    Closing.

  18. truph01 commented on Jan 29, 2025

    @truph01
    Contributor

    @anmurali Since both C+ and I spend efforts toward the PR, should we still be eligible for compensation here?

  19. truph01 commented on Jan 30, 2025

    @truph01
    Contributor

    @rlinoz @anmurali Could you please help check my comment above once you have a chance? Thanks

  20. mallenexpensify commented on Jan 31, 2025

    @mallenexpensify
    Contributor

    @truph01 and @eVoloshchak are, very likely, due compensation because they hired/assigned.

    The PR was created and reviewed so compensation is 100%

    Contributor: @truph01 paid $250 via Upwork
    Contributor+: @eVoloshchak due $250 via NewDot

    Deets from this SO (also noticed there are two payment-related SOs, I'm going to combine those today
    If a contributor has been hired for a job and we decide to close the job before it is successfully completed

    • 50% payment to contributor and C+ if the contributor was 🎀👀🎀 by a C+ or hired/assigned.
    • 100% due if contributor drafted a PR and requested a review.
    • 100% due to C+ if they reviewed the PR.
    • One caveat here might be if the hired contributor wasn't working on their PR with urgency.
  21. JmillsExpensify commented on Mar 3, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @eVoloshchak

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions