-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2025-01-02] Remove isArray checks for onboarding #53476
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Edited by proposal-police: This proposal was edited at 2024-12-03 16:11:19 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Remove isArray checks for onboarding What is the root cause of that problem?We're checking App/src/libs/onboardingSelectors.ts Line 14 in 2c78c93
App/src/libs/actions/Welcome/index.ts Line 46 in 2c78c93
App/src/libs/onboardingSelectors.ts Line 51 in 2c78c93
Line 8293 in 2c78c93
What changes do you think we should make in order to solve the problem?Remove App/src/libs/onboardingSelectors.ts Line 14 in 2c78c93
App/src/libs/actions/Welcome/index.ts Line 46 in 2c78c93
App/src/libs/onboardingSelectors.ts Line 51 in 2c78c93
Line 8293 in 2c78c93
We should also update the What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional) |
Problem:
Root Cause:The onboarding data structure has changed, but the code still checks for an array, causing redundancy and potential issues. Proposed Changes:Remove
Ensure all references to onboarding match its new structure. Test Scenarios:Verify onboarding flow works for old and new accounts. Alternative Solutions:Removing these checks is the best solution, no alternatives needed. |
FYI, when I just remove the check, I see this warning: @getusha Something to consider when looking at proposals. |
@carlosmiceli We also need to update |
Update the type of onboarding
to
Type assertion (if needed): If you can't change the type definition directly
Refactor conditional logic:After removing the |
Edited by proposal-police: This proposal was edited at 2024-12-03 17:50:10 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Remove isArray checks for onboarding What is the root cause of that problem?We are no longer sending arrays as Onboarding value, so we are removing them What changes do you think we should make in order to solve the problem?We need to do three things, 1 is to remove the usage of App/src/libs/onboardingSelectors.ts Line 51 in b255293
App/src/libs/onboardingSelectors.ts Line 14 in b255293
App/src/libs/actions/Welcome/index.ts Line 46 in b255293
Line 8295 in b255293
Also we need to remove the App/src/libs/actions/Welcome/index.ts Line 15 in b255293
Also need to clear the Lines 875 to 876 in b255293
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Instead of covering a extra test, we should remove an existing unit test which covers the array case: App/tests/unit/OnboardingSelectorsTest.ts Lines 11 to 14 in b255293
(This is also important) What alternative solutions did you explore? (Optional)N/A |
Just a note here: it's easy to remove the existing unit test while implementing the PR because the typecheck will fail after we remove array type from |
I would also like to note that proposals are meant to cover these cases that is why we have the new section in proposal template, it takes time to research and write a complete and correct proposal |
@carlosmiceli, @getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Removing @getusha since there's been no response. Asking in Slack for a new C+. |
Reviewing. |
Thanks all for your proposals. There are 2 minor improvements suggested by @twilight2294 that has not been covered by @nkdengineer. But I agree with @nkdengineer reasoning here #53476 (comment) that these are straight forward and can be easily discovered during implementation. Let's go with @nkdengineer proposal #53476 (comment) |
Current assignee @carlosmiceli is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@dominictb can you please re-evaluate the proposals, The new proposal format requires things like tests required and the places we need updates, the other contributors proposal also missed the updates for ONYXKEYS.ts , which is important.
This new part of the proposal is also important otherwise what sense does it make to add it when no one follows the format ? I think writing a clear and complete solution takes time, that is why we added tests too. in the rush of posting proposals first, these things are ignored, it really sets a wrong precedence that we should be quick that correct!. also other contributor realised that we need to remove those | [] assumptions after @carlosmiceli mentioned them here, so i request you to please re-evaluate the proposal here as I think i have a more correct and complete solution |
This is not urgent, so we should prioritize the cleanest and most robust solution. Are you sure that's the one you selected @dominictb ? |
Appreciate the input, everyone! To wrap things up, @nkdengineer's proposal tackled the key changes we needed, while @twighlight highlighted two additional cleanups that are pretty straightforward—those would have been flagged anyway as lint or type errors while pushing the code. Just a heads-up, my choice is based on the internal guidelines here. That said, I'll leave the final call to the internal engineer @carlosmiceli. Thanks again for the collaboration! |
To confirm @dominictb, are you saying to assign this to @nkdengineer and the added value to @twilight2294 ? |
Triggered auto assignment to @CortneyOfstad ( |
Fyi, @CortneyOfstad This should be split between @nkdengineer (main proposal) and @twilight2294 (improvement on top of the proposal). |
@carlosmiceli Thanks, I agree. I can take the PR phrase. |
@carlosmiceli — I'm a bit confused by the comment here. Are you referencing splitting the payment? |
Also, just a heads up — I will be OOO starting this afternoon (December 20th) and will be returning January 6th. A handful of folks on the BZ team will be online for a few days in between the 25th and the 1st, but we'll be operating with a skeleton crew. If there is any action needed from a BZ perspective, please post this issue in #expensify-open-source and someone on the team will jump in. Otherwise, I will review when I return on January 6th. Thanks and Happy Holidays! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.78-6 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 2025-01-02. 🎊 For reference, here are some details about the assignees on this issue:
|
@dominictb @CortneyOfstad @dominictb 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] |
We have a few
isArray
checks for displaying or not the onboarding flow. For example:We should clean this up since
onboarding
has changed and should never be an array. Please include videos of all the flows where we are making this change and showing that it's still working properly afterwards.Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: