-
Notifications
You must be signed in to change notification settings - Fork 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
Markdown block: move support link away from description #28416
Conversation
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.
This is a great little change 👍I claim this also looks better than before. Thanks!
Tests well and looks good 🚢
This change is executed nicely, but I'm still not a big fan. While the Gutenberg docs recommend against long descriptions and branding in this section, I don't think having a link there conflicts with that. The description area "describes" the block and if the user doesn't know much about that, the link provides more description elsewhere. They seem to go well together. With the link now in its own section, I begin to feel like its lacking validation for this. My vote is to keep it the way it was, but I'm open to the change. |
We could adjust CSS to make it look again like it used to, while keeping the "description" field free from any HTML. In fact I think I'll move this to be shared component so I can re-use it with Simple Payments and other block. |
I think it was better before. Adding it as it's own metabox seems to feel fairly disconnected. |
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.
My opinion is that if we are to hack our way to make it look as part of the description, actually keeping it a part of the description makes more sense.
// Sidebar | ||
.components-panel .jetpack-markdown__support { | ||
border-top: 0; | ||
padding-left: 54px; |
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.
Now there is where it feels off 😕
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.
Hehehe agreed with this too. :-) Non-ideal solutions all around!
Closing; I think this was enough of an exploration into what we could have and it's a pity there isn't an ideal solution. Let's hope we'll get official declarative support for documentation links later on: Let's also make sure that all our blocks add support links in exact same way to stay consistent. |
According to Gutenberg handbook, descriptions should be kept simple.
Even though our way of adding the support link directly in description works now (at least for desktop), we should keep description semantically free from custom UI. I'd imagine description popping up in different part sof the UI in future, especially for mobile clients.
Basically, this isn't visually as nice but semantically more correct.
Before
After
Changes proposed in this Pull Request
Testing instructions