Skip to content

[HOLD for payment 2024-11-11] Remove GBR from the account settings on initial signup #47863

Closed

Description

@techievivek

Based on the discussion here:https://expensify.slack.com/archives/C07HPDRELLD/p1724334488573109?thread_ts=1724252245.683699&cid=C07HPDRELLD, we've decided to remove the GBR from the account settings that direct users to validate their login.
Screenshot 2024-08-22 at 7 29 17 PM

Problem

This step is an unnecessary diversion during the initial onboarding setup.
Screenshot 2024-08-22 at 7 29 10 PM
Account validation is only required for setting up 2FA and for wallet and bank account-related processes, where we have the validation path integrated into those specific flows.

Solution

Remove the GBR from the account settings that users encounter when signing up on NewDot.

Issue OwnerCurrent Issue Owner: @JmillsExpensify

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 22, 2024
  2. self-assigned this
    on Aug 22, 2024
  3. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 22, 2024
  4. melvin-bot commented on Aug 22, 2024

    @melvin-bot

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

  5. melvin-bot commented on Aug 22, 2024

    @melvin-bot

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

  6. FitseTLT commented on Aug 22, 2024

    @FitseTLT
    Contributor

    Proposal

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

    Remove GBR from the account settings on initial signup

    What is the root cause of that problem?

    New change : Remove GBR for initial sign up

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

    Remove this code

    if (hasLoginListInfo(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }

    What alternative solutions did you explore? (Optional)

  7. bernhardoj commented on Aug 22, 2024

    @bernhardoj
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-08-22 14:15:43 UTC.

    Proposal

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

    We don't want to show the GBR for new unvalidated user.

    What is the root cause of that problem?

    The GBR will show if the brick road indicator is returned from getLoginListBrickRoadIndicator.

    const contactMethodBrickRoadIndicator = UserUtils.getLoginListBrickRoadIndicator(loginList);

    There are 2 cases. 1 if there is an error which will show the RBR.

    function getLoginListBrickRoadIndicator(loginList: OnyxEntry<LoginList>): LoginListIndicator {
    if (hasLoginListError(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
    }
    if (hasLoginListInfo(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }
    return undefined;

    And the other one if one of the contact methods is not validated yet which will show the GBR.

    function hasLoginListInfo(loginList: OnyxEntry<LoginList>): boolean {
    return !Object.values(loginList ?? {}).every((field) => field.validatedDate);
    }

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

    We can remove the validated status check here (and on other components), so GBR won't show if there is a non-validated contact method.

    if (hasLoginListInfo(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }

    login A: validated
    login B: non-validated

    Before:
    GBR shows

    After:
    No GBR

    OR

    We can modify hasLoginListInfo to always return false if the login list is only 1, otherwise, use the current logic.

  8. cretadn22 commented on Aug 22, 2024

    @cretadn22
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-08-22 14:23:06 UTC.

    Proposal

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

    Remove GBR from the account settings on initial signup

    What is the root cause of that problem?

    New feature

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

    Remove these lines

    if (hasLoginListInfo(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }

    and remove () => !!loginList && UserUtils.hasLoginListInfo(loginList)

    const infoCheckingMethods: CheckingMethod[] = [() => !!loginList && UserUtils.hasLoginListInfo(loginList), () => SubscriptionUtils.hasSubscriptionGreenDotInfo()];

    What alternative solutions did you explore? (Optional)

  9. Krishna2323 commented on Aug 22, 2024

    @Krishna2323
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-09-03 14:02:45 UTC.

    Proposal

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

    Remove GBR from the account settings on initial signup

    What is the root cause of that problem?

    When hasLoginListInfo is true, we show the RBR.

    function hasLoginListInfo(loginList: OnyxEntry<LoginList>): boolean {
    return !Object.values(loginList ?? {}).every((field) => field.validatedDate);
    }
    /**
    * Gets the appropriate brick road indicator status for a given loginList.
    * Error status is higher priority, so we check for that first.
    */
    function getLoginListBrickRoadIndicator(loginList: OnyxEntry<LoginList>): LoginListIndicator {
    if (hasLoginListError(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
    }
    if (hasLoginListInfo(loginList)) {
    return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }
    return undefined;
    }

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

    • We should accept the current session in getLoginListBrickRoadIndicator, then pass it to hasLoginListInfo.
    function getLoginListBrickRoadIndicator(loginList: OnyxEntry<LoginList>, session: OnyxEntry<Session>): LoginListIndicator {
        if (hasLoginListError(loginList)) {
            return CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
        }
        if (hasLoginListInfo(loginList, session)) {
            return CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
        }
        return undefined;
    }
    • In hasLoginListInfo, we should filter out the current user and the run .every.
    function hasLoginListInfo(loginList: OnyxEntry<LoginList>, session: OnyxEntry<Session>): boolean {
        return !Object.values(loginList ?? {})
            .filter((field) => session?.email !== field.partnerUserID)
            .every((field) => field.validatedDate);
    }
    • If we also want to hide the GBR on contact methods page then we can check if the login is a default contact method or not and if so, we will not add the GBR.

    const login = loginList?.[loginName];
    const pendingAction = login?.pendingFields?.deletedLogin ?? login?.pendingFields?.addedLogin ?? undefined;
    if (!login?.partnerUserID && !pendingAction) {
    return null;
    }
    let description = '';
    if (session?.email === login?.partnerUserID) {
    description = translate('contacts.getInTouch');
    } else if (login?.errorFields?.addedLogin) {
    description = translate('contacts.failedNewContact');
    } else if (!login?.validatedDate) {
    description = translate('contacts.pleaseVerify');
    }
    let indicator;
    if (Object.values(login?.errorFields ?? {}).some((errorField) => !isEmptyObject(errorField))) {
    indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
    } else if (!login?.validatedDate) {
    indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
    }

            const isDefaultContactMethod = session?.email === login?.partnerUserID;
            let description = '';
            if (session?.email === login?.partnerUserID) {
                description = translate('contacts.getInTouch');
            } else if (login?.errorFields?.addedLogin) {
                description = translate('contacts.failedNewContact');
            } else if (!login?.validatedDate) {
                description = translate('contacts.pleaseVerify');
            }
            let indicator;
            if (Object.values(login?.errorFields ?? {}).some((errorField) => !isEmptyObject(errorField))) {
                indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
            } else if (!login?.validatedDate && !isDefaultContactMethod) {
                indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
            }

    Optional: We can subscribe to onyx to get the current session.

    What alternative solutions did you explore? (Optional)


    


    Result

    Monosnap.screencast.2024-08-22.19-50-33.mp4
  10. Krishna2323 commented on Aug 22, 2024

    @Krishna2323
    Contributor

    Proposal Updated

    • No change in solution or RCA, just added the result video.
  11. ntdiary commented on Aug 23, 2024

    @ntdiary
    Contributor

    seems like a simple problem, I would approve @bernhardoj's proposal, because they are point out the hasLoginListInfo function, and then suggested removing it from other components.

    🎀 👀 🎀 C+ reviewed

  12. 46 remaining items

  13. changed the title [-]Remove GBR from the account settings on initial signup[/-] [+][HOLD for payment 2024-11-11] Remove GBR from the account settings on initial signup[/+] on Nov 4, 2024
  14. melvin-bot commented on Nov 4, 2024

    @melvin-bot

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

  15. melvin-bot commented on Nov 4, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.56-9 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 2024-11-11. 🎊

    For reference, here are some details about the assignees on this issue:

    • @ntdiary requires payment through NewDot Manual Requests
    • @Krishna2323 requires payment (Needs manual offer from BZ)
  16. melvin-bot commented on Nov 4, 2024

    @melvin-bot

    @ntdiary @JmillsExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. melvin-bot commented on Nov 11, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@JmillsExpensify)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  18. JmillsExpensify commented on Nov 11, 2024

    @JmillsExpensify
    Contributor

    Payment summary:

  19. ntdiary commented on Nov 12, 2024

    @ntdiary
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other: new feature

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. *
      Based on this comment, it seems that we already have a test in place, just need to update it. :)

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  20. Krishna2323 commented on Nov 19, 2024

    @Krishna2323
    Contributor

    @JmillsExpensify, can you please send me an offer on Upwork? Thanks

  21. JmillsExpensify commented on Nov 19, 2024

    @JmillsExpensify
    Contributor

    Sure thing! Doing that now.

  22. JmillsExpensify commented on Nov 19, 2024

    @JmillsExpensify
    Contributor

    Offer sent.

  23. Krishna2323 commented on Nov 19, 2024

    @Krishna2323
    Contributor

    Offer accepted :)

  24. JmillsExpensify commented on Nov 19, 2024

    @JmillsExpensify
    Contributor

    All paid out. Thanks everyone! Pending NewDot payment can be requested, so I'm closing this one out.

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.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions