-
Notifications
You must be signed in to change notification settings - Fork 178
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(app): remove invalid type warnings for strings from atoms #11918
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #11918 +/- ##
==========================================
- Coverage 74.17% 74.17% -0.01%
==========================================
Files 2164 2164
Lines 59752 59753 +1
Branches 6264 6265 +1
==========================================
- Hits 44324 44323 -1
Misses 13953 13953
- Partials 1475 1477 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Nice Koji! thank you for removing a few hundred warnings! Just left a few questions.
app/src/atoms/Banner/index.tsx
Outdated
@@ -119,7 +121,7 @@ export function Banner(props: BannerProps): JSX.Element { | |||
<Flex flex="1" alignItems={ALIGN_CENTER}> | |||
{props.children} | |||
</Flex> | |||
{onCloseClick && !(isCloseActionLoading ?? false) ? ( | |||
{onCloseClick != null && !(isCloseActionLoading ?? false) ? ( |
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 you maybe change onCloseClick
prop on line 32 to say
onCloseClick?: (() => void) | React.MouseEventHandler<HTMLButtonElement>
Also, why is the != null
no longer needed?
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.
I will update
app/src/atoms/Banner/index.tsx
Outdated
@@ -132,7 +134,7 @@ export function Banner(props: BannerProps): JSX.Element { | |||
)} | |||
</Btn> | |||
) : null} | |||
{isCloseActionLoading && ( | |||
{(isCloseActionLoading ?? false) && ( |
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.
why do we not need the ?? false
here?
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.
I will take a look
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.
isCloseActionLoading?: boolean
maybe add false
as the default value and keep the {isCloseActionLoading && (
@jerader thank you for reviewing. I will address your feedback. |
|
* origin/edge: (34 commits) refactor(app): update desktop robot settings calibration section for OT-3 (#11942) feat(hardware): add CAN message to update motor position from encoders (#11868) ci(monorepo): upgrade windows versions on github workflows (#11940) feat(app): implement useCalibrationTaskList hook (#11894) feat(app, app-shell, app-shell-odd): create node layer for ODD (#11944) refactor(app): Remove recalibrate option from POC and TLC overflow menus [RAUT-93] (#11915) fix(api): home z should home gripper z too (#11950) refactor(shared-data): gripper use force polynomial function (#11946) refactor(api): move `ModuleGeometry` to legacy protocol core module (#11939) refactor(api): deprecate `ModuleContext.geometry` (#11938) chore(usb-bridge): add usb-bridge tests to test-py, add restart to push-ot3 (#11937) Revert "feat(app-shell-odd): create node layer for ODD (#11852)" (#11941) feat(app-shell-odd): create node layer for ODD (#11852) feature(hardware): add a warning style to can_mon and an "estop_released" error id (#11924) fix(hardware): Remove while loop and rely on number_of_messages when parsing motor position response. (#11929) fix(hardware): save can_comm / can_mon logs to read-write location (#11933) feat(api): Support 96 channel in the hardware controller (#11866) refactor(app): revert run a protocol from devices pages (#11909) refactor(app): remove warnings (#11922) refactor(app): remove invalid type warnings for strings from atoms (#11918) ...
Overview
Add String() to remove warnings from atoms
The lines I added
String()
should bestring
since most of them are CSS property values for test cases(not null / not undefined).This is part of RAUT-74
The number of warnings
Changelog
Review requests
Risk assessment
low