Repository navigation
Components: Update polymorphism types to allow all attributes when specifying as
#80705
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
Changes from all commits
cf4d603
fa7f4ca
f1b72a0
cf858f8
85789d2
5d3e989
da70077
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,10 @@ type CallbackProps = { | |
| }; | ||
|
|
||
| export type DropdownContentWrapperProps = { | ||
| /** | ||
| * The content to render inside the wrapper. | ||
| */ | ||
| children?: ReactNode; | ||
|
Comment on lines
+13
to
+16
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I understand, this should have always been here, and the previous polymorphism types incorrectly typed |
||
| /** | ||
| * Amount of padding to apply on the dropdown content. | ||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -113,9 +113,7 @@ export default function PreferencesModalTabs( { | |||||
| <Navigator.Button | ||||||
| key={ tab.name } | ||||||
| path={ `/${ tab.name }` } | ||||||
| // @ts-expect-error: Navigator.Button is currently typed in a way that prevents Item from being passed in | ||||||
| as={ Item } | ||||||
| isAction | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is safe: gutenberg/packages/components/CHANGELOG.md Line 3309 in c6c8e71
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason the removal has to happen is because the TypeScript error on the line above assigning |
||||||
| > | ||||||
| <HStack justify="space-between"> | ||||||
| <FlexItem> | ||||||
|
|
||||||
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 prop didn't land in the README for the component.
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.
The short answer is that the component lacks a
docs-manifest.jsonwhich would opt it into automatic documentation, and so its README is maintained manually. We could update it manually, but I'm also curious to dig into why it doesn't have a manifest 🙂Uh oh!
There was an error while loading. Please reload this page.
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 tried adding the
docs-manifest.jsonand it works (also brings other missing props likeisBusy), but it causes a lot of unrelated changes to theREADME.md(changes formatting quite a bit) that I'd suggest we tackle separately. In the interim, da70077 adds the manual prop documentation.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.
Separate pull request for the auto-documentation: #80866
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 set up the readme autogen system pretty late in the game, so a lot of them simply aren't migrated yet. Nothing more 😄