Open techievivek opened 2 months ago
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (External
)
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.
Remove GBR from the account settings on initial signup
New change : Remove GBR for initial sign up
Remove this code https://github.com/Expensify/App/blob/bf5d7431ac4ea662215a3ae05268f880e63f7ccd/src/libs/UserUtils.ts#L60-L62
Edited by proposal-police: This proposal was edited at 2024-08-22 14:15:43 UTC.
We don't want to show the GBR for new unvalidated user.
The GBR will show if the brick road indicator is returned from getLoginListBrickRoadIndicator
.
https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/pages/settings/Profile/ProfilePage.tsx#L71
There are 2 cases. 1 if there is an error which will show the RBR. https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/libs/UserUtils.ts#L56-L63
And the other one if one of the contact methods is not validated yet which will show the GBR. https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/libs/UserUtils.ts#L48-L50
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. https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/libs/UserUtils.ts#L60-L62
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.
Edited by proposal-police: This proposal was edited at 2024-08-22 14:23:06 UTC.
Remove GBR from the account settings on initial signup
New feature
Remove these lines https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/libs/UserUtils.ts#L60-L62
and remove () => !!loginList && UserUtils.hasLoginListInfo(loginList)
https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/components/Indicator.tsx#L66
Edited by proposal-police: This proposal was edited at 2024-09-03 14:02:45 UTC.
Remove GBR from the account settings on initial signup
When hasLoginListInfo
is true, we show the RBR.
https://github.com/Expensify/App/blob/ed04ac47da2194e279d4a4a6225280f755148bda/src/libs/UserUtils.ts#L48-L64
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;
}
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);
}
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.
https://github.com/user-attachments/assets/a7f80b54-a2c1-4f3e-9d9d-fcb845ebd109
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
Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@ntdiary, I guess we only need to remove the GBR which is shown on initial signup. Removing hasLoginListInfo
will never show the GRB when user has another unvalidated account.
we've decided to remove the GBR from the account settings that direct users to validate their login.
seems like a simple problem,
@ntdiary Yeah it is a simple and straightforward problem with simple fix that's why I am giving clear simple proposal I don't know why you are not selecting my proposal which has the same solution as the selected proposal but was the first. cc @techievivek
@ntdiary, I guess we only need to remove the GBR which is shown on initial signup. Removing hasLoginListInfo will never show the GRB when user has another unvalidated account.
@Krishna2323, interesting guess, I previously thought the three GBRs in the OP would be completely removed. I can't see the Slack discussion in the OP, so maybe @techievivek can help clarify this behavior further. Also, if the Contact Method Page remains as it is, this means that when there is only one GBR on this page, the three GBRs above won't be displayed, However, if I add a new contact method, those three GBRs will appear. Is this behavior expected? 😂
@ntdiary Yeah it is a simple and straightforward problem with simple fix that's why I am giving clear simple proposal I don't know why you are not selecting my proposal which was the first.
@FitseTLT, because your proposal only mentioned modifying the getLoginListBrickRoadIndicator
function and didn't mention the Avatar Indicator.
When I reviewed this issue, there were already four proposals, so I chose the first one that seemed more comprehensive and meaningful to me.
Of course, this is just my personal opinion. In the past, some issues were assigned to whoever responded first, but I'm not sure if that applies here, we can leave it up to @techievivek to decide. 😄
@JmillsExpensify, @ntdiary, @techievivek Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Hi @techievivek, when you have some time, could you clarify this case: If a user successfully signs up and then adds a new contact method, should we display the three GBRs in the OP? 🙂
That's a good question. I'm not entirely sure what the expected behavior should be. On the one hand, since the user's primary login still needs to be verified, it doesn't make sense to display the GBR to direct the user to verify another login, as verifying this login would make it their primary login. However, on the other hand, we might still want to show the GBR because the user has voluntarily added this login method and may want to validate it.
CC @JmillsExpensify @danielrvidal for thoughts on the above.
If someone adds a secondary login I think it makes sense to add the GBR to all the logins so they know they need to verify them. By that chance, they are taking actions to use us, and thus, we're not as worried about making sure they only see GBRs for onboarding. Curious if @JmillsExpensify agrees on that one?
@JmillsExpensify, @ntdiary, @techievivek Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Not overdue, reached out to Jason for his thoughts on above point.
Apologies for missing this. I agree with ya'll that we should show GBR for the case where a user has explicitly added a secondary login, as they can't use that until it's verified.
Ok, thanks for confirming the behavior here. @ntdiary we should be good to move forward now.
Ok, thanks for confirming the behavior here. @ntdiary we should be good to move forward now.
@techievivek, Thank you! Then, to summarize, if I understand correctly, when the user signs up for the first time, we want all four GBRs in the image below to be removed. And if the user explicitly adds a second contact method, these four GBRs will be shown, right? 😄 (or more precisely, there will be five because of the two contact methods)
If that's right, @Krishna2323's proposal is the closest, but the contact methods page still isn't meeting the expected result.
@ntdiary, I think we should keep the GBR on the contact method page even for the primary login to validate.
I have updated my proposal if we want to hide the GBR on the contact method page also.
I have updated my proposal if we want to hide the GBR on the contact method page also.
I think we can move forward with @Krishna2323's proposal.
cc @techievivek
Additionally, just a tiny suggestion, I think using every
could be enough? :)
!Object.values(loginList ?? {})
.filter((field) => session?.email !== field.partnerUserID)
.every((field) => field.validatedDate);
==>
!Object.values(loginList ?? {})
.every((field) => field.validatedDate || (session?.email === field.partnerUserID));
@JmillsExpensify @ntdiary @techievivek this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Then, to summarize, if I understand correctly, when the user signs up for the first time, we want all four GBRs in the image below to be removed. And if the user explicitly adds a second contact method, these four GBRs will be shown, right? 😄 (or more precisely, there will be five because of the two contact methods)
Yes, we only want to remove the GBR during the initial signup. Once the user starts exploring the app and adding things explicitly, it should function as normal.
@Krishna2323 Assigned the GH to you, can you get started with the PR?
@techievivek, thanks for assigning. I will try my best to raise the PR today, but if not, I will definitely raise it by tomorrow.
@ntdiary, PR ready for review ^
Looks like we haven't made a progress for a while here, any updates?
This issue has not been updated in over 15 days. @JmillsExpensify, @ntdiary, @techievivek, @Krishna2323 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
PR #49445 that we’ve been waiting for was merged today, so we'll continue to push forward with our PR #49004 later. :)
⚠️ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
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.
Problem
This step is an unnecessary diversion during the initial onboarding setup.
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.