Skip to content

Fix: exclude non-hideable fields from the Properties list in the view config#71729

Merged
oandregal merged 2 commits intoWordPress:trunkfrom
dinhtungdu:fix/hide-fields-with-enableHiding
Sep 18, 2025
Merged

Fix: exclude non-hideable fields from the Properties list in the view config#71729
oandregal merged 2 commits intoWordPress:trunkfrom
dinhtungdu:fix/hide-fields-with-enableHiding

Conversation

@dinhtungdu
Copy link
Member

What?

This PR hides fields with enableHiding set to false from the hidden properties list in the view config panel.

Why?

If a non-hideable field is not visible in the view, it should be excluded from the properties list. Because it can't be toggled, it doesn't make sense to keep them in the list. This will keep the list clean and let consumers hide internal fields that they may not want to expose to end users.

How?

This PR updates the condition to filter out fields with enableHiding set to false.

Testing Instructions

  1. Open the DataViews story.
  2. See the Type field not visible in the Hidden list anymore.
  3. See you can still filter the list using Type.

Testing Instructions for Keyboard

Screenshots or screencast

Before After
image image

@github-actions
Copy link

github-actions bot commented Sep 18, 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: dinhtungdu <[email protected]>
Co-authored-by: oandregal <[email protected]>

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] Bug An existing feature does not function as intended [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews labels Sep 18, 2025
@oandregal oandregal enabled auto-merge (squash) September 18, 2025 11:43
@oandregal oandregal merged commit ceb5a7d into WordPress:trunk Sep 18, 2025
67 of 69 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.8 milestone Sep 18, 2025
@dinhtungdu dinhtungdu deleted the fix/hide-fields-with-enableHiding branch January 21, 2026 08:43
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 [Package] DataViews /packages/dataviews [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants