Skip to content

fix: block library missing title for grouped blocks#976

Merged
mhaack merged 5 commits into
mainfrom
ew-lib
Jun 2, 2026
Merged

fix: block library missing title for grouped blocks#976
mhaack merged 5 commits into
mainfrom
ew-lib

Conversation

@mhaack
Copy link
Copy Markdown
Contributor

@mhaack mhaack commented May 29, 2026

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented May 29, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

? { name: prevSib.textContent }
: getBlockName(block.className || '');
let item;
if (block.dataset.groupheading) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth adding a test for the three branches in transformBlock (groupheading attr, heading sibling, fallback to getBlockName). without it the same thing can regress silently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree, added tests

: getBlockName(block.className || '');
let item;
if (block.dataset.groupheading) {
item = { name: block.dataset.groupheading };
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this data-groupheading (one word) or data-group-heading? the dataset key needs to match exactly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct:

block
<div data-isgroup=​"true" data-groupheading=​"Hero with text">​…​</div>​

block.dataset
DOMStringMap {isgroup: 'true', groupheading: 'Hero with text'}

@mhaack mhaack merged commit cb6d0eb into main Jun 2, 2026
3 of 4 checks passed
@mhaack mhaack deleted the ew-lib branch June 2, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants