gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Post Navigation Link: Refactor settings panel to use ToolsPanel

Open SainathPoojary opened this issue 7 months ago • 7 comments

Closes: #70273

What?

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

Screenshots or screencast

https://github.com/user-attachments/assets/1b7722fa-62ae-4311-b139-7799bf1dff37

SainathPoojary avatar May 30 '25 15:05 SainathPoojary

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: https://github.com/WordPress/gutenberg/pull/70185#issuecomment-2916156552

troychaplin avatar May 30 '25 23:05 troychaplin

@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

troychaplin avatar May 30 '25 23:05 troychaplin

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

No. See https://github.com/WordPress/gutenberg/issues/67813#issuecomment-2907556825

t-hamano avatar May 31 '25 07:05 t-hamano

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.

https://github.com/user-attachments/assets/8549625f-daef-4881-8b14-2e48d4b4460a

SainathPoojary avatar Jun 02 '25 12:06 SainathPoojary

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 <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: troychaplin <[email protected]>

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

github-actions[bot] avatar Jun 02 '25 12:06 github-actions[bot]

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.

t-hamano avatar Jun 03 '25 00:06 t-hamano

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

SainathPoojary avatar Jun 03 '25 12:06 SainathPoojary

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 https://github.com/WordPress/gutenberg/pull/67952#issuecomment-2924645739

For now, it seems better to accept this issue and prioritize the migration to ToolsPanel. See https://github.com/WordPress/gutenberg/pull/67952#issuecomment-2966398972. Let's merge this.

t-hamano avatar Jun 14 '25 01:06 t-hamano