Conversation
|
Size Change: +1 B (0%) Total Size: 1.14 MB
ℹ️ View Unchanged
|
andrewserong
left a comment
There was a problem hiding this comment.
Thanks again for splitting out all these little TS changes @aaronrobertshaw!
✅ Confirmed errors messages when adding "src/color-picker/**/*" to the tsconfig.json file prior to this PR
✅ Adding // @ts-nocheck for the circular option picker and color palette until we're ready to type them makes good sense
✅ Removal of unused imports looks good
✅ Checked that calling colord() with undefined or '' both return black as the colour, so the change to using '' as a fallback doesn't affect anything
✅ Explicit return undefined on getColorFromLegacyProps looks good
✅ Smoke tested the color picker in the editor and in Storybook
LGTM!
|
Changelog for this will be added via: #38469 |
This must have been the reason why we never noticed the TS errors before — we must have forgotten that line 😅 Thank you both! |
Related: #37769
Description
This PR fixes a number of typing errors that occur with the
ColorPicker.ColorPaletteto thetsconfig.jsonColorPickerandCircularOptionPickercolordincolor-picker/component.tsxcolor-picker/color-input.tsxandcolor-picker/color-display.tsxColordtype incolor-picker/color-input.tsxandcolor-picker/color-display.tsxcolor-picker/use-deprecated-propsand itsgetColorFromLegacyPropsfucntion// @ts-nocheckto the following files to avoid going further down the rabbit hole:packages/components/src/color-palette/index.jspackages/components/src/circular-option-pickerindex.js(These can be typed when or if those components are converted to TypeScript)
Testing Instructions
"src/color-picker/**/*",to thepackages/components/tsconfig.jsonnpm run build:package-types( should get 68 errors )npm run build:package-typesTypes of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).