-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Storybook: Add and Update Block Editor Components stories #67165
Comments
@imanish003 @Sukhendu2002 @Infinite-Null @SainathPoojary @himanshupathak95 @Sukhendu2002 |
Hey @miminari , I have submitted PR for the following components:
|
Hey @miminari, I have submitted a PR for the following components:
|
Hey @miminari, I have submitted PR for the following components:
|
Hey @miminari, I have submitted PR for the following components:
|
Hey @miminari, I have submitted a PR for the following components:
|
I'm curious about the reasoning here :). I'm not saying we shouldn't be doing this but curious to lean what value you folks will be receiving from this ? cc @WordPress/gutenberg-core for awareness. |
Excellent team effort here. @t-hamano, your tips and suggestions should be included in the issue description. It's helpful information and is currently hidden in GitHub activity. We could use the |
@Mamaduka Thanks for the feedback! I've summarized all the tips and suggestions in the description. |
Update: I would like to propose adding badges (🔒) to private components. Please see the "4. About meta data" section of this issue for more details. |
What problem does this address?
Most of Block Editor components don't have stories.
Block Editor components's Storybook should also be added and updated like the Components.
related #22891
What is your proposed solution?
We can use this issue to track the addition and updating of the stories for Block Editor.
You can add the link to assign yourself to each component.
As I know, Block Editor Components list has never existed, so at first, we can start to be based on the directory name.
The list was made automatically, and we can ignore the component for native only.
If you cannot edit the list, please comment on which you made the PR for which directory's components.
cc @WordPress/gutenberg-components
Best Practices
1. Use CSF 3 format
Write stories as objects, not functions
Do
Don't
2. Consists of only one component
The purpose of Storybook is to test a single UI component itself. Therefore, unless there is a special reason, we should not include anything other than that component.
3. Don’t create too many stories
While it's tempting to expose as many variations of a component as possible, the behavior of the component can be changed in the Controls section.
Therefore, additional stories should only be included if they involve significant visual or behavioral changes.
4. About meta data
To display the source panel by default, specify
'shown'
in themeta.parameters.docs.canvas.sourceState
field.Example
Define the component description via the
meta.parameters.docs.description.component
field instead of a comment.Example
Explicitly define the type of props via the
meta.argTypes.{propName}.table.type.summary
field.Example
For private components, you may want to define the following fields to display the badge 🔒 (Private APIs README).
Check here to see if the component is exported as private.
Example
5. Others
If the component you're working on doesn't have a README or JDoc, I'd appreciate it if you could do the following to clarify the component's implementation first:
Block Editor Components directories List
Components List
Note: 🔒 indicates that the component is private.
AlignmentControl
AlignmentToolbar
audio-player (for native only)BlockEditorAutocomplete
based onAutocomplete
from@wordpress/components
. Pending until theAutocomplete
component's stories are made.)background-image-control/BackgroundImagePanelAdd story for BackgroundImagePanel #67184BlockAlignmentControl
BlockAlignmentToolbar
__experimental
prefix) Storybook: Add BlockAlignmentMatrixControl Stories and update README #68007BlockCanvas
ExperimentalBlockCanvas
block-caption (for native only)__experimental
prefix)BlockControls
BlockFormatControls
block-editing-mode(Reack Hook)__experimental
prefix) Add Storybook story for BlockFullHeightAlignmentControl #67227block-media-update-progress (for native only)__experimental
prefix)__experimental
prefix)block-settings (for native only)BlockSettingsMenu
__unstableBlockSettingsMenuFirstItem
(Has__unstable
prefix)__unstableBlockToolbarLastItem
(Has__unstable
prefix)__unstableBlockToolbarLastItem
(Has__unstable
prefix)__experimental
prefix)__experimental
prefix)BlockVerticalAlignmentToolbar
BlockVerticalAlignmentControl
__experimental
prefix) Storybook: Add BorderRadiusControl story #67383caption (for native only)ColorPalette
ColorPaletteControl
__experimental
prefix)__experimentalColorGradientControl
__experimentalColorGradientSettingsDropdown
__experimentalPanelColorGradientSettings
__experimental
prefix) Storybook: Add stories for DateFormatPicker Component #67290__experimental
prefix)__unstable
prefix)__experimental
prefix) Storybook: Adds story for font appearance control. #68279__experimental
prefix) Storybook: Add and Update Block Editor Components stories #67165__unstable
prefix)__experimental
prefix)image-link-destinations (for native only)image-size-control (HasStorybook: Add stories for ImageSizeControl Component #68285__experimental
prefix)_Inserter
__experimentalLibrary
(Has__experimental
prefix)PrivateQuickInserter
inserter-button (for native only)__experimental
prefix)InspectorControls
InspectorAdvancedControls
__experimental
prefix) Storybook: Add Story for InspectorPopoverHeader #68272JustifyToolbar
JustifyContentControl
__experimental
prefix) Storybook: Add LetterSpacingControl story #67342LinkControl
__experimentalLinkControl
(Has__experimental
prefix)__experimentalLinkControlSearchInput
(Has__experimental
prefix)__experimentalLinkControlSearchResults
(Has__experimental
prefix)__experimentalLinkControlSearchItem
(Has__experimental
prefix)ListView
(Has__experimental
prefix)PrivateListView
MediaUpload
MediaUploadCheck
media-upload-progress (for native only)__experimental
prefix)__experimental
prefix) Storybook: Adds story for PublishDateTimePicker #68192__experimental
prefix) Storybook: Adds story for responsive block control. #68336RichText
RichTextShortcut
RichTextToolbarButton
__experimental
prefix) Storybook: Adds story for Spacing-sizes-control. #68339__experimental
prefix) Storybook: Add stories for the TextDecorationControl component #67337__experimental
prefix) Storybook : Add TextTransformControl stories #67365__experimental
prefix) Storybook: Add UnitControl story #67346URLInput
Storybook: Adds story and doc for url-input #68286URLInputButton
Storybook: Add stories for URLInputButton component #68320URLPopover
__experimentalImageURLInputUI
(Has__experimental
prefix)use-block-commands(Reack Hook)use-block-display-information(Reack Hook)use-block-drop-zone(Reack Hook)use-flash-editable-blocks(Reack Hook)use-moving-animation(Reack Hook)use-on-block-drop(Reack Hook)use-paste-styles(Reack Hook)use-resize-canvas(Reack Hook)use-settings(Reack Hook)use-unsupported-block-editor (for native only)video-player (for native only)__experimental
prefix) Storybook: Add WritingModeControl story #67343The text was updated successfully, but these errors were encountered: