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-06-20] [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! #39126

Closed
mountiny opened this issue Mar 27, 2024 · 85 comments
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

Standartize between Boolean or !!

Lets pick the one which can be enforced with eslint

Any more details for this one cc @blazejkustra @fabioh8010

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01111a2979f5f2ac8c
  • Upwork Job ID: 1780333266166345728
  • Last Price Increase: 2024-04-16
  • Automatic offers:
    • ishpaul777 | Contributor | 0
    • ShridharGoel | Contributor | 0
Issue OwnerCurrent Issue Owner: @CortneyOfstad
@ShridharGoel
Copy link
Contributor

ShridharGoel commented Mar 28, 2024

Proposal

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

Standardise between Boolean or !!.

What is the root cause of that problem?

New check using ESlint.

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

Slack discussion: https://expensify.enterprise.slack.com/archives/C01GTK53T8Q/p1713329747825759. Looks like we want to go ahead with !!, so the check can look like this:

module.exports = {
    create: function(context) {
        return {
            CallExpression: function(node) {
                if (node.callee.type === "Identifier" && node.callee.name === "Boolean" && node.arguments.length === 1) {
                    context.report({
                        node: node,
                        message: "Use !! instead of Boolean",
                        fix: function(fixer) {
                            const sourceCode = context.getSourceCode();
                            const argumentText = sourceCode.getText(node.arguments[0]);
                            return fixer.replaceText(node, `!!${argumentText}`);
                        }
                    });
                }
            }
        };
    }
};

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 28, 2024
@mountiny mountiny changed the title [TS Migration] Standartize between Boolean or !! [HOLD TS migration completion] [TS Migration] Standartize between Boolean or !! Mar 28, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

10 days overdue. Is anyone even seeing these? Hello?

@melvin-bot melvin-bot bot added the Overdue label Apr 8, 2024
@ShridharGoel
Copy link
Contributor

@mountiny Can we pick this since TS migration is almost done? I've sent a proposal above.

@blazejkustra
Copy link
Contributor

@ShridharGoel Not yet, let's wait until migration is fully finished

Copy link

melvin-bot bot commented Apr 10, 2024

12 days overdue. Walking. Toward. The. Light...

@fabioh8010
Copy link
Contributor

This is on hold Melvin..

@blazejkustra
Copy link
Contributor

Details:

We want to standardize with just one approach, !! and Boolean() are almost identical and we want to ensure just one is used in the codebase to avoid cases like this 😅

offline = Boolean(network.shouldForceOffline) || !!network.isOffline;

This includes writing a proposal on Slack, adjusting the code in the repository and perhaps adding an eslint rule that ensures only one approach is used. I myself believe !! is more readable more concise and faster in runtime.

This issue requires a minimal understanding of how Expensify process works, before coding the contributor have to post a Problem/Solution on open-source channel

@ShridharGoel
Copy link
Contributor

@blazejkustra Do we need to post on Slack? We generally post proposals on GitHub itself, I've posted a proposal above.

@blazejkustra
Copy link
Contributor

The issue is still on hold, please wait until it's open for external contributors @ShridharGoel

@melvin-bot melvin-bot bot removed the Daily KSv2 label Apr 15, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

This issue has not been updated in over 14 days. eroding to Weekly issue.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue labels Apr 15, 2024
@mountiny mountiny changed the title [HOLD TS migration completion] [TS Migration] Standartize between Boolean or !! [TS Migration] Standartize between Boolean or !! 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] Standartize between Boolean or !! [$250] [TS Migration] Standartize between Boolean or !! Apr 16, 2024
Copy link

melvin-bot bot commented Apr 16, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01111a2979f5f2ac8c

@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 @CortneyOfstad (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.

Copy link

melvin-bot bot commented Apr 16, 2024

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

@CortneyOfstad
Copy link
Contributor

PR is being actively reviewed so no additional update at this stage!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$250] [TS Migration] Standartize between Boolean or !! [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.81-11 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-06-18. 🎊

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

Copy link

melvin-bot bot commented Jun 11, 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:

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-06-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 18, 2024
@CortneyOfstad
Copy link
Contributor

@ishpaul777 can you confirm if this needs a regression test please before EOD to help avoid a delay in payment? Thank you!

@CortneyOfstad
Copy link
Contributor

Bump @ishpaul777 ^^^

@ishpaul777
Copy link
Contributor

Sorry i missed the ping. We dont need a regression test, this issue was not about adding a new functionality but to standardize on a code pattern.

@CortneyOfstad
Copy link
Contributor

@ShridharGoel I had to reinvite you to the job post because for some reason you were not listed in Upwork — let me know once you accept and I can get that paid ASAP!

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
@ishpaul777
Copy link
Contributor

not overdue, @ShridharGoel gentle bump on ^, so we can close this

Copy link

melvin-bot bot commented Jun 24, 2024

@CortneyOfstad, @ShridharGoel, @aldo-expensify, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@CortneyOfstad
Copy link
Contributor

@ShridharGoel let me know once you accept and I can get this paid ASAP. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@ShridharGoel
Copy link
Contributor

Accepted, thanks.

@CortneyOfstad
Copy link
Contributor

Payment Summary

@ishpaul777 — paid $250 via Upwork
@ShridharGoel — paid $250 via Upwork

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
Development

No branches or pull requests

10 participants