Skip to content

Conversation

@hbhalodia
Copy link
Contributor

What?

Part of: #74248

Why?

  1. Remove extra wrapper div from the block in backend.

How?

  1. Uses the HTMLRenderer component and useServerSideRender() hook to eliminate these extra divs and make the HTML on the front end and editor match for Breadcrumbs Block.

Testing Instructions

  1. Open post or page.
  2. Add core/breadcrumbs block.
  3. Inspect the block, you will notice no extra div present.

Testing Instructions for Keyboard

  • NA

Screenshots or screencast

Before (Editor) After (Editor)
Screenshot 2025-12-30 at 3 32 36 PM Screenshot 2025-12-30 at 3 31 38 PM

@hbhalodia hbhalodia self-assigned this Dec 30, 2025
@github-actions github-actions bot added the [Package] Block library /packages/block-library label Dec 30, 2025
@github-actions
Copy link

github-actions bot commented Dec 30, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

The style attributes added on the server side are not visible in the editor, so we need to fix that:

Image

This should be resolved by modifying the useBlockProps hook as follows:

const blockProps = useBlockProps( {
	ref: disabledRef,
	style: { '--separator': `'${ separator }'` },
} );

@hbhalodia hbhalodia requested a review from t-hamano December 31, 2025 11:42
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM!

@t-hamano
Copy link
Contributor

Sorry, I just discovered an issue with the sidebar flickering, so I've submitted #74291 to fix it. If that approach makes sense, let's apply it to this PR as well.

@hbhalodia
Copy link
Contributor Author

hbhalodia commented Dec 31, 2025

Sorry, I just discovered an issue with the sidebar flickering, so I've submitted #74291 to fix it. If that approach makes sense, let's apply it to this PR as well.

I am sorry 😅, I had discovered that earlier while fixing the comments, but I thought it too not a bug related to the fix. Fixing the same in all the PRs and current one as well.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Breadcrumbs Affects the Breadcrumbs Block labels Dec 31, 2025
@hbhalodia
Copy link
Contributor Author

@t-hamano This is now updated, Needs review on the same.

Thank You,

@hbhalodia hbhalodia requested a review from t-hamano December 31, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Breadcrumbs Affects the Breadcrumbs Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants