-
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
Post Comments Form: Add button that enables commenting to warning #41603
Post Comments Form: Add button that enables commenting to warning #41603
Conversation
Size Change: +170 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
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.
Nice job!
It is great to see it work, but, I guess this case is not really common.
As you have to:
1.) Add the comment form to a post. While the common case is to add it on the site editor.
2.) Have global comments enabled.
3.) Disable the comments in each post after adding the comment.
However, dealing with global settings as you mentioned could have huge benefits on the site editor part (as a post edition should not be able to change global settings, this could mess the site with side effects).
Should we explore that possibility for other use cases like Comments, Avatar, Date formatting, etc?
Yeah -- plus the post settings are easily available from the sidebar, so it's almost redundant 😅 This is really mostly to demo the principle, since it was one of the easiest settings to change via code.
👍
I would like to try that, yes! Issue #40614 has a whole list of other warnings; I'd definitely like to prioritize the ones that occur in the Site Editor. I'm just not sure if we even have actions available for dispatch for all of these 😅 (or even |
I'll hold off a bit longer before I merge as there's been a bit of a new development on this discussion: #41603 (comment). Maybe we can avoid the (loose) coupling with the editor store after all 😬 |
Ready for another look 😄 |
d72be81
to
d48277e
Compare
Trying a rebase to fix e2e failures. |
The remaining e2e failures seem unrelated (Navigation block); it looks like they're also present on |
…1603) Add a button to the Post Comments Form block that allows the user to enable commenting when it's disabled.
I just cherry-picked this PR to the wp/6.0 branch to get it included in the next release: 4970dcf |
What?
Add a button to the Post Comments Form block that allows the user to enable commenting when it's disabled.
Part of #40614; also the first experiment to explore whether a solution like this makes sense.
Why?
Remove frustration from the user coming from a warning message that doesn't give them agency to remediate the problem. See #40614 for more context.
How?
In the Post Comments Form block warning that states that commenting is not allowed, add a button that allows the user to enable it.
Testing Instructions
Note that this might not be the most interesting case from the list in #40614, since the "Allow comments" option is otherwise fairly easily accessible from the Post sidebar. However, we might apply the same principle (button in warning) to other cases where the corresponding setting isn't as readily availably (but e.g. somewhere in wp-admin > Settings > Discussion, see e.g. #41308).
Screenshots or screencast
Open questions