Skip to content

Conversation

oandregal
Copy link
Member

What?

Fixes a bug that prevented the user-input filters (text, integer) to be cleared.

Before:

Screen.Recording.2025-07-29.at.10.28.54.mov

After:

Screen.Recording.2025-07-29.at.10.28.27.mov

How?

  • Text: empty string is considered undefined.
  • Integer: do not convert empty string or undefined to number.

Testing Instructions

  • Open the storybook and find the "DataViews > Field Types > All" story.
  • Use the filters for text and integer and verify they are cleared properly.

@oandregal oandregal requested a review from youknowriad July 29, 2025 08:34
Copy link

github-actions bot commented Jul 29, 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: oandregal <oandregal@git.wordpress.org>
Co-authored-by: chihsuan <chihsuan@git.wordpress.org>

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

@oandregal oandregal self-assigned this Jul 29, 2025
@oandregal oandregal added [Type] Bug An existing feature does not function as intended [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Jul 29, 2025
@oandregal
Copy link
Member Author

cc @chihsuan in case you can help review this one.

Copy link
Member

@chihsuan chihsuan 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 fixing it! @oandregal

Changes look good, and confirmed it's working as expected. 👍

Just a minor suggestion (not a blocker): Would it be worth adding a comment explaining why we're specifically doing the conversion?

Copy link

Flaky tests detected in 0522c11.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/16596388123
📝 Reported issues:

@oandregal oandregal merged commit 077272d into trunk Jul 29, 2025
59 checks passed
@oandregal oandregal deleted the fix/user-input-filter-empty branch July 29, 2025 14:21
@github-actions github-actions bot added this to the Gutenberg 21.4 milestone Jul 29, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Jul 31, 2025
Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: chihsuan <chihsuan@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants