Conversation
|
Fixes #4880 |
mcsf
left a comment
There was a problem hiding this comment.
Definitely cool to see how neatly we can build this now.
Now, can we make this more ergonomic? Suggestions:
dd: Enter twice to start a newdt(not too different fromdt: Space (like List blocks) to convert todddd: (not sure about this one) Backspace to to convert todt- Add transforms between those two types
- Because DLs are visually so clean, I wonder if we need visual cues to let the user know that they are starting a new
dtordd— but what?
|
Yes, I left that as a to do :D
I think we should also take into account that you can have multiple Maybe we could have |
Good reminder. Additionally, this to me reinforces the need for us to somehow address: "Because DLs are visually so clean, I wonder if we need visual cues to let the user know that they are starting a new dt or dd"
Might work, yeah. |
| keywords: [ __( 'list' ), __( 'definitions' ), __( 'terms' ) ], | ||
| category: 'layout', | ||
| supports: { | ||
| className: false, |
There was a problem hiding this comment.
Why is this set to false?
For consistency, I think we should add color controls to this block if we add them to the List block.
| export const settings = { | ||
| title: __( 'Description List' ), | ||
| description: __( 'List groups of terms and descriptions.' ), | ||
| keywords: [ __( 'list' ), __( 'definitions' ), __( 'terms' ) ], |
There was a problem hiding this comment.
I don't think list is a necessary keyword when the title already includes that word. Maybe glossary would be a better keyword to use here?
|
|
||
| export const settings = { | ||
| title: __( 'Description List' ), | ||
| description: __( 'List groups of terms and descriptions.' ), |
There was a problem hiding this comment.
| description: __( 'List groups of terms and descriptions.' ), | |
| description: __( 'List of terms and their descriptions.' ), |
| }, | ||
| edit, | ||
| save, | ||
| attributes: { |
There was a problem hiding this comment.
This, the name, and the category should be moved to a block.json. (Same with other blocks being added in this PR.)
|
Quite some time has passed since there was any movement here. |
|
Currently both the WHATWG and the W3C HTML5 standards support grouping |
|
Wrapping in divs is tricky, because then we somehow need to ensure that inside that div dt elements come first and the dd elements follow. If these are mixed, then there's no point to group them. |
|
@ellatrix Are you still working on this? And could you summarize anything that's left to be done before this can be merged? |
|
Quite some time has passed since there was any movement here. Link to the first website ever |
There was a problem hiding this comment.
tested successfully
@youknowriad
@talldan
@Soean
@ajitbohra
@jorgefilipecosta
you are assigned as reviewer. Please take action on it and test this PR. We're missing the Description List
|
@hans2103 just use a plugin. It is obvious they don't see any value on adding this block. Issues were opened during the alpha or beta stages of Gutenberg around 2018 iirc and people have been waiting ever since. I don't even work with WordPress anymore after seeing all of this lol |
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @hans2103, @ahaubold, @JanBolmeson, @acidrums4, @sarahmonster, @lassemt, @DietteJanssen, @hartl. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. At least one To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Hi everyone, I’ve been looking for a way to use a definition list in Gutenberg and came across this ticket – it looks like a promising and well-considered proposal. Since
I understand that priorities shift over time, but I’d love to see this become part of Gutenberg if possible. Is there anything that might help to revive the discussion around this block? Thanks again to everyone involved for your effort! |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
Let's land this! |
|
For anyone following this earlier implementation, a current Description List block proposal is now open in #81728. The newer PR builds on the ideas explored here while updating the implementation for current Gutenberg APIs. It uses separate Description List, Description Term, and Description Detail blocks; preserves flexible multiple-term and multiple-description sequences; and includes toolbar and Tab/Shift+Tab transforms between term and detail blocks. It is currently up to date with |
Description
Fixes #4880
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl
This is a block that I think would have been more difficult to implement without the use of light blocks. With light blocks, we're able to use proper semantic tags in the editor, which also allow it to be styled more easily.
To do: it might be could to handle enter/delete from rich text.
How has this been tested?
Screenshots
Types of changes
Checklist: