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 2024-05-02] [$250] [TS Migration] Remove underscore completely #39121

Closed
mountiny opened this issue Mar 27, 2024 · 28 comments
Closed
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Task Typescript Migration

Comments

@mountiny
Copy link
Contributor

mountiny commented Mar 27, 2024

Follow up issue for TS migration project. Coming from this spreadsheet

Remove underscore completely

Should be straightforward once ready, needs to be tested well

cc @blazejkustra @fabioh8010

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014598e5194edc8278
  • Upwork Job ID: 1780195244607991808
  • Last Price Increase: 2024-04-16
  • Automatic offers:
    • hungvu193 | Reviewer | 0
    • bernhardoj | Contributor | 0
@mountiny mountiny changed the title [TS Migration] Remove underscore completely [HOLD TS migration completion] [TS Migration] Remove underscore completely Mar 28, 2024
@blazejkustra
Copy link
Contributor

Details:

Simply remove underscore package along with all the usage in the codebase, instead use native methods or lodash as a last resort.

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@mountiny mountiny changed the title [HOLD TS migration completion] [TS Migration] Remove underscore completely [TS Migration] Remove underscore completely Apr 16, 2024
@mountiny mountiny added External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. labels Apr 16, 2024
@melvin-bot melvin-bot bot changed the title [TS Migration] Remove underscore completely [$250] [TS Migration] Remove underscore completely Apr 16, 2024
Copy link

melvin-bot bot commented Apr 16, 2024

Job added to Upwork: https://www.upwork.com/jobs/~014598e5194edc8278

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 16, 2024
Copy link

melvin-bot bot commented Apr 16, 2024

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

Copy link

melvin-bot bot commented Apr 16, 2024

Triggered auto assignment to @MitchExpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Overdue Weekly KSv2 Daily KSv2 labels Apr 16, 2024
@mountiny
Copy link
Contributor Author

Looking for proposlas on how to tackle this deprecation holistically, one or many PRs, how to divide them?

@ghost
Copy link

ghost commented Apr 16, 2024

Dibs

@ghost
Copy link

ghost commented Apr 16, 2024

Do we need to post a formal proposal for it?

@aneequeahmad
Copy link
Contributor

aneequeahmad commented Apr 16, 2024

I can take up this issue. i think one PR would be enough to fix it.

@mountiny
Copy link
Contributor Author

Yes, please post how you want to approach this

@mountiny mountiny added the Daily KSv2 label Apr 16, 2024
@abzokhattab
Copy link
Contributor

abzokhattab commented Apr 16, 2024

Proposal

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

Remove underscore completely

What is the root cause of that problem?

Remove underscore completely

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

Remove underscore completely from these files and replace it with the lodash lib.

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 16, 2024

Proposal

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

Remove the use of underscore

What is the root cause of that problem?

None

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

All files that are using underscore now are js file. We can remove underscore belong with migrate these files to typescript. If we update to use the lodash we still need another phrase to migrate these files to typescript. So I think the best way to do here is migrate these files as the image below to typescript.

Screenshot 2024-04-16 at 18 30 21

What alternative solutions did you explore? (Optional)

NA

@bernhardoj
Copy link
Contributor

bernhardoj commented Apr 16, 2024

Proposal

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

We want to remove underscore usage.

What is the root cause of that problem?

No root cause

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

There are 9 usages of underscore left.
image

6 out of 9 usages of underscore are being used in a prop types file and only transactionPropTypes and reportPropTypes that is still being used.

The plan is:

  1. Delete unused prop types files
  2. Replace underscore with JS native code

We can do it in 1 PR or 2 PR for each component file, BaseOptionsSelector and MoneyTemporaryForRefactorRequestParticipantSelector to reduce the scope for each PR.

The first PR will replace the underscore usages from MoneyTemporaryForRefactorRequestParticipantSelector, transactionPropTypes, and reportPropTypes and delete the unused prop types files.

The second PR will replace the underscore usages from BaseOptionsSelector.

MoneyRequestParticipantsSelector isn't being used anymore so we can skip it.

@hungvu193
Copy link
Contributor

Thanks @blazejkustra.

@mountiny mountiny self-assigned this Apr 16, 2024
@mountiny
Copy link
Contributor Author

@hungvu193 all is migrated, just need to remove the underscore and then also remove the dependency. Can you check which proposals look the best for you?

@hungvu193
Copy link
Contributor

@bernhardoj's proposal here LGTM.
Just a suggestion, I think 1 PR is enough for removing underscore usages. The second PR should remove the underscore dependency, such as eslint config, webpack config,..

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 17, 2024

Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

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

melvin-bot bot commented Apr 17, 2024

📣 @hungvu193 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 17, 2024

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer 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 Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 17, 2024
@bernhardoj
Copy link
Contributor

PR is here

@blazejkustra
Copy link
Contributor

Just a suggestion, I think 1 PR is enough for removing underscore usages. The second PR should remove the underscore dependency, such as eslint config, webpack config,..

Why not just one PR that removes underscore completely?

@hungvu193
Copy link
Contributor

Just a suggestion, I think 1 PR is enough for removing underscore usages. The second PR should remove the underscore dependency, such as eslint config, webpack config,..

Why not just one PR that removes underscore completely?

Oh I thought that will be a lots of changes if we include everything in a PR. But now I'm seeing that you're also reviewing it so I think that's fine with me.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] [TS Migration] Remove underscore completely [HOLD for payment 2024-05-02] [$250] [TS Migration] Remove underscore completely Apr 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

Copy link

melvin-bot bot commented Apr 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.65-5 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-05-02. 🎊

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

Copy link

melvin-bot bot commented Apr 25, 2024

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

  • [@hungvu193] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@MitchExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@MitchExpensify
Copy link
Contributor

Reminder set to Pay.

Payment summary:

$250 @hungvu193 requires payment automatic offer (Reviewer)
$250 @bernhardoj requires payment automatic offer (Contributor)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 1, 2024
@MitchExpensify
Copy link
Contributor

Paid and contracts ended

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 Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Task Typescript Migration
Projects
No open projects
Development

No branches or pull requests

8 participants