-
Notifications
You must be signed in to change notification settings - Fork 25
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
refactor: Convert UI files to TS #3475
Conversation
{ | ||
[buttonVariant.outlined]: | ||
'ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 shadow-sm', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seemed like a bug... with cs
, if we pass an obj, it applies the key as the class string if the value is truthy. Which means this was always just adding the classname "undefined"
Bundle ReportChanges will decrease total bundle size by 1.8kB (-0.01%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will decrease total bundle size by 1.8kB (-0.01%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
- Coverage 98.90% 98.90% -0.01%
==========================================
Files 806 806
Lines 14476 14471 -5
Branches 4108 4117 +9
==========================================
- Hits 14318 14312 -6
- Misses 151 152 +1
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
- Coverage 98.90% 98.90% -0.01%
==========================================
Files 806 806
Lines 14476 14471 -5
Branches 4115 4110 -5
==========================================
- Hits 14318 14312 -6
- Misses 151 152 +1
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
- Coverage 98.90% 98.90% -0.01%
==========================================
Files 806 806
Lines 14476 14471 -5
Branches 4115 4110 -5
==========================================
- Hits 14318 14312 -6
- Misses 151 152 +1
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
- Coverage 98.90% 98.90% -0.01%
==========================================
Files 806 806
Lines 14476 14471 -5
Branches 4115 4117 +2
==========================================
- Hits 14318 14312 -6
- Misses 151 152 +1
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
interface WithTo { | ||
to: AppLinkProps | ||
hook?: string | ||
} | ||
interface WithoutTo { | ||
to?: never | ||
hook: string | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this replaces the validation function for hook from the PropTypes
type ExtendedButtonProps = ButtonProps & | ||
(WithTo | WithoutTo) & | ||
Partial<AppLinkProps> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button essentially has to shepherd along props to possible AppLink render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things to peak at
|
||
return set[variant] | ||
// using this type until AppLink is converted to TypeScript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You maybe able to get the TS types like so: type Test = PropTypes.InferProps<typeof User.propTypes>
pageName: string | ||
} | ||
|
||
export interface Props { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this interface be a bit more explicit as to what it's types are for if we're exporting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending useCallback
removals
17526ec
to
6dc2105
Compare
Description
Closes codecov/engineering-team#2724
Notable Changes
Screenshots
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.