List: simplify indent code & keep client ID - #59216
Merged
Merged
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -86 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
What?
We shouldn't clone the list items to indent. Instead we should use the move* action and preserve the original client ID. This turns out to be a nice simplification
@ntsekouras Asking your review because you added the original code in #40991.
Why?
This is necessary in the long term to preserve partial multi selection across indent/outdent. For outdent client IDs are already preserved.
How?
Created a utility that can can be used for both indent and outdent.
Testing Instructions
Everything should still work as before.
Testing Instructions for Keyboard
Screenshots or screencast
Summary by CodeRabbit