-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DFW: reset zombie state on unmount #67076
base: trunk
Are you sure you want to change the base?
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: -19 B (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
packages/editor/src/components/collapsible-block-toolbar/index.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works to fix the issue in my testing. I saw the failing e2e test but it passed for me locally.
.editor-header__toolbar:has(.editor-collapsible-block-toolbar:not(.is-collapsed)) + .editor-header__center { | ||
display: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d put this in the parent component’s styles instead because this doesn’t apply to any elements of the component itself.
Why can't I repro this? no-repro-block-toolbar.mp4 |
It looks like you did repro it. The thing that goes missing is the Document Bar and it’s missing from the start of your recording. I had the same trouble at first—it was unclear what to look for. |
OMG thanks @stokesman haha I completely missed out on ... words apparently. |
853165c
to
ba633ee
Compare
It passes for me too locally 😭 |
@jeryj Do you know what could be going on with this test? |
@ellatrix The test is checking to see if the fixed toolbar has an overflow scroll to reveal the additional toolbar buttons. On trunk it looks like this: On this PR, the overflow scrolling on the toolbar is broken for some reason. |
} | ||
}, [ blockSelectionStart, onToggle ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should setIsCollapsed
be passed in as a dependency here?
I think the issue is related to the CSS for the editor header grid template. In this PR the center element is hidden with display:none instead of being removed from the DOM, so I think some of these grid CSS checks pass now when they did not apply before. |
I thought I tested that manually and found it does work on this branch.
This seems a good point. I think this could cause some other visual issue. I’ve opened up #67322 as an alternative. It’s simpler. In my testing it fixes the issue and doesn’t cause others. Please give it a spin. |
useState( true ); | ||
|
||
const hasCenter = | ||
( ! hasBlockSelection || isBlockToolsCollapsed ) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't removing ! hasBlockSelection
bring back the bug in #65824?
What?
Whenever exiting Distraction Free Writing, the document toolbar is gone.
Why?
It should re-appear. This also seems important because Bluesky is using DFW.
How?
Just use CSS to hide the document toolbar.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast