-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: -41 B (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
// by default. | ||
useEffect( | ||
() => () => { | ||
onToggle( true ); |
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.
It doesn't feel like the right place to call this for me. It should be the responsibility of the parent component IMO (unless the state is moved to within this component)
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.
The thing is that the parent component never sets this state, it appears it's only used inside this one. But the parent component needs to be aware of it to hide the document bar. Tbh, I think the local state is bad here, it should probably be done differently. I just didn't feel like refactoring it.
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 changed the whole thing to use CSS.
if ( blockSelectionStart ) { | ||
onToggle( false ); | ||
} | ||
}, [ 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.
Oh, I think we'll want to keep this. It should uncollapse whenever you change selection I guess.
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