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

Prevent Pre-Publish Panel from Displaying Incorrect Information After Navigating away #67010

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

Conversation

sarthaknagoshe2002
Copy link

@sarthaknagoshe2002 sarthaknagoshe2002 commented Nov 14, 2024

Fixes: #64913

What?

This PR addresses a bug highlighted in #64913 where the pre-publish panel displays incorrect or broken information when switching to edit a template part. Specifically, if you open the pre-publish checks and immediately switch to edit a template part, the panel continues to show details about the template part, instead of closing or updating appropriately.

Why?

This fix improves the user experience by preventing confusion caused by incorrect information in the pre-publish panel. It ensures the behavior aligns with expectations, where the pre-publish is closed when navigating away.

How?

The issue is resolved by ensuring that when the user navigates away from editing the page, the pre-publish panel is closed. This change ensures that the publish flow is not interrupted and the pre-publish checks are only shown for the current page or post, not the template part.

Testing Instructions

  1. Open a draft page in the editor
  2. Ensure pre-publish checks are enabled
  3. Click on publish to open the pre-publish panel
  4. Select the header then click 'Edit' in the block toolbar
  5. Now the pre-publish panel closes when navigating away

Screenshots or screencast

pre-publish.panel.bug.mov

Copy link

github-actions bot commented Nov 14, 2024

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: sarthaknagoshe2002 <[email protected]>
Co-authored-by: jameskoster <[email protected]>

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

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 14, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @sarthaknagoshe2002! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-publish checks showing template part details
1 participant