-
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
New block: Post comments link #29564
Conversation
Add the generated fixtures for post-comments-link.
This looking good. I think it would be good to have an option to customize the text - I might like it to say "Leave a comment" rather than show the number. It might also be nice to add an option to display an icon next to the link. |
This is what I see: We need a new icon. But I think that's probably something that can wait, and not something that should block this PR. I'd also echo Ben's comment above about a custom phrasing, but also suggest that's something that can wait (I'd like the same customizability for the pagination blocks, for example). One thing I noticed is that the block isn't inert: I could swear there was precedence in some existing block for making links like that inert using a So I guess this just needs a code review. But would be good to ticket followups. Thank you! |
If the disabled component is used we won't be able to also have an editable text. |
Good point, though we could just put a textfield in the sidebar. While normally putting it directly in the canvas is the best strategy, I have a vague instinct that the sidebar might be where people intuit a rename to be. But this is not a strong opinion, and as noted, it could definitely be a followup. |
The use of links inside the editors may need a more comprehensive review so that the behavior is the same in different blocks. |
Agreed. We've been talking about a "navigation cursor" you can select from the tools drop-down, which would navigate to link destinations inside the editor, when links are clicked. Sometimes referred to as "browse mode". |
Set text color to false in block.json, Updated comment count logic, update index.php
Description
Part of #22724
Adds a new post comments link block.
The block displays the number of comments, and links to the comments area on the single view.
❓ -It tries to link to #comments even if the single view does not have a comment(s) block.
How has this been tested?
I have added the block inside the post content, and viewed the post on the front:
With and without comments, with and without comments enabled.
I have added the block to the index.html file of TT1 Blocks, to make sure that it inherits the context and displays correctly in a query loop.
Screenshots
TT1 Blocks, front:
The title is showing because the theme does not have a screen-reader-text class.
Types of changes
New block.
Checklist: