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-10-02] [$250] Migrate OnfidoStep.js to function component #16235

Closed
1 task
marcaaron opened this issue Mar 20, 2023 · 33 comments
Closed
1 task
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.

Comments

@marcaaron
Copy link
Contributor

marcaaron commented Mar 20, 2023

Class Component Migration

Filenames

Task

  • We currently have some class components in our codebase that we would like to refactor to a function component.
  • Here's a link with some general advice on how to refactor a class component to a function component: https://react.dev/reference/react/Component#alternatives
  • If you need additional guidance, please ask in #expensify-open-source
  • Test for any regressions and verify that there are no breaking changes
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0116d0baefad9a4a03
  • Upwork Job ID: 1703726382146158592
  • Last Price Increase: 2023-09-18
@marcaaron marcaaron added Engineering Improvement Item broken or needs improvement. labels Mar 20, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Mar 20, 2023
@Expensify Expensify unlocked this conversation Mar 21, 2023
@marcaaron marcaaron changed the title [HOLD] Migrate OnfidoStep.js to function component [HOLD][$250] Migrate OnfidoStep.js to function component Apr 13, 2023
@MelvinBot
Copy link

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

@marcaaron
Copy link
Contributor Author

Heads up! The pricing for this issue has been adjusted based on the scope of the work and the fact that no complex bug investigations or proposal are required.

@vdem0115
Copy link

vdem0115 commented Jul 4, 2023

I would like to work on this issue.

@olexyt
Copy link
Contributor

olexyt commented Jul 7, 2023

I can work on this issue.

@rayane-djouah
Copy link
Contributor

Can I work on this?

@mejed-alkoutaini
Copy link

I'm able to work on this if needed!

@neonbhai
Copy link
Contributor

neonbhai commented Jul 13, 2023

I would love to work on this

@KrAbhas
Copy link
Contributor

KrAbhas commented Jul 19, 2023

Can I work on this?

@adhorodyski
Copy link
Contributor

Hey! 👋 I’m from Callstack, an expert agency, and I’d like to work on this issue.

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

📣 @adhorodyski! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0116d0baefad9a4a03

@mountiny mountiny changed the title [HOLD][$250] Migrate OnfidoStep.js to function component [$250] Migrate OnfidoStep.js to function component Sep 18, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@ghost
Copy link

ghost commented Sep 18, 2023

Dibs

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 18, 2023
@the-mold
Copy link
Contributor

dibs

@carlitose
Copy link

carlitose commented Sep 18, 2023

Hello Expensify Team,

As requested, I prepared a strategy for converting the class component OnfidoStep.js to a functional one.

  1. Analyze the Code: The first step will be to understand the existing class component thoroughly and identify its dependencies and functionality.

  2. Conversion Strategy: Given that the OnfidoStep.js doesn't make use of local state, lifecycle methods, or refs, I will directly convert it into a functional component. Let's convert the class methods and other functionalities as follows:

    • Convert the canShowOnfido() method to a function inside our new functional component.
  3. Refactor the Class Component: Once I have a clear understanding of the component and a strategy in place, I'll refactor the class component into a functional one.

    • Here is a basic skeleton of what the converted functional component would look like:
    const OnfidoStep = (props) => {
        const canShowOnfido = () => {
            // existing logic...
        }
    
        // Return statement remains same...
    }
  4. Testing: After refactoring, I will meticulously run various tests to confirm the component operates as expected and doesn’t introduce any regressions.

  5. Pull Request submission: I will prepare the final commit, summarizing the changes made. Upon completion, I'll create a pull request and provide screenshots of the successful refactored component and other necessary evidence.

I trust that my experience with React and JavaScript will enable a seamless conversion of the component while retaining full functionality.

I look forward to your favorable consideration,

Carlo


Replace [Your Name] with your real name. Be sure to personalize this proposal based on your own skills, experiences, and the specifics of the project
Contributor details
Your Expensify account email: carlog.sergi@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01b0d12422bbdbf2d3

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 20, 2023
@adhorodyski
Copy link
Contributor

PR: #27784

@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

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

@mountiny mountiny assigned mountiny and robertjchen and unassigned robertjchen and mountiny Sep 22, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title [$250] Migrate OnfidoStep.js to function component [HOLD for payment 2023-10-02] [$250] Migrate OnfidoStep.js to function component Sep 25, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

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

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

  • @adhorodyski does not require payment (Contractor)
  • @thesahindia does not require payment (Eligible for Manual Requests)

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

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

@robertjchen, @mallenexpensify, @adhorodyski, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@mallenexpensify
Copy link
Contributor

@adhorodyski can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~0116d0baefad9a4a03

I'm guessing we don't need a regression test for this, correct me if I'm wrong @thesahindia

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 4, 2023
@melvin-bot melvin-bot bot removed the Overdue label Oct 9, 2023
@mallenexpensify
Copy link
Contributor

mallenexpensify commented Oct 9, 2023

D'oh, didn't realize @adhorodyski was CallStack.

Issue reporter: N/A - internal
Contributor: @adhorodyski is with CallStack and paid via invoice.
Contributor+: @thesahindia is due $250 via NewDot

@thesahindia
Copy link
Member

thesahindia commented Oct 19, 2023

@mallenexpensify, I am requesting $250 for the C+ review. Can you please confirm that it's the right amount? We need a confirmation before Jason can approve the payment.

@mallenexpensify
Copy link
Contributor

Thanks for the ping @thesahindia , unsure how I missed you, sorry. I updated the post above to reflect

Contributor+: @thesahindia is due $250 via NewDot

@JmillsExpensify
Copy link

$250 payment approved for @thesahindia based on BZ summary.

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 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.
Projects
None yet
Development

No branches or pull requests