Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Workspace - Selection for cancellation reason resets after page refresh #47005

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 7, 2024 · 27 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 7, 2024

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.17-4
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): bezawitgebremichael+s1@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Click on settings and navigate to workspace
  3. Create a new workspace
  4. Go back and navigate to subscription page
  5. Click on "Request early cancellation"
  6. Select one of the radio buttons
  7. Refresh the page

Expected Result:

Selection is retained even after a refresh since this is the behavior in other places of the app

Actual Result:

Selection resets after page is refreshed

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: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6552954_1721931896995.4_5841379217341683133.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01284e186343122886
  • Upwork Job ID: 1821489506725093881
  • Last Price Increase: 2024-08-08
Issue OwnerCurrent Issue Owner: @
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

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

@mkzie2
Copy link
Contributor

mkzie2 commented Aug 8, 2024

Proposal

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

Selection resets after page is refreshed

What is the root cause of that problem?

The feedback survey component doesn't use FormProvider to save the draft value of the form.

The reason and note have the default state as empty then these values are reset every time this component is mounted
https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/components/FeedbackSurvey.tsx#L57-58

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

We should use FormProvider in FeedbackSurvey with shouldSaveDraft as true for each InputWrapper. Keep all Text components, only change the reason selector and the note input to InputWrapper.

  • For the reason selector, we're using SingleOptionSelector, we can replace this with RadioButtons as we do here or we can config to accept SingleOptionSelector as a valid InputComponent of InputWrapper

<SingleOptionSelector

  • For the note field, simply use InputWrapper with InputComponent as TextInput

  • This form has a footerText before the submit button so we can keep the component here and pass isSubmitButtonVisible as false to hide the default submit button of FormProvider

    <FixedFooter>
    {!!footerText && footerText}

  • Because FeedbackSurvey form is used in many places, we should accept a new prop formID in this component. Then for each page, we can pass a unique formID to store the draft value individually

What alternative solutions did you explore? (Optional)

NA

Copy link

melvin-bot bot commented Aug 8, 2024

📣 @mkzie2! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@VictoriaExpensify
Copy link
Contributor

Agree this is a bug that should be fixed

@VictoriaExpensify VictoriaExpensify added the External Added to denote the issue can be worked on by a contributor label Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01284e186343122886

@melvin-bot melvin-bot bot changed the title Workspace - Selection for cancellation reason resets after page refresh [$250] Workspace - Selection for cancellation reason resets after page refresh Aug 8, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

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

@mkzie2
Copy link
Contributor

mkzie2 commented Aug 8, 2024

I can create a branch for this issue with my proposal if we need the implementation details.

@ntdiary
Copy link
Contributor

ntdiary commented Aug 8, 2024

I can create a branch for this issue with my proposal if we need the implementation details.

Don't worry, your proposal is clear, I can understand it and expect to complete the review by tomorrow morning (about 10-14 hours from now). 😄

@ntdiary
Copy link
Contributor

ntdiary commented Aug 9, 2024

I think @mkzie2's proposal is reasonable. We can use FormProvider to polish the RequestEarlyCancellationPage and DisableAutoRenewSurveyPage pages. :)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 9, 2024

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

@mkzie2

This comment was marked as off-topic.

Copy link

melvin-bot bot commented Aug 9, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@mkzie2
Copy link
Contributor

mkzie2 commented Aug 9, 2024

Thanks for your kind feedback @ntdiary 🙇

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 9, 2024
Copy link

melvin-bot bot commented Aug 9, 2024

📣 @mkzie2 You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Weekly KSv2 label Aug 12, 2024
@mkzie2
Copy link
Contributor

mkzie2 commented Aug 12, 2024

@stitesExpensify Can you approve workflows for #47223?

@stitesExpensify
Copy link
Contributor

Done

@ntdiary
Copy link
Contributor

ntdiary commented Aug 29, 2024

PR was deployed to prod on Aug 20. :)

@mkzie2
Copy link
Contributor

mkzie2 commented Aug 31, 2024

@VictoriaExpensify Can you handle payment for this?

@ntdiary
Copy link
Contributor

ntdiary commented Sep 5, 2024

@VictoriaExpensify Can you handle payment for this?

friendly bump, @VictoriaExpensify. 🙂

@VictoriaExpensify VictoriaExpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Sep 10, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

Current assignee @ntdiary is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 10, 2024
@VictoriaExpensify
Copy link
Contributor

VictoriaExpensify commented Sep 10, 2024

Hi @mkzie2 - I'm having trouble finding your Upwork profile to send you a job offer. Could you please either apply to the job we've shared here or share your Upwork profile here?

@VictoriaExpensify
Copy link
Contributor

Payment summary:
Contributor: @mkzie2 waiting for them to apply to the Upwork job
Contributor+: @ntdiary owed $250 via NewDot

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 10, 2024

@JmillsExpensify
Copy link

$250 approved for @ntdiary

@VictoriaExpensify
Copy link
Contributor

Thanks @mkzie2 . Please accept the offer so I can finalise your payment - https://www.upwork.com/nx/wm/offer/103908147

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 11, 2024

@VictoriaExpensify Done, thanks

@VictoriaExpensify
Copy link
Contributor

Payment summary:
Contributor: @mkzie2 paid $250 via Upwork

Thanks for your work on this @mkzie2 and @ntdiary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants