Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.85k forks source link

Android - Workspaces is briefly highlighted after tapping Settings to return to Settings #51353

Open lanitochka17 opened 3 hours ago

lanitochka17 commented 3 hours ago

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.52-1 Reproducible in staging?: Y Reproducible in production?: Y 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: N/A Email or phone of affected tester (no customers): applausetester+sdjosdjosd2@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch New Expensify app.
  2. Go to Settings.
  3. Tap Workspaces.
  4. Tap Settings.

Expected Result:

Workspaces will not be highlighted after tapping Settings to return to Settings page

Actual Result:

Workspaces is briefly highlighted after tapping Settings to return to Settings page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/47fb0737-385e-4a5b-abef-f8aeb661fe77

View all open jobs on GitHub

melvin-bot[bot] commented 3 hours ago

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

lanitochka17 commented 3 hours ago

@slafortune FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

shahinyan11 commented 1 hour ago

Proposal

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

Workspaces is briefly highlighted after tapping Settings to return to Settings

What is the root cause of that problem?

When we press to the menu item it become highlighted and it stores the prev state until we return back

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

  1. Add following code const isFocused = useIsFocused() in InitialSettingsPage component
  2. Add following check isFocused && in this condition.
    isFocused &&
    !!activeCentralPaneRoute &&
    !!item.routeName &&
    !!(activeCentralPaneRoute.name.toLowerCase().replaceAll('_', '') === item.routeName.toLowerCase().replaceAll('/', ''))

    Also we ned to add the isFocused in this dependencies array

    What alternative solutions did you explore? (Optional)

    Alternative of step 2 in above Pass interactive={!isFocused} prop to MenuItem component.