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

Fix list outdents on Enter in quote block #44809

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

benridane
Copy link
Contributor

What?

Fix #44625
Fixed a problem with list out-denting when pressing enter key in a quotation block.

Why?

When I create a list block within a quotation block and press enter, I cannot get out of the list block. The cause is that the outdenting process is inhibited first.

How?

The enter process of the list block strictly determines if it is outdentable or not.
The existing outdenting process only checks for the presence of a parent element. Therefore, it does not work within the parent block.

Added e2e test.

Testing Instructions

  1. Create a quote block.
  2. Create a list block in the quote block.
  3. Type aaa.
  4. Type Enter twice.
  5. Ensure that a paragraph block is created out of the list block.

Screenshots or screencast

After screen shots
after-enter-action_221010

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @benridane! 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.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 10, 2022
@skorasaurus skorasaurus added the [Block] Quote Affects the Quote Block label Oct 10, 2022
await editor.insertBlock( { name: 'core/quote' } );
await page.keyboard.type( '/list' );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( 'aaa' );
Copy link
Member

Choose a reason for hiding this comment

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

Nit: typing one a suffices here

Copy link
Member

@ellatrix ellatrix left a comment

Choose a reason for hiding this comment

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

Solid. Thank you!

@ellatrix ellatrix added the Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 11, 2022
@ellatrix ellatrix merged commit f3995af into WordPress:trunk Oct 11, 2022
@github-actions
Copy link

Congratulations on your first merged pull request, @benridane! 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!

@github-actions github-actions bot added this to the Gutenberg 14.4 milestone Oct 11, 2022
@michalczaplinski
Copy link
Contributor

I just cherry-picked this PR to the wp/6.1-rc-2 branch to get it included in the next release: a5efd9d

@michalczaplinski michalczaplinski removed the Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 18, 2022
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Oct 18, 2022
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [WordPress/gutenberg#45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [WordPress/gutenberg#45045 #45045 Add: Missing output escaping on some blocks]
- [WordPress/gutenberg#44999 #44999 Escape comment author URL]
- [WordPress/gutenberg#44972 #44972 Navigator: restore focus only once per location]
- [WordPress/gutenberg#44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [WordPress/gutenberg#44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [WordPress/gutenberg#44809 #44809 Fix list outdents on Enter in quote block]
- [WordPress/gutenberg#44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [WordPress/gutenberg#44853 #44853 Fix overflowing patterns]
- [WordPress/gutenberg#45050 #45050 Fix visibility of nested Group block appender]
- [WordPress/gutenberg#44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54632 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Oct 18, 2022
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [WordPress/gutenberg#45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [WordPress/gutenberg#45045 #45045 Add: Missing output escaping on some blocks]
- [WordPress/gutenberg#44999 #44999 Escape comment author URL]
- [WordPress/gutenberg#44972 #44972 Navigator: restore focus only once per location]
- [WordPress/gutenberg#44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [WordPress/gutenberg#44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [WordPress/gutenberg#44809 #44809 Fix list outdents on Enter in quote block]
- [WordPress/gutenberg#44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [WordPress/gutenberg#44853 #44853 Fix overflowing patterns]
- [WordPress/gutenberg#45050 #45050 Fix visibility of nested Group block appender]
- [WordPress/gutenberg#44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54632


git-svn-id: http://core.svn.wordpress.org/trunk@54184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Oct 18, 2022
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [WordPress/gutenberg#45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [WordPress/gutenberg#45045 #45045 Add: Missing output escaping on some blocks]
- [WordPress/gutenberg#44999 #44999 Escape comment author URL]
- [WordPress/gutenberg#44972 #44972 Navigator: restore focus only once per location]
- [WordPress/gutenberg#44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [WordPress/gutenberg#44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [WordPress/gutenberg#44809 #44809 Fix list outdents on Enter in quote block]
- [WordPress/gutenberg#44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [WordPress/gutenberg#44853 #44853 Fix overflowing patterns]
- [WordPress/gutenberg#45050 #45050 Fix visibility of nested Group block appender]
- [WordPress/gutenberg#44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54632


git-svn-id: https://core.svn.wordpress.org/trunk@54184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
ootwch pushed a commit to ootwch/wordpress-develop that referenced this pull request Nov 4, 2022
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [WordPress/gutenberg#45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [WordPress/gutenberg#45045 #45045 Add: Missing output escaping on some blocks]
- [WordPress/gutenberg#44999 #44999 Escape comment author URL]
- [WordPress/gutenberg#44972 #44972 Navigator: restore focus only once per location]
- [WordPress/gutenberg#44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [WordPress/gutenberg#44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [WordPress/gutenberg#44809 #44809 Fix list outdents on Enter in quote block]
- [WordPress/gutenberg#44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [WordPress/gutenberg#44853 #44853 Fix overflowing patterns]
- [WordPress/gutenberg#45050 #45050 Fix visibility of nested Group block appender]
- [WordPress/gutenberg#44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54632 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
4 participants