Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
PostPublishPanel: return focus to element that opened the panel #11543
PostPublishPanel: return focus to element that opened the panel #11543
Changes from 15 commits
3044063
6cca773
4bfb697
0fac6ef
3155c59
9228b68
557eca0
4bbcac4
22a421f
35de337
c2b1a9f
b12e4c3
9ba9dd4
6956da2
e310d64
72b8e99
0e2cae7
2ffa78a
57254cd
48439c0
9341979
0ef0206
94b251f
8f50b19
ca93215
99433b4
8b0d6bb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 big comment absorbs the previous two different existing comments.
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 we update this to be
editor-post-publish-toggle
instead? We can maintain both the existing and the new class until the toggle component is removed as to preserve compatibility. I can prepare a follow-up PR to this one with the changes if we wanted to do 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.
Or perhaps a better alternative would be to remove the
editor-post-publish-panel__toggle
class once the toggle component is removed.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.
editor-post-publish-panel__toggle
seems like the right name.EDIT: oops, I meant
editor-post-publish-button__toggle
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.
For what reason did we need to stop passing the
disabled
prop? While this and many other buttons in the header appear as disabled, they don't act as disabled. You can immediately press "Publish" on a new post and the publish panel is (wrongly?) shown.As it relates to focus return, it's not clear to me how it's relevant, since the panel would have presumably never been opened if it were disabled.
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.
Good catch. #13194 should fix it.
The
disabled
property didn't play well with thewithFocusReturn
HOC, IIRC. I can dig up the exact details if necessary.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
DotTip
component was only visible for the toggle. This PR changes it and shows the tip no matter the button publish directly or opens the publish sidebar.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 find "Just" to be a weasel word and would like to remove it, but I know that's a bit out-of-scope for the PR. Just saying' 😆