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.56k stars 2.9k forks source link

[$250] Status – App redirects to Profile page when cleared status without saving #39409

Closed lanitochka17 closed 7 months ago

lanitochka17 commented 7 months 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: 1.4.59-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/App/pull/38797

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Go to /settings/profile/status
  4. Add status
  5. Clear the status and press nothing

Expected Result:

App redirects to Profile page when cleared status and press save

Actual Result:

App redirects to Profile page when cleared status without saving. Status reappears for a moment when clear it only on Web

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/268638e7-8525-48c3-8905-7eff44b13f7a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01802fb0f898a8a8e6
  • Upwork Job ID: 1777701841723547648
  • Last Price Increase: 2024-04-09
melvin-bot[bot] commented 7 months ago

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

ShridharGoel commented 7 months ago

Proposal

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

App redirects to Profile page when cleared status without saving

What is the root cause of that problem?

This seems to be expected.

It is happening because we are navigating back after clearing status inside clearStatus.

 InteractionManager.runAfterInteractions(() => {
      navigateBackToPreviousScreen();
  });
};

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

If we want to change this, we want simply remove the above. After update:

const clearStatus = () => {
    User.clearCustomStatus();
    User.updateDraftCustomStatus({
        text: '',
        emojiCode: '',
        clearAfter: DateUtils.getEndOfToday(),
    });
    formRef.current?.resetForm({[INPUT_IDS.EMOJI_CODE]: ''});
};
melvin-bot[bot] commented 7 months ago

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

melvin-bot[bot] commented 7 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01802fb0f898a8a8e6

miljakljajic commented 7 months ago

reviewing proposals

melvin-bot[bot] commented 7 months ago

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

FitseTLT commented 7 months ago

Intentional behaviour not a bug

c3024 commented 7 months ago

Actual Result: App redirects to Profile page when cleared status without saving. Status reappears for a moment when clear it only on Web

I don't see status reappearing on main. This is intentional behaviour and not a bug.

miljakljajic commented 7 months ago

I agree that this is expected - going to close out.