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: fix empty content sidebar panel #64569

Merged

Conversation

shreya0204
Copy link
Contributor

What?

This fix hides the Content Panel when editing a template if no content is available.

Why?

Fixes: #64472

How?

Added a check if content is available, if not then returning null

Testing Instructions

  1. Activate Twenty Twenty-Four.
  2. Go to Appearance > Editor.
  3. Open the editor, editing for example Blog Home.
  4. Delete the header and footer template parts from the template.
  5. Open the settings sidebar.
  6. The Template Panel should be hidden

Testing Instructions for Keyboard

Screenshots or screencast

https://www.loom.com/share/a4b9f6cb7a644b8489d9669b5354ad5a?sid=2508bc29-63ea-4935-8ad5-16aa6c98665d

Copy link

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: shreya0204 <shreya0204@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: hanneslsm <hanneslsm@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: carolinan <poena@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.

LGTM! It's working as expected 👍

@t-hamano t-hamano merged commit 633236b into WordPress:trunk Aug 17, 2024
61 checks passed
@github-actions github-actions bot added this to the Gutenberg 19.1 milestone Aug 17, 2024
@artemiomorales artemiomorales added [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Aug 21, 2024
bph pushed a commit to bph/gutenberg that referenced this pull request Aug 31, 2024
Co-authored-by: shreya0204 <shreya0204@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: hanneslsm <hanneslsm@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
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") General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template Sidebar Panel: Content panel shows even when it is empty
3 participants