-
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
Added a "plain" style for quote blocks #29856
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Baelx! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
I feel like |
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.
@Baelx Thanks for working on this, looks good in my testing.
I think this test is going to be troublesome because of the way it uses an index to click on a style:
await styleVariations[ 1 ].click(); |
If other styles are added it'll fail again. It'd be better to use the style's name. I updated the file to the following and it passes (the test description was also wrong so including it in my code snippet below):
describe( 'Block styles', () => {
beforeAll( async () => {
await createNewPost();
} );
it( 'Should switch to the large style of the quote block', async () => {
// Inserting a quote block
await insertBlock( 'Quote' );
await page.keyboard.type( 'Quote content' );
await clickBlockToolbarButton( 'Quote' );
const largeStyleButton = await page.waitForXPath(
'//*[@role="menuitem"][contains(., "Large")]'
);
await largeStyleButton.click();
// Check the content
const content = await getEditedPostContent();
expect( content ).toMatchSnapshot();
} );
} );
FWIW-I usually update snapshots using watch mode (npm run test-e2e:watch
), sometimes I use the filters provided by watch mode to only run the test in the file in question.
Thanks a lot for that, @talldan. That makes sense! |
@Baelx Just checking in, will you be able to update that test? |
Hi, @Baelx I just wanted to check in if you have time to rebase and update the test? Thanks |
ecf650b
to
fd67208
Compare
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.
It looks like this one just needed a push to get over the hump. I rebased and moved the updated style definition to block.json.
I also updated the test and snapshot per @talldan.
So I think this makes it good to go.
Congratulations on your first merged pull request, @Baelx! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Description
How has this been tested?
Ran
npm run test
. All tests passing.Screenshots
Types of changes
Simply adds a "Plain" style to quotes to allow them(in part) to function as text indentation. Selecting "Plain" will set border-left: none in the code.
Checklist: