Repository navigation
Conversation
|
Size Change: +20 B (0%) Total Size: 7.51 MB 📦 View Changed
|
d1002ca to
ff9e27c
Compare
|
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. |
stokesman
left a comment
There was a problem hiding this comment.
In my testing the fixes the part of the issue I was able to reproduce – the file block. I think the comment I added there must be a separate issue.
| if ( | ||
| registry.select( blockEditorStore ).isLastBlockChangePersistent() | ||
| ) { | ||
| __unstableMarkLastChangeAsPersistent(); |
There was a problem hiding this comment.
Should the conditional be flipped? This reads funny to me but maybe it's an API naming thing.
There was a problem hiding this comment.
I believe so, though it still causes some undo e2e test to fail, we might need to find a different approach.
There was a problem hiding this comment.
some undo e2e test to fail
I get the same result on that test locally yet it passes after negating the conditional. I didn't see new failures on other tests either but I didn't run all of them – just those under test/e2e/specs/editor/various/.
Should we try it?
There was a problem hiding this comment.
Sorry, probably made a typo. It's been a while since I made this PR. I'm a bit busy with other stuff, will look at some point if you don't beat me to it
|
Thanks for testing, @stokesman! |
|
Flaky tests detected in 39f0ec3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22159550780
|
|
Unfortunately, I can still reproduce the issue (#63167). @stokesman, what are your repro steps? Mine are a bit unreliable, maybe we could use yours to add e2e tests. |
|
I’ve never managed to reproduce the first part of the issue. I can reproduce the part of the issue that involves the file block now too. |
|
Created a PR for an alt solution - #83463. |
|
Closing in favor of #83463. |
What?
Closes #63167.
Fixes an issue where
__unstableMarkLastChangeAsPersistentis called when the effect is run twice on mount and none of the dependencies have changed in the second run. Apparently this is normal in React StrictMode: https://react.dev/reference/react/StrictMode#fixing-bugs-found-by-re-running-effects-in-developmentWhy?
It shows up in the performance graphs when running React in dev mode. Yes, it's only dev mode and not production, but it increases the bloat and makes it harder to see actual problems.
How?
Check if the the change is already persistent.
Testing Instructions
See instructions from #63167.
Testing Instructions for Keyboard
Screenshots or screencast