Skip to content

Post Navigation Link: Refactor settings panel to use ToolsPanel #70276

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

Merged

Conversation

SainathPoojary
Copy link
Contributor

@SainathPoojary SainathPoojary commented May 30, 2025

Closes: #70273

What?

Refactored the Post Navigation Link Block to use ToolsPanel instead of PanelBody.

Screenshots or screencast

Screen.Recording.2025-06-02.at.5.36.39.PM.mov

@troychaplin
Copy link
Contributor

Not sure if this relates to the failed check, but I was doing similar block updates recently and @t-hamano pointed out that the block I was working on did not have an edit.native.js file. You can see the comments from that conversation here: #70185 (comment)

@troychaplin
Copy link
Contributor

@t-hamano I've seen you mention this issue on a couple other PRs relating to refactoring to use the ToolsPanel, is there a known fix for the order inconsistency in the block resets?

reset-order

@t-hamano
Copy link
Contributor

is there a known fix for the order inconsistency in the block resets?

No. See #67813 (comment)

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Post Navigation Link Affects the Post Navigation Link Block labels May 31, 2025
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.

The code itself looks good.

I've seen you mention this issue on a couple other PRs relating to refactoring to use the ToolsPanel, is there a known fix for the order inconsistency in the block resets?

Let's hear from others whether this is acceptable or not. See #67952 (comment)

@SainathPoojary
Copy link
Contributor Author

Hey @t-hamano,
One possible workaround could be to move “Display the title as a link” and “Include the label as part of the link” to the end. This would resolve the issue of incorrect ordering, though I’m not sure if it aligns with WordPress design standards.

Screen.Recording.2025-06-02.at.5.32.34.PM.mov

@SainathPoojary SainathPoojary marked this pull request as ready for review June 2, 2025 12:10
Copy link

github-actions bot commented Jun 2, 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: SainathPoojary <sainathpoojary@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: troychaplin <areziaal@git.wordpress.org>

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

@t-hamano
Copy link
Contributor

t-hamano commented Jun 3, 2025

One possible workaround could be to move “Display the title as a link” and “Include the label as part of the link” to the end.

Personally, I prefer not to change the order as I don't think this is a fundamental solution.

@SainathPoojary
Copy link
Contributor Author

Agreed @t-hamano, Changing the order feels like a workaround rather than a fundamental solution.

@t-hamano
Copy link
Contributor

I've seen you mention this issue on a couple other PRs relating to refactoring to use the ToolsPanel, is there a known fix for the order inconsistency in the block resets?

Let's hear from others whether this is acceptable or not. See #67952 (comment)

For now, it seems better to accept this issue and prioritize the migration to ToolsPanel. See #67952 (comment). Let's merge this.

@t-hamano t-hamano merged commit c547f4d into WordPress:trunk Jun 14, 2025
89 of 103 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.1 milestone Jun 14, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…Press#70276)

Co-authored-by: SainathPoojary <sainathpoojary@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: troychaplin <areziaal@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Navigation Link Affects the Post Navigation Link Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor "Settings" panel of Post Navigation Link block to use ToolsPanel instead of PanelBody
3 participants