-
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
Fix: Allow post comment button to inherit button & global styles automatically #31338
Conversation
Size Change: -321 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
What a rollercoaster: Really nice work, though! This is before: This is after: From just testing this corner of the flow, it seems clear that showing Also, the placeholder state for the comment form feels rather lacking, with just the text prompt. It could/should look just like the frontend, no reason not to. However both of those appear to be existing issues entirely unrelated to this PR, but thought were just worth mentioning. Just on its own, this PR feels like a vast improvement. The code also looks good to me, and I'm happy to give a ✅ — but because it's touching PHP corners of FSE that I haven't trodden that well, I'd love one small sanity check, for example by @ntsekouras if he has time. |
Thank you for checking this!
Yeah... Instead of initially creating the branch from
Agreed, the block's placeholder definitely needs to be improved in a separate PR 👍 |
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.
Thanks Ari!
What a rollercoaster:
😁
I think this is okay for now (and definitely an improvement) but the root issue remains the implementation of this block. Related issue: #24221
Description
Inside a
theme.json
file add this:You'll see that buttons become black, with white text, and a 7px border-radius. But not the comment-form button.. We've copied the button CSS directly there and it overrides any CSS from global styles.
This PR cleans up the CSS to allow inheriting styles from the button directly, and also allows global styles to be applied properly.
How has this been tested?
Tested in a block theme with and without the
theme.json
tweak. In both cases the comment-form is the same as all other buttons on the site.Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).