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

Search Block: Refactoring settings panel #67907

Merged

Conversation

benazeer-ben
Copy link
Contributor

@benazeer-ben benazeer-ben commented Dec 13, 2024

What?

Part of: #67813

Why?

As per ticket definition we need to refactor Search Block code to include ToolsPanel instead of PanelBody.

How?

Refactored Search Block code to include ToolsPanel instead of PanelBody.

Testing Instructions

  • Go to WP admin dashboard
  • Edit any post/ page
  • Add search block.
  • Check settings panel of the search block and verify the change.

Screenshots or screencast

Before After
beforesearch aftersearch

Copy link

github-actions bot commented Dec 13, 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: benazeer-ben <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
Co-authored-by: t-hamano <[email protected]>

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

@fabiankaegy fabiankaegy added [Type] Enhancement A suggestion for improvement. [Block] Search Affects the Search Block - used to display a search field labels Dec 13, 2024
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this :)

In order to keep the scope of this conversation as small as possible we should retain the current status quo as much as possible. So by default any controls that were visible by default should continue to be shown by default.

CleanShot.2024-12-13.at.09.12.55.mp4

packages/block-library/src/search/edit.js Show resolved Hide resolved
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.

Thanks for the PR!

To me, the following dropdown looks strange:

image

Because the two controls work in sync.

I think what is expected here is to place the two controls inside a single ToolsPanelItem.

packages/block-library/src/search/edit.js Show resolved Hide resolved
packages/block-library/src/search/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/search/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/search/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/search/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/search/edit.js Outdated Show resolved Hide resolved
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! I have one final suggestion that I'd be happy if you could check out.

747801532fb0930a36d91c476062a13a.mp4

@t-hamano t-hamano dismissed fabiankaegy’s stale review January 17, 2025 08:23

Since the proposed changes have already been resolved: #67907 (comment)

@t-hamano t-hamano merged commit aec60be into WordPress:trunk Jan 17, 2025
62 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.2 milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Search Affects the Search Block - used to display a search field [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor "Settings" panel of Search block to use ToolsPanel instead of PanelBody
3 participants