Skip to content

RSS: Refactor setting panel to use ToolsPanel #70213

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
merged 2 commits into from
May 26, 2025

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented May 25, 2025

What?

Closes #70205

Refactors the RSS block's "Settings" panel to use the modern ToolsPanel component instead of the deprecated PanelBody.

Why?

This change:

  • Brings consistency with newer block implementations
  • Adds standardized reset controls
  • Improves user experience with unified panel behavior

How?

  • Replaced PanelBody with ToolsPanel in inspector controls
  • Wrapped individual controls in ToolsPanelItem components
  • Implemented proper reset handlers for all attributes
  • Added conditional rendering within the ToolsPanel structure
  • Maintained existing functionality while modernizing the UI

Testing Instructions

  • Add an RSS block to a post/page
  • Configure various settings:
  • Open links in a new tab
  • Verify all controls work as expected
  • Use the panel menu to reset individual settings and all functionality

Screencast

Before

Screen.Recording.2025-05-26.at.01.07.03.mov

After

Screen.Recording.2025-05-26.at.01.04.34.mov

@himanshupathak95 himanshupathak95 marked this pull request as ready for review May 25, 2025 19:39
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: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@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 t-hamano added [Type] Enhancement A suggestion for improvement. [Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed labels May 26, 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.

Thanks for the PR!

I've left some feedback, but it almost looks good.

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 👍

@t-hamano t-hamano merged commit 0ef7b89 into WordPress:trunk May 26, 2025
60 of 61 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.0 milestone May 26, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
* RSS: Refactor setting panel to use ToolsPanel

* RSS: Reset column count in grid layout to `3`

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor "Settings" panel of RSS block to use ToolsPanel instead of PanelBody
2 participants