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-07-26] [$250] Migrate CategoryShortcutButton.js to function component #16143

Closed
1 task
marcaaron opened this issue Mar 20, 2023 · 41 comments
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/~01fb802482a26469f9
  • Upwork Job ID: 1679301991414870017
  • Last Price Increase: 2023-07-13
@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 CategoryShortcutButton.js to function component [HOLD][$250] Migrate CategoryShortcutButton.js to function component Apr 13, 2023
@kuluruvineeth
Copy link

Proposal

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

-> Class Component Migration for CategoryShortcutButton Component

What is the root cause of that problem?

-> class components are more verbose and harder to reason about than functional components.

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

-> Convert CategoryShortcutButton to functional component by removing extends Component , receiving props as input parameter and using arrow functionality syntax.
-> Use useState hook to create and update isHighlighted and setIsHighlighted component state property with the initial value as false.
-> For onHoverIn parameter of Pressable Component, I would write inline function to set isHighlighted to true.
-> For onHoverOut parameter of Pressable Component, I would write inline function to set isHighlighted to false.

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Daily KSv2 label Apr 29, 2023
@MelvinBot
Copy link

Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label May 2, 2023
@MelvinBot
Copy link

Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MelvinBot
Copy link

Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented May 8, 2023

Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@melvin-bot
Copy link

melvin-bot bot commented May 10, 2023

10 days overdue. I'm getting more depressed than Marvin.

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

12 days overdue now... This issue's end is nigh!

@muxriddinmuqimov77
Copy link

I'd like to work on this issue

@dummy-1111
Copy link
Contributor

I'd love to work on this.

@AGarciaNY
Copy link
Contributor

I would like to work on this issue

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

📣 @AGarciaNY! 📣
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. 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.
  2. 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.
  3. 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>

@AGarciaNY
Copy link
Contributor

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~014058e940367a0a40

@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@olexyt
Copy link
Contributor

olexyt commented Jul 7, 2023

I can work on this issue.

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 7, 2023
@puneetlath puneetlath changed the title [HOLD][$250] Migrate CategoryShortcutButton.js to function component [$250] Migrate CategoryShortcutButton.js to function component Jul 7, 2023
@mooyg
Copy link

mooyg commented Jul 14, 2023

Is their any update on this? Can I work on this?

@Santhosh-Sellavel
Copy link
Collaborator

@sakluger Can you assign a new CME as @puneetlath is OOO?

puneetlath added a commit that referenced this issue Jul 14, 2023
feat[issue #16143]:  Changed CategoryShortcutButton class component
@puneetlath
Copy link
Contributor

I happened to see this, so went ahead and reviewed/merged. No need to re-assign @sakluger.

@Santhosh-Sellavel
Copy link
Collaborator

Thanks @puneetlath!

@sakluger
Copy link
Contributor

This issue is a bit different from what I'm used to. @marcaaron @puneetlath I assume that I need to hire and pay @AGarciaNY $250 through Upwork (@Santhosh-Sellavel requests payment through NewDot)?

The linked PR was deployed to staging today, so estimated payment date is July 25.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 19, 2023
@melvin-bot melvin-bot bot changed the title [$250] Migrate CategoryShortcutButton.js to function component [HOLD for payment 2023-07-26] [$250] Migrate CategoryShortcutButton.js to function component Jul 19, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.42-26 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-07-26. 🎊

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

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

@puneetlath
Copy link
Contributor

This issue is a bit different from what I'm used to. @marcaaron @puneetlath I assume that I need to hire and pay @AGarciaNY $250 through Upwork (@Santhosh-Sellavel requests payment through NewDot)?

Yes, that sounds correct to me.

1 similar comment
@puneetlath
Copy link
Contributor

This issue is a bit different from what I'm used to. @marcaaron @puneetlath I assume that I need to hire and pay @AGarciaNY $250 through Upwork (@Santhosh-Sellavel requests payment through NewDot)?

Yes, that sounds correct to me.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 25, 2023
@puneetlath puneetlath added Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jul 25, 2023
@Santhosh-Sellavel
Copy link
Collaborator

Request $250 on ND

@JmillsExpensify
Copy link

Reviewed details for @Santhosh-Sellavel. This is accurate and approved for payment in NewDot.

@puneetlath
Copy link
Contributor

@sakluger could we get the payments handled on this one so that we can close it out?

@sakluger
Copy link
Contributor

Sorry for the delay! @AGarciaNY I sent an offer to you through Upwork. Can you let me know once you've accepted?

@sakluger sakluger added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2023
@AGarciaNY
Copy link
Contributor

Hi @sakluger. I accepted it.

@sakluger
Copy link
Contributor

sakluger commented Aug 1, 2023

Thanks! All paid up 🎉

@sakluger sakluger closed this as completed Aug 1, 2023
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