Skip to content

[PAID] [$250] The preference setting doesn’t work when navigating between chat and settings. #47273

Closed

Description

@m-natarajan

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.19-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
Expensify/Expensify Issue URL:
Issue reported by: @suneox
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1723478204237729

Action Performed:

  1. Go to setting/preferences
  2. Navigate to chat
  3. Navigate back to setting tab
    (If issue doesn’t occur, try again few times)

Expected Result:

Setting animation should work and user can select option from preference setting.

Actual Result:

Setting animation doesn’t work and user can’t select option from preference setting.

This issue also happen on setting/security setting/about setting/Troubleshoot setting/Save the world

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Safari
  • MacOS: Desktop

Screenshots/Videos

Screen.Recording.2024-08-12.at.22.44.07.mp4
Recording.3154.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017fa6be05e532f86f
  • Upwork Job ID: 1825658706975919362
  • Last Price Increase: 2024-08-19
  • Automatic offers:
    • suneox | Contributor | 103646524
    • QichenZhu | Contributor | 103646535
Issue OwnerCurrent Issue Owner: @strepanier03

Activity

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

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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. melvin-bot commented on Aug 16, 2024

    @melvin-bot

    @strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  4. QichenZhu commented on Aug 17, 2024

    @QichenZhu
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-08-17 14:26:34 UTC.

    Proposal

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

    Pages with animated illustrations become unresponsive after switching to another page and back.

    What is the root cause of that problem?

    The root cause is similar to #36645 (comment).

    When you switch to another page, the animated illustration keeps running in the background, adding tasks to a queue.

    When you switch back, the browser has to process these tasks first, making it unresponsive to actions using the same queue, such as opening a right-side modal.

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

    Follow @hoangzinh's suggestion. The previous fix didn’t implement it because it wasn’t quite relevant to that issue, but it does resolve this issue.

    Moreover, if we can combine useIsFocused and useAppState hooks, I think it would improve performance here.

    if (isError || appState.isBackground || !animationFile || !isSplashHidden) {

    import {useIsFocused} from '@react-navigation/native';
    const isFocused = useIsFocused();
    if (isError || !isFocused || appState.isBackground || !animationFile || !isSplashHidden) {

    What alternative solutions did you explore? (Optional)

    The drawback of the main solution is that the animated illustration disappears when the right-side modal is open. We can address this with the code below.

    import {useNavigation} from '@react-navigation/native'
    import NAVIGATORS from '@src/NAVIGATORS';
    const [isHidden, setIsHidden] = React.useState(false);
    const navigation = useNavigation();
    
    React.useEffect(() => {
        const unsubscribe = navigation.addListener('focus', () => {
            setIsHidden(false);
        });
        return unsubscribe;
    }, [navigation]);
    
    React.useEffect(() => {
        const unsubscribe = navigation.addListener('blur', () => {
            const state = navigation.getState();
            if (state?.routes?.[state?.index ?? 0]?.name !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
                setIsHidden(true);
            }
        });
        return unsubscribe;
    }, [navigation]);
    
    if (isError || isHidden || appState.isBackground || !animationFile || !isSplashHidden) {
  5. strepanier03 commented on Aug 19, 2024

    @strepanier03
    Contributor

    Confirmed this occurred on v9.0.22-5 after 3 tries.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 19, 2024
  7. changed the title [-]The preference setting doesn’t work when navigating between chat and settings.[/-] [+][$250] The preference setting doesn’t work when navigating between chat and settings.[/+] on Aug 19, 2024
  8. melvin-bot commented on Aug 19, 2024

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 19, 2024
  10. 42 remaining items

  11. suneox commented on Sep 10, 2024

    @suneox
    Contributor

    @hungvu193 I’ve verified the new PR for this issue, and it also resolves #47273 (comment). So we will proceed without holding for your referenced issue

  12. suneox commented on Sep 25, 2024

    @suneox
    Contributor

    Bugzero Checklist

    • [@suneox] The PR that introduced the bug has been identified. Link to the PR: Enable React concurrent mode #42592
    • [@suneox] 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: Due to the offending PR is an infrastructure update.
    • [@suneox] A discussion in #expensify-bugs 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
    • [@suneox] Determine if we should create a regression test for this bug. N/A: This issue has fixed the regression caused by the infrastructure update.
  13. suneox commented on Sep 25, 2024

    @suneox
    Contributor

    @strepanier03 This issue has been deployed to production two weeks ago, and the checklist is completed, so we can proceed with payment for this issue.

  14. suneox commented on Oct 7, 2024

    @suneox
    Contributor

    @strepanier03 Friendly bump for payment

  15. QichenZhu commented on Oct 21, 2024

    @QichenZhu
    Contributor

    Gentle bump @strepanier03

  16. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Oct 21, 2024
  17. strepanier03 commented on Oct 21, 2024

    @strepanier03
    Contributor

    Sorry for missing this one, the automation to update the title helps so much and when it fails 🤦‍♀️ it makes it tough. Handling this now.

  18. changed the title [-][$250] The preference setting doesn’t work when navigating between chat and settings.[/-] [+][PAID] [$250] The preference setting doesn’t work when navigating between chat and settings.[/+] on Oct 21, 2024
  19. strepanier03 commented on Oct 21, 2024

    @strepanier03
    Contributor

    This is paid and contracts closed. Sorry again.

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