Conversation
- Add polling assertion to wait for formatting to be committed before testing undo, preventing race conditions - Handle block-only selection states in getSelection() helper by defaulting offset to 0 when not a number
|
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: +9 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
| startOffset: | ||
| typeof selectionStart.offset === 'number' | ||
| ? selectionStart.offset | ||
| : 0, |
There was a problem hiding this comment.
We shouldn't do this. It would be a legitimate failure if it's undefined.
There was a problem hiding this comment.
Yah that part I was unsure changed to something that may be the cause
alecgeatches
left a comment
There was a problem hiding this comment.
Approving the fix in crdt-selection.ts. The whole "Case 2a"/isBeginningOfEmptyBlock check was previously added to match WordPress' default behavior of passing no selection offset when a block is undone to 0-length, which is unusual but relied upon in several tests. This change is very low-risk for affecting behavior outside of tests.
|
Awesome, I fixed all undo tests. |
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 4163316 |
CI run: #10988. See #64595. --- I've included a log of the Gutenberg changes with the following command: ``` git log --reverse --format="- %s" b441348bb7e05af351c250b74283f253acaf9138..23b566c72e9c4a36219ef5d6e62890f05551f6cb | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy ``` - Remove experimental property from Icon block (WordPress/gutenberg#75742) - Real-time collab editing: Fix undo E2E test (WordPress/gutenberg#75740) - Snackbar: Fix scaling issue with snackbars that update their content via a common id (WordPress/gutenberg#75709) - Vips and worker-threads packages: remove private flag so that packages can be published to npm (WordPress/gutenberg#75752) - Update wordpress/vips in root package.json to use a relative path (WordPress/gutenberg#75758) - Fix change-detection and new-post E2E tests after RTC enabled by default (WordPress/gutenberg#75751) - Query: Remove content role from block (WordPress/gutenberg#75760) - `ToggleGroupControl`: Make unselected item color consistent across all variants (WordPress/gutenberg#75737) - Icon-block: fix global-styles selectors (WordPress/gutenberg#75724) - RTC: Add cap check for single taxonomy term entities (WordPress/gutenberg#75708) - Core Data: Create icons entity (WordPress/gutenberg#75773) git-svn-id: https://develop.svn.wordpress.org/trunk@61705 602fd350-edb4-49c9-b593-d223f7449a82
CI run: WordPress/wordpress-develop#10988. See #64595. --- I've included a log of the Gutenberg changes with the following command: ``` git log --reverse --format="- %s" b441348bb7e05af351c250b74283f253acaf9138..23b566c72e9c4a36219ef5d6e62890f05551f6cb | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy ``` - Remove experimental property from Icon block (WordPress/gutenberg#75742) - Real-time collab editing: Fix undo E2E test (WordPress/gutenberg#75740) - Snackbar: Fix scaling issue with snackbars that update their content via a common id (WordPress/gutenberg#75709) - Vips and worker-threads packages: remove private flag so that packages can be published to npm (WordPress/gutenberg#75752) - Update wordpress/vips in root package.json to use a relative path (WordPress/gutenberg#75758) - Fix change-detection and new-post E2E tests after RTC enabled by default (WordPress/gutenberg#75751) - Query: Remove content role from block (WordPress/gutenberg#75760) - `ToggleGroupControl`: Make unselected item color consistent across all variants (WordPress/gutenberg#75737) - Icon-block: fix global-styles selectors (WordPress/gutenberg#75724) - RTC: Add cap check for single taxonomy term entities (WordPress/gutenberg#75708) - Core Data: Create icons entity (WordPress/gutenberg#75773) Built from https://develop.svn.wordpress.org/trunk@61705 git-svn-id: http://core.svn.wordpress.org/trunk@61013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
|
I just cherry-picked this PR to the release/22.6 branch to get it included in the next release: 2f764f6 |
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>

Summary
getSelection()helper by defaulting offset to 0 when not a numberTest plan