Skip to content
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 stories for AlignmentToolbar and AlignmentControl components #67046

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

miminari
Copy link
Member

What?

This PR will add stories for AlignmentToolbar and AlignmentControl components in the Storybook

Why?

Most of Block Editor components don't have stories.
Block Editor components's Storybook should also be added and updated like the Components.
see #66519
related #22891

How?

I have referred to the TextAlignmentControl story.
AlignmentControl and AlignmentToolbar are based on same component, but there are deliberately generated as a component with a different name, so I created in two separate files.

Testing Instructions

npm run storybook:dev and please check the AlignmentControl and AlignmentToolbar stories.

Testing Instructions for Keyboard

Screenshots or screencast

Kapture.2024-11-16.at.13.37.50.mp4

@miminari miminari self-assigned this Nov 16, 2024
Copy link

github-actions bot commented Nov 16, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: miminari <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@miminari miminari added Storybook Storybook and its stories for components [Type] Developer Documentation Documentation for developers labels Nov 16, 2024
@miminari miminari requested review from mirka and t-hamano and removed request for ellatrix November 16, 2024 04:43
@miminari miminari marked this pull request as draft November 16, 2024 04:47
@miminari miminari marked this pull request as ready for review November 16, 2024 04:54
@@ -0,0 +1,47 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since almost all file names in gutenberg are hyphenated, aliginment-toolbar.story.js might be better.

Comment on lines 24 to 25
type: 'select',
options: [ 'undefined', 'left', 'center', 'right' ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the select type being used here? I'm not familiar with these parameters, but it doesn't seem to be reflected in Storybook at all 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Sorry. I forgot to erase what I wrote to try it out....

@miminari
Copy link
Member Author

@t-hamano Thank you for quick reviewing!
I updated codes. Could you please check again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storybook Storybook and its stories for components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants