-
Notifications
You must be signed in to change notification settings - Fork 42
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
Bugfix: Add correct Block Type label to Block Workspace editor #2017
base: main
Are you sure you want to change the base?
Bugfix: Add correct Block Type label to Block Workspace editor #2017
Conversation
@@ -218,6 +229,11 @@ export class UmbBlockWorkspaceContext<LayoutDataType extends UmbBlockLayoutBaseM | |||
throw new Error('Block Entries could not create block'); | |||
} | |||
|
|||
const blockType = this.#blockManager!.getBlockTypeOf(contentElementTypeId); | |||
if (blockType?.label) { | |||
this.setName(blockType.label); |
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.
We are still missing the Label interpretation feature, meaning using the Label (template) would not necessary be very pretty.
How was it in v.13, did we show the interpolated label in the header of the modal? :-)
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.
Ah, you're right! The modal label shows the interpolated version of it. 🤦♂️ Shall I draft this until that gets resolved?
Description
Correctly loads the Block Type from the Block Manager, gets the
label
property and saves it within the Block Workspace context for loading in the create/edit modal.Types of changes
Motivation and context
Fixes umbraco/Umbraco-CMS#16463
How to test?
Try creating or editing any block within a Block List or Block Grid, and make sure the modal shows the correct Block Type name
Screenshots (if appropriate)
Before:
After:
On create
On edit
Checklist