Skip to content

Conversation

@dhananjaykuber
Copy link
Contributor

@dhananjaykuber dhananjaykuber commented Jan 14, 2025

Fixes #68649

What?

Fixes the missing icon display for Template Parts in the Site Editor's document settings sidebar by implementing proper icon mapping for template part areas.

Why?

After #66459, the document settings sidebar stopped displaying icons for Template Parts because the icon value returned from default_template_part_areas was a string that wasn't properly mapped to a WordPress icon component. This PR restores the icon display functionality.

Testing Instructions

  1. Open the Site Editor
  2. Navigate to a Header template part (or create one if none exists)
  3. Observe that the document settings sidebar now displays the correct icon
  4. Repeat the process with Footer and Sidebar template parts to verify icons display correctly

Screenshots or screencast

Screenshot 2025-01-14 at 2 18 13 PM

@Mamaduka Mamaduka added [Type] Regression Related to a regression in the latest release [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jan 14, 2025
@dhananjaykuber dhananjaykuber marked this pull request as ready for review January 14, 2025 08:51
@github-actions
Copy link

github-actions bot commented Jan 14, 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: dhananjaykuber <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: im3dabasia <[email protected]>

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

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.

Thanks, @dhananjaykuber!

@Mamaduka Mamaduka merged commit 7b6e775 into WordPress:trunk Jan 15, 2025
64 of 66 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.1 milestone Jan 15, 2025
Gulamdastgir-Momin pushed a commit to Gulamdastgir-Momin/gutenberg that referenced this pull request Jan 23, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Regression Related to a regression in the latest release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site Editor: Template part is missing an icon in the sidebar

2 participants