Repository navigation
FocalPointPicker: Convert to TypeScript - #43872
Conversation
|
Size Change: +86 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Return early because TS doesn't want an undefined value passed to parseInt. The result is the same though, so shouldn't be considered a runtime change.
There was a problem hiding this comment.
The rest of this function doesn't work if the ref is unset.
There was a problem hiding this comment.
UnitControl was missing some props.
There was a problem hiding this comment.
We can probably wait for the NumberControl refactor to TypeScript to land first, and then rebase?
There was a problem hiding this comment.
409bf9f to
7267149
Compare
| // @ts-expect-error: TODO: Is this parseFloat necessary? | ||
| x: roundToTwoDecimalPlaces( parseFloat( resolvedValue.x ) ), | ||
| // @ts-expect-error: TODO: Is this parseFloat necessary? | ||
| y: roundToTwoDecimalPlaces( parseFloat( resolvedValue.y ) ), |
There was a problem hiding this comment.
It doesn't look like — let's remove it and see if we get any unexpected behavior from unit tests / manual regression testing.
Otherwise, @stokesman may also have some additional context ?
There was a problem hiding this comment.
PR is looking good 🚀 only #43872 (comment) are #43872 (comment) still need to be addressed
Since this changes some of the UnitControl types, it definitely has some overlap with the NumberControl TypeScript refactor. Up to you about which PR you'd rather merge first, and which one you'd rather rebase + solve conflicts in
08a71e9 to
f709d34
Compare
Part of #35744
In preparation for #38730
What?
Converts FocalPointPicker to TypeScript. To limit the scope of this PR, tests have not been touched.
Why?
Better docs and devex.
Testing Instructions
npm run storybook:devand see the FocalPointPicker stories in Docs view.✅ Type checks pass