Repository navigation
TabPanel: Convert to TypeScript - #43536
Conversation
There was a problem hiding this comment.
I didn't expand the code snippet because it isn't very helpful if the children part isn't shown
|
Size Change: +11 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Curious to why the ref was added to NavigableMenu and not the wrapper div ?
I'm asking because I wonder if consumers of the package would have a way to expect, in general, what component the ref holds (since we don't even document it in our docs)
There was a problem hiding this comment.
To be honest I'm pretty unclear about ref forwarding. Most examples I find online are cases where you want to do myRef.focus(). So I kind of understood it to mean that you want to pass the ref to the main interactive element 🤔 But I really don't know. Should make a non-ref-forwarding version of WordPressComponent asap? 😅
There was a problem hiding this comment.
To be honest I'm pretty unclear about ref forwarding
Same — not sure if there's a standard around it. We should probably read about in order to make a better informed decision!
Should make a non-ref-forwarding version of WordPressComponent asap? 😅
That sounds like a good option for now. We could then avoid introducing a ref in this PR altogether, and then swap the custom instances of WordPressComponentPropsWithoutRef across the package
8d968fc to
de963ba
Compare
de963ba to
f1710c7
Compare
Part of #35744
In preparation for #42320
What?
Converts the TabPanel component to TypeScript.
Why?
For better documentation, devex, and code quality.
How?
Following the contributing guide.
Testing Instructions
npm run storybook:dev