Skip to content

[Due for payment 2025-06-09] [Due for payment 2025-05-28] [Due for payment 2025-05-27] [$125] Help Modal - Help modal is shown when reducing the size of the window #61016

Closed

Description

@mitarachim

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: v9.1.33-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: -
Email or phone of affected tester (no customers): gibethlehem@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows / Chrome
App Component: Other

Action Performed:

  1. Login to any account
  2. reduce the size of the window

Expected Result:

Help modal is not shown when size is reduced

Actual Result:

Help modal is shown briefly when size is reduced

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6815803_1745885939303.Screen_Recording_2025-04-29_at_3.16.22_at_night.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021920951599807096068
  • Upwork Job ID: 1920951599807096068
  • Last Price Increase: 2025-05-09
  • Automatic offers:
    • suneox | Reviewer | 107267322
    • nkdengineer | Contributor | 107267324
Issue OwnerCurrent Issue Owner: @adelekennedy

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 29, 2025
  2. melvin-bot commented on Apr 29, 2025

    @melvin-bot

    Triggered auto assignment to @adelekennedy (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. nkdengineer commented on Apr 29, 2025

    @nkdengineer
    Contributor

    Proposal

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

    Help modal is shown briefly when size is reduced

    What is the root cause of that problem?

    When we reduce from large screen to small screen the sidePanelWidth is changed from fixed width to windowWidth

    const sidePanelWidth = shouldUseNarrowLayout ? windowWidth : variables.sideBarWidth;

    then the animation here is triggered which causes the help modal appear briefly

    useEffect(() => {
    setIsSidePanelTransitionEnded(false);
    Animated.parallel([
    Animated.timing(sidePanelOffset.current, {
    toValue: shouldApplySidePanelOffset ? variables.sideBarWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    Animated.timing(sidePanelTranslateX.current, {
    toValue: shouldHideSidePanel ? sidePanelWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    ]).start(() => setIsSidePanelTransitionEnded(true));
    }, [shouldHideSidePanel, shouldApplySidePanelOffset, sidePanelWidth]);
    const openSidePanel = useCallback(() => {
    setIsSidePanelTransitionEnded(false);
    KeyboardUtils.dismiss();

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

    We shouldn't trigger the animation if the help modal is already hidden and has not been changed to show. And in this case, we only change sidePanelTranslateX and sidePanelOffset

    const prevShouldHideSidePanel = usePrevious(shouldHideSidePanel);
    useEffect(() => {
            if (shouldHideSidePanel && prevShouldHideSidePanel) {
                sidePanelTranslateX.current.setValue(sidePanelWidth);
                sidePanelOffset.current.setValue(shouldApplySidePanelOffset ? variables.sideBarWidth : 0);
                return;
            }
    

    useEffect(() => {
    setIsSidePanelTransitionEnded(false);
    Animated.parallel([
    Animated.timing(sidePanelOffset.current, {
    toValue: shouldApplySidePanelOffset ? variables.sideBarWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    Animated.timing(sidePanelTranslateX.current, {
    toValue: shouldHideSidePanel ? sidePanelWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    ]).start(() => setIsSidePanelTransitionEnded(true));
    }, [shouldHideSidePanel, shouldApplySidePanelOffset, sidePanelWidth]);
    const openSidePanel = useCallback(() => {
    setIsSidePanelTransitionEnded(false);
    KeyboardUtils.dismiss();

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

    UI issue

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. ishakakkad commented on Apr 29, 2025

    @ishakakkad
    Contributor

    Proposal

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

    Help modal is shown when reducing the size of the window

    What is the root cause of that problem?

    We show help model based on following condition.

    if (isSidePanelTransitionEnded && shouldHideSidePanel) {
    return null;
    }

    Here, we run animation whenever sidePanelWidth is changed based on following logic. And in useEffect setIsSidePanelTransitionEnded is set to false. Because of this we see modal for fraction of time.

    useEffect(() => {
    setIsSidePanelTransitionEnded(false);
    Animated.parallel([
    Animated.timing(sidePanelOffset.current, {
    toValue: shouldApplySidePanelOffset ? variables.sideBarWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    Animated.timing(sidePanelTranslateX.current, {
    toValue: shouldHideSidePanel ? sidePanelWidth : 0,
    duration: CONST.ANIMATED_TRANSITION,
    useNativeDriver: true,
    }),
    ]).start(() => setIsSidePanelTransitionEnded(true));
    }, [shouldHideSidePanel, shouldApplySidePanelOffset, sidePanelWidth]);

    const sidePanelWidth = shouldUseNarrowLayout ? windowWidth : variables.sideBarWidth;

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

    To fix the issue, we can only set setIsSidePanelTransitionEnded to false if !prevShouldHideSidePanel && !shouldHideSidePanel so help modal here not shown in following conditions. By doing this, all other logic remain same.

     const prevShouldHideSidePanel = usePrevious(shouldHideSidePanel);
     useEffect(() => {
            if (!prevShouldHideSidePanel && !shouldHideSidePanel) {
                setIsSidePanelTransitionEnded(false);
            }
            ..... // All existing logic
        }, [shouldHideSidePanel, shouldApplySidePanelOffset, sidePanelWidth]);

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

    UI bug

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  5. melvin-bot commented on May 2, 2025

    @melvin-bot

    @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

  6. melvin-bot commented on May 6, 2025

    @melvin-bot

    @adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  7. melvin-bot commented on May 8, 2025

    @melvin-bot

    @adelekennedy 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  8. adelekennedy commented on May 9, 2025

    @adelekennedy
    Contributor

    A polish imo but worth it

  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 9, 2025
  10. changed the title [-]Help Modal - Help modal is shown when reducing the size of the window[/-] [+][$250] Help Modal - Help modal is shown when reducing the size of the window[/+] on May 9, 2025
  11. melvin-bot commented on May 9, 2025

    @melvin-bot
  12. 37 remaining items

  13. changed the title [-][Due for payment 2025-05-28] [Due for payment 2025-05-27] [$125] Help Modal - Help modal is shown when reducing the size of the window[/-] [+][Due for payment 2025-06-09] [Due for payment 2025-05-28] [Due for payment 2025-05-27] [$125] Help Modal - Help modal is shown when reducing the size of the window[/+] on Jun 2, 2025
  14. melvin-bot commented on Jun 2, 2025

    @melvin-bot

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

    If no regressions arise, payment will be issued on 2025-06-09. 🎊

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

  15. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    @suneox @adelekennedy @suneox 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]

  16. suneox commented on Jun 9, 2025

    @suneox
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 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)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: N/A Caused by a missed edge case in the implementation

    • [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

    • [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.

      N/A: It isn't an impactful bug

  17. adelekennedy commented on Jun 9, 2025

    @adelekennedy
    Contributor

    Payment Summary

    Contributor: @nkdengineer paid $250 via Upwork
    Contributor+: @suneox paid $250 via Upwork

  18. melvin-bot commented on Jul 1, 2025

    @melvin-bot

    Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions