Skip to content
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

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

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

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
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 <dhananjaykuber@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: im3dabasia <im3dabasia1@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
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!

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