Notes: Conditionally restore default sidebar#75455
Conversation
|
Size Change: +16 B (0%) Total Size: 3.02 MB
ℹ️ View Unchanged
|
e89b958 to
ded41b6
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. |
| if ( | ||
| getActiveComplementaryArea( 'core' ) === FLOATING_NOTES_SIDEBAR | ||
| ) { | ||
| disableComplementaryArea( 'core', FLOATING_NOTES_SIDEBAR ); |
There was a problem hiding this comment.
The disableComplementaryArea only accepts one argument, which I forgot. Should be fixed now.
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR! This may require some complex processing, but I think at least the following two behaviours need to be fixed.
- If the sidebar was closed, I don't think it should open when the form is canceled.
f3abb87900a729d22abd66309e026e55.mp4
- If a post has unresolved notes, the sidebar will not be restored when the form is canceled.
3d9de5563126aaff046e0964ae4ab4f8.mp4
I think that's correct behavior. User added a note, so they probably want to keep the sidebar open. We only restore the default sidebar if the first new note form was closed.
Good point, but this is where it gets tricky 😄 I'll see what I can do :) |
|
I think it's difficult to determine whether the current behavior is a bug, so if we can't find an ideal solution, we may be able to close it as "not a bug." 😅 |
|
Generally speaking, I don't think it's a bug. That's how Sidebars behave. IMO, it only feels odd because the floating sidebar gets special treatment. |
What?
Closes #75450.
PR updates logic in
useEnableFloatingSidebarto reopen the default document sidebar when the floating notes sidebar is no longer enabled.Why?
A small QoL improvement.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2026-02-12.at.11.52.44.mp4