-
Notifications
You must be signed in to change notification settings - Fork 40
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
[UX] Allow non-reusable custom blocks created in Layouts to have an admin label #1703
Comments
The goal here is to be able to leave the block title empty (so that nothing is shown on the frontend), but have a custom block admin UI title that makes each block distinguish-able from the rest when editing a layout that has many custom blocks for example. I would like to address that issue, but I don't know where to start. Any pointers? |
...when I say I want to address the issue, mean start a PR that solves the issue in core. I have a workaround already: enter in the block title field whatever is desirable for an admin label (in the layout admin UI) and then use CSS to hide it from the frontend. This addresses the use case of needing an admin label for custom blocks while hiding it in the front end. If one needs a different title shown in the frontend than the one used as an admin title, then I guess they can use the CSS content property. These are only workarounds though (rather "hacky") and this should be resolved in core by having separate fields for admin label and frontend title. |
@klonos This may have been fixed in 1.5. The |
Nope, still not fixed. To reproduce, add two custom blocks in any layout and leave their "Display title" field empty (that defines the title the block will have in the front-end). Notice how both blocks have "Custom block" as title in the admin UI. |
Sorry, I was referring to the no way to customize that part of the title. |
Maybe the problem only occurs for blocks that are not made reusable? |
Yes, making the blocks reusable is sort of workaround. |
Yes, precisely. I think that we have the following options here:
I have cooked something like that already, screenshots upcoming... |
The first custom block has no title and no content. In such cases, the custom blocks are rendered as currently. You cannot tell them apart, but I see no reason why people would have more than one such "empty" custom block in their layouts. So edge case. The 2nd one and all bu the 3rd one have content, but no title. See how easy it is to tell? 😉 The 3rd one has a title, but no content. In such cases, the stock block type description is displayed as admin preview, but the block title is in the form of "Custom block: %block_title%". |
...I wanted to post a few more screenshots of some thoughts and issues I've had, but since you reacted lightning-fast with a ❤️ @jenlampton, I'll go ahead and file a PR with what I have and then post those... |
Alright, I have put an initial PR up for review. There's things to consider still...
|
I like the idea of using the block content in the block preview on the layout page, but I think it should be optional. I would like to have the |
The title and description of this issue is correctly identifying a problem of a missing
On the So perhaps this is a regression as the
@klonos It seems to me that the best solution would be to make the |
@klonos Perhaps something like |
Closing as a duplicate of the more general #4558 |
As per issue title. According to @jenlampton in #1522 and #1523, there must have been a field there available for setting an admin title. I don't see any such field any more. Regression perhaps?
PR by @klonos: backdrop/backdrop#1729
The text was updated successfully, but these errors were encountered: