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

[HOLD for payment 2023-04-14] [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns #16349

Closed
6 tasks done
kavimuru opened this issue Mar 21, 2023 · 66 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Design External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Mar 21, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click on profile avatar
  2. Click on profile
  3. Click on Pronouns
  4. Search pronoun
  5. Select a pronoun from the search results list
  6. Try to remove the applied pronoun

Expected Result:

A feature to remove the added pronoun should be available

Actual Result:

There is no feature that supports removing applied pronouns, the available option is changing pronouns only

Workaround:

unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.87-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Recording.14.mp4
Pronouns.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679123540639329

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0179e823ce97e8d1de
  • Upwork Job ID: 1638619807394324480
  • Last Price Increase: 2023-03-22
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 21, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@varshamb
Copy link
Contributor

varshamb commented Mar 22, 2023

Proposal

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

New feature to unselect the Pronouns.

What is the root cause of that problem?

There is no way to unselect an option.

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

We need to check if new selected value of Pronouns is same as current value, if it is same then pass NULL value to API.

Video after applying solution:

Screen.Recording.2023-03-22.at.1.22.34.PM.mov

@MelvinBot
Copy link

📣 @varshamb! 📣

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. 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.
  2. 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.
  3. 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>

@Natnael-Guchima
Copy link

Natnael-Guchima commented Mar 22, 2023

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0135b3a84ec2709c21

@MelvinBot
Copy link

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@MelvinBot
Copy link

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

@trjExpensify
Copy link
Contributor

@puneetlath you happy with this proposed pattern for deselect? It seems pretty straightforward to me.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Mar 22, 2023
@melvin-bot melvin-bot bot changed the title There is no feature to remove preferred pronouns once a user adds preferred pronouns [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns Mar 22, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~0179e823ce97e8d1de

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 22, 2023
@MelvinBot
Copy link

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

@Prince-Mendiratta
Copy link
Contributor

Proposal

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

When a pronoun has been chosen by the user, there is no way to remove pronouns from your profile.

What is the root cause of that problem?

This is a feature request, rather than a bug. In the above proposal, it mentions being able to "unselect" your pronoun by selecting the pronoun again. This kind of behaviour is not used anywhere in the app as far as I know and wouldn't be intuitive for the user.

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

When the Pronouns Page opens, we currently do not show a default value. I propose that if the pronouns have been set by the user, we show them in the text field by default and also show a "Clear Pronouns" button below the text input. If the user clicks on that, the data will be cleared and the user will be redirected to the Profile Page. If the user has not set any pronoun, the button will not be visible.

@dhairyasenjaliya
Copy link
Contributor

dhairyasenjaliya commented Mar 23, 2023

Proposal

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

  • There is no feature to remove preferred pronouns once a user adds preferred pronouns

What is the root cause of that problem?

  • After refactoring the Pronouns component we never add any validation or any feature to remove the selected Pronouns value

  • We are also not displaying the current selected Pronouns to the user

  • Currently, we are using <OptionsSelector> for search input adding a default name and the clear button will definitely look weird

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

  • IMO we should re-use the <TestToolRow> component to display the Pronouns name and clear button which will look like the one below that actually blends well with the current design cc @shawnborton

Screenshot 2023-03-23 at 9 50 51 AM

  • We are already using <TestToolRow> component for invalid auth status and destroy credential

Screenshot 2023-03-23 at 10 08 19 AM

  • In order to show the currently selected pronouns by the user we should define one function that returns selected pronouns like below and add it to the PronounsPage.js
PronounsPage.js
+    /**
+     * Fetch the actually selected pronouns from currentUserPersonalDetails
+     *
+     * @returns {string}
+    */
+    getPronouns = () => {
+       let pronounsKey = lodashGet(this.props.currentUserPersonalDetails, 'pronouns', '');
+        if (pronounsKey.startsWith(CONST.PRONOUNS.PREFIX)) {
+            pronounsKey = pronounsKey.slice(CONST.PRONOUNS.PREFIX.length);
+       }
+        return lodashGet(this.props.translate('pronouns'), pronounsKey, null);
+    };
  • Once the getPronouns() is defined we need to add <TestToolRow> we will render this component if there are any selected pronouns founded
+ const selectedPronouns = this.getPronouns();
+ <TestToolRow title={selectedPronouns}>
+      <Button
+           small
+           text="Clear Pronouns"
+           onPress={() => this.updatePronouns('')} // Clear the selected Pronouns
+      />
+ </TestToolRow>
  • Note other changes can be done at PR

Result

Simulator.Screen.Recording.-.iPhone.14.-.2023-03-23.at.09.36.38.mp4

cc @marcochavezf

@MelvinBot
Copy link

Auto-assign attempt failed, all eligible assignees are OOO.

@puneetlath
Copy link
Contributor

Ah looks like Shawn is OOO, but @shawnborton when you're back perhaps you can give us some thoughts on what you think the best approach is for this given that there is no existing pattern in the app.

@mollfpr
Copy link
Contributor

mollfpr commented Mar 23, 2023

@puneetlath Can we hold this to prevent it's doubling?

@puneetlath puneetlath changed the title [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns [HOLD] [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns Mar 23, 2023
@puneetlath puneetlath changed the title [HOLD] [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns [HOLD for design] [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns Mar 23, 2023
@puneetlath
Copy link
Contributor

That makes sense to me. @trjExpensify feel free to change if you disagree.

@trjExpensify
Copy link
Contributor

Yeah, I'm not sure I agree with the clear pronouns button, it seems pretty heavy. Whatever we do here should extend to other places we'll be using the list pattern i.e categories, tags etc.

I think tapping the selected value in the list to deselect it works, IMO. It's kinda' subtle, but it would make sense that when you tap the value that has a green tick, it deselects that value.

@situchan
Copy link
Contributor

@situchan is there a PR for this yet?

I am not assigned yet. Waiting for @marcochavezf's approval

@melvin-bot melvin-bot bot added the Overdue label Apr 3, 2023
@marcochavezf
Copy link
Contributor

Hi guys, sorry for the delay here. Assigning @situchan

@melvin-bot melvin-bot bot removed the Overdue label Apr 3, 2023
@marcochavezf
Copy link
Contributor

I wasn't aware of it, so please consider the proposal to be fair with my time.

@varshamb thank you for bringing this to our attention. We understand that everyone's time is valuable, and we want to ensure that our system takes that into consideration. We're planning to expand our system to consider the effort a contributor spends to figure out a solution (even if the proposal is not selected). Meanwhile, we encourage you to keep posting proposals on other reported bugs and sharing your thoughts with us.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 3, 2023
@MelvinBot
Copy link

📣 @situchan You have been assigned to this job by @marcochavezf!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Apr 3, 2023
@situchan
Copy link
Contributor

situchan commented Apr 3, 2023

@mollfpr @marcochavezf PR is ready for review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 7, 2023
@melvin-bot melvin-bot bot changed the title [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns [HOLD for payment 2023-04-14] [$1000] There is no feature to remove preferred pronouns once a user adds preferred pronouns Apr 7, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 7, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

MelvinBot commented Apr 7, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.96-4 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 2023-04-14. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Apr 7, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@mollfpr / @marcochavezf] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr / @marcochavezf] 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:
  • [@mollfpr / @marcochavezf] 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:
  • [@trjExpensify] Determine if we should create a regression test for this bug.
  • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@marcochavezf
Copy link
Contributor

We didn't have the option to unselect the preferred pronouns since the feature was implemented, so technically, no bug introduced this behavior. Also, I think the regression test steps will be enough to prevent this issue in the future. I checked off the corresponding checkboxes.

@trjExpensify
Copy link
Contributor

[@trjExpensify] Determine if we should create a regression test for this bug.

@zanyrenney @twisterdotcom @Beamanator presumably, once the account settings project is complete, the regression tests will be added to accommodate the changes right? Given that, I don't think I'll add to a competing standalone one here for removing pronouns.

@trjExpensify
Copy link
Contributor

Alrighty, payments..

@situchan - $1,500 for the fix + #urgency bonus
@mollfpr - $1,500 for C+ + #urgency bonus
@Natnael-Guchima - $250 for the bug report*

*it could be debated that this was a feature request, but I think it was more of an oversight on implementation really, so I'm going to pay out the bug report on it.

Offers sent!

@trjExpensify
Copy link
Contributor

Settled up with @situchan 👍

@mollfpr
Copy link
Contributor

mollfpr commented Apr 13, 2023

@trjExpensify Accepted, thank you!

@Natnael-Guchima
Copy link

@trjExpensify Accepted. Thank you!

@trjExpensify
Copy link
Contributor

Cool, settled up with everyone. Thanks!

@Beamanator
Copy link
Contributor

[@trjExpensify] Determine if we should create a regression test for this bug.

@zanyrenney @twisterdotcom @Beamanator presumably, once the account settings project is complete, the regression tests will be added to accommodate the changes right? Given that, I don't think I'll add to a competing standalone one here for removing pronouns.

Agreed @trjExpensify - that's one of the final tasks in the project, hoping that will happen soon - making sure all the TestRail steps are available for all the new pages 🙏 We've been adding a few as we go, but will definitely do a final sweep at the end 👍

@trjExpensify
Copy link
Contributor

Awesome, that's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Design External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests