Panel: Recommend CollapsibleCard for use outside the block inspector#78863
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I notice that we recommend this "globally": gutenberg/packages/components/src/panel/stories/index.story.tsx Lines 31 to 34 in 1946796 If what we're saying here and discussed in #26867 is that this component is primarily intended to be used in the editor, then I would suggest we update Could you make this update? And remove |
aduth
left a comment
There was a problem hiding this comment.
This could might be a good use-case for componentStatus.notes in the Storybook, which is often used for this kind of "you might want to use a different component instead in some situations" type guidance.
| > **Note:** The `Panel` family is intended for the block inspector sidebar. For collapsible sections elsewhere, use the [`CollapsibleCard`](https://wordpress.github.io/gutenberg/?path=/docs/design-system-components-collapsiblecard--docs) component instead. | ||
|
|
There was a problem hiding this comment.
I'd suggest moving this up higher, maybe even as a plain paragraph under the introduction "Panels expand and collapse multiple sections of content". I'd also suggest removing the > blockquote, since we're not quoting anything.
|
Thanks for the follow-up, @Mayank-Tripathi32! I think this doesn't require a changelog entry; changes are visible in Storybook and the docs. |
closes #26867
What?
Adds a documentation note to
PanelrecommendingCollapsibleCardfor collapsible sections used outside the block inspector.Why?
Follow-up to #78752. Rather than extending the
Panelfamily with aheadingLevelprop, the discussion concluded thatPanelis intended for the block inspector sidebar, andCollapsibleCardshould be used elsewhere. This documents that guidance.How?
PanelREADME's Development guidelines pointing toCollapsibleCard.Testing Instructions
PanelREADME shows the recommendation note linking to theCollapsibleCardStorybook docs.Use of AI?