-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Comment Content block: Update placeholder copy #67468
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: +5 B (0%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
ca50c52
to
0f5f258
Compare
Seems like a step in the right direction to me :) |
It's a step in the right direction, yes, however I think we can do even better. Keep in mind, this text serves not just the purpose of being a placeholder, it serves as some visual style indication: "your comment will look like this". That's one of the reasons the Post Content placeholder is a fair bit longer, to better indicate: a lot of text might go here. Could we do, instead:
A bit dry still, but captures the spirit of the Post Content block. |
I like it! Applied in 050e926. Thank you @jasmussen! |
I guess it looks a bit repeated. I'm okay if others are okay, but just to be sure: would it be possible to show different placeholder content for the nested comments? Perhaps just in the combined block? |
Yeah, I can’t argue with that 😅 FWIW, we’re displaying three nested comments in the Site Editor to illustrate the concept of comments nesting. But we could do things differently, e.g. show only one. Do you think that's preferable?
Hmm, which one do you mean with "combined" block? The top level (i.e. first) one? I'll try and tweak it a bit, but I'm not sure we can easily change the placeholder text in one instance of the Comment Content block but not in the others (or at least not without e.g. requiring an extra block attribute just for the placeholders -- which wouldn't make any sense IMO). |
No, we definitely need to show multiple, to show that comments can nest. What I mean is this, in ASCII mockup:
Essentially you'd need to contextually override the placeholder content based on the nesting level, just so this default state is visually improved. |
Yes indeed. Thanks for trying these things, and exploring, it helps map out the territory. Upon reflection, because it's duplicated, we may need to go simple after all. Perhaps we go back, almost to the start, and say:
It's barely different from what's shipping in trunk, but perhaps it threads the needle? Not sure, we can also go all the way back to "This is the.." etc. Outside of the larger improvements outlined, this may be where we have to end up after all. |
Edit: Spoke too soon. I'm not getting the first comment in the template, but the currently selected one (which happens to default to the first one). This means that with my latest change, the copy would change depending on which comment you click on. I'll revert. |
Could you use React context to detect which Comment Content block is in the thread? If that doable the you could use the context provider to change the value indicating if the comment is top level or not. |
What?
Update the placeholder copy of the Comment Content block in the editor to read "This is the Comment Content block." instead of just "Comment Content".
(I'm open to other suggestion 🙂)
Why?
To make it less terse, and more consistent with the Post Content block:
gutenberg/packages/block-library/src/post-content/edit.js
Lines 138 to 152 in 22c43ff
How?
By replacing a string.
Testing Instructions
In the Site Editor, view any template that contains the Comments block (and thus, the Comment Content block). Or insert one.
Screenshots or screencast