Skip to content

RichText: List: Fix outdent with children - #13559

Merged
ellatrix merged 4 commits into
masterfrom
fix/outdent-with-children
Jan 29, 2019
Merged

ellatrix merged 4 commits into
masterfrom
fix/outdent-with-children

Conversation

@ellatrix

@ellatrix ellatrix commented Jan 29, 2019 •

Copy link
Copy Markdown
Member

Description

After #12667, outdenting list items with children became broken. The children should also be indented.

How has this been tested?

Start with the following content:

<!-- wp:list -->
<ul><li>A<ul><li>B<ul><li>C</li><li>D</li></ul></li></ul></li></ul>
<!-- /wp:list -->

Set the caret at "B", then press the outdent button. "C" and "D" should also be one level outdented.

Screenshots

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix ellatrix added the [Package] Rich text /packages/rich-text label Jan 29, 2019
@ellatrix
ellatrix requested review from a team, mcsf and youknowriad January 29, 2019 11:20
@ellatrix ellatrix added this to the WordPress 5.1.x milestone Jan 29, 2019

@youknowriad youknowriad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works well in my testing.

@ellatrix
ellatrix merged commit ccbf07e into master Jan 29, 2019
@ellatrix
ellatrix deleted the fix/outdent-with-children branch January 29, 2019 12:00
@ellatrix

Copy link
Copy Markdown
Member Author

Thanks!

@mcsf

mcsf commented Jan 29, 2019

Copy link
Copy Markdown
Contributor

Starting with the following list:

<!-- wp:list -->
<ul><li>A<ul><li>B<ul><li>C</li></ul></li><li>D</li></ul></li></ul>
<!-- /wp:list -->

Place the caret on D, then decrease indentation.
Observed: nothing changes.
Expected: for D to return to level 0, like so:

<!-- wp:list -->
<ul><li>A<ul><li>B<ul><li>C</li></ul></li></ul></li><li>D</li></ul>
<!-- /wp:list -->

@ellatrix

Copy link
Copy Markdown
Member Author

Thanks @mcsf! I'll follow up with a PR.

@mcsf

mcsf commented Jan 29, 2019

Copy link
Copy Markdown
Contributor

Conversely, starting at:

<!-- wp:list -->
<ul><li>A<ul><li>B<ul><li>C</li></ul></li></ul></li><li>D</li></ul>
<!-- /wp:list -->

Place the caret at D, then increase indentation.
Observed: D jumps from level 0 to 2.
Expected: D jumps to level 1.

@ellatrix ellatrix mentioned this pull request Jan 29, 2019
5 tasks done
@ellatrix

Copy link
Copy Markdown
Member Author

The first one is fixed by #13562. Looking into the other one now.

@ellatrix ellatrix mentioned this pull request Jan 29, 2019
5 tasks done
youknowriad pushed a commit that referenced this pull request Jan 29, 2019
* Fix outdent

* Add unit test

* Add e2e test

* Add unit tests for getLastChildIndex
daniloercoli added a commit that referenced this pull request Jan 30, 2019
…rnmobile/372-use-RichText-on-Title-block

* 'master' of https://github.com/WordPress/gutenberg: (36 commits)
  Fixes plural messages POT generation. (#13577)
  Typo fix (#13595)
  REST API: Remove oEmbed proxy HTML filtering (#13575)
  Removed unnecessary className attribute. Fixes #11664 (#11831)
  Add changelog for RSS block (#13588)
  Components: Set type=button for TabPanel button elements. (#11944)
  Update util.js (#13582)
  Docs: Add accessbility specific page (#13169)
  Rnmobile/media methods refactor (#13554)
  chore(release): publish
  chore(release): publish
  Plugin: Deprecate gutenberg_get_script_polyfill (#13536)
  Block API: Parse entity only when valid character reference (#13512)
  RichText: List: fix indentation (#13563)
  Plugin: Deprecate window._wpLoadGutenbergEditor (#13547)
  Plugin: Avoid setting generic "Edit Post" title on load (#13552)
  Plugin: Populate demo content by default content filters (#13553)
  RichText: List: Fix getParentIndex (#13562)
  RichText: List: Fix outdent with children (#13559)
  Scripts: Remove npm run build from test-e2e default run (#13420)
  ...
t-hamano added a commit that referenced this pull request Sep 17, 2026
* Icons: Test the registry sanitizer directly with a data provider

Mirror the tests from WordPress/wordpress-develop#13559: call `sanitize_icon_content` via reflection with a data provider instead of registering icons from both inline content and a file path. Replace the backport changelog entry for #12197 with one for #13559.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Align the SVG sanitizer and its tests with the WordPress core backport

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Rich text /packages/rich-text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants