Skip to content

Conversation

Sukhendu2002
Copy link
Contributor

@Sukhendu2002 Sukhendu2002 commented Apr 28, 2025

What?

Follow up: #69904 (comment)

This PR makes two small improvements to the HTMLElementControl component:

  • Improves the warning message shown when duplicate <main> elements are detected, clarifying that the duplicate may be in the page template as well as in the content.
  • Improves spacing

Screenshots or screencast

Before After
Screenshot 2025-04-16 at 2 52 44 PM Screenshot 2025-04-28 at 2 55 19 PM

@Sukhendu2002 Sukhendu2002 marked this pull request as ready for review April 28, 2025 09:27
@Sukhendu2002 Sukhendu2002 requested a review from ellatrix as a code owner April 28, 2025 09:27
Copy link

github-actions bot commented Apr 28, 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: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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!

  • Improves the warning message shown when duplicate <main> elements are detected, clarifying that the duplicate may be in the page template as well as in the content.
  • Improves spacing

Both of these have worked fine for me.

@Mamaduka @luminuu @carolinan Any other feedback?

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor labels Apr 28, 2025
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

I think the warning message can be simplified; otherwise, everything looks good.

Thanks, @Sukhendu2002!

@@ -11,7 +11,8 @@
}

.components-base-control,
.components-radio-control {
.components-radio-control,
.block-editor-html-element-control {
Copy link
Member

Choose a reason for hiding this comment

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

I hope we can eliminate these special classes in the future, but for now, it makes sense to group them.

@WordPress/gutenberg-components, do we have an issue to modernize block inspector controls styling now that most components have migrated to __nextHasNoMarginBottom?

Copy link
Contributor

Choose a reason for hiding this comment

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

There is a suggestion to unify the layout of the block inspector. These styles should be removed in the future.

@t-hamano t-hamano merged commit b5596a6 into WordPress:trunk May 1, 2025
60 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.8 milestone May 1, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ordPress#70002)

* Fix: Improve warning message and add bottom margin in HTMLElementControl

* Simplify warning message

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants