Skip to content

[Property grid]: don't hide non empty values - #1724

Merged
saskliutas merged 11 commits into
masterfrom
JonasD/non-null-value-hiding
Jun 19, 2026
Merged

[Property grid]: don't hide non empty values#1724
saskliutas merged 11 commits into
masterfrom
JonasD/non-null-value-hiding

Conversation

@JonasDov

Copy link
Copy Markdown
Contributor

closes #1715

Copilot AI review requested due to automatic review settings June 17, 2026 09:52
@JonasDov
JonasDov requested review from a team as code owners June 17, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #1715 where the Property Grid “Hide null values” feature was incorrectly hiding boolean switches (e.g., false) and merged properties by refining the null-value filtering logic and expanding coverage with targeted tests.

Changes:

  • Replace the “non-empty” value filter with a “non-null” value filter that uses underlying primitive value presence (instead of displayValue truthiness).
  • Update PropertyGridContent to use the new non-null filterer when showNullValues is disabled.
  • Add regression tests to ensure false boolean primitives and merged primitives are not filtered out.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/itwin/property-grid/src/property-grid-react/components/FilteringPropertyGrid.tsx Renames/updates the filterer to treat false/merged primitives as non-null.
packages/itwin/property-grid/src/property-grid-react/components/PropertyGridContent.tsx Switches the default “hide nulls” filterer to the new non-null filterer.
packages/itwin/property-grid/src/test/components/FilteringPropertyGrid.test.tsx Adds regression tests for false booleans and merged primitives; updates references to the renamed filterer.
change/@itwin-property-grid-react-1715-hide-null-boolean.json Adds a patch change note for the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JonasDov JonasDov changed the title [Property grid]: don't hide non null values [Property grid]: don't hide non empty values Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/itwin/property-grid/README.md:88

  • This README comment still refers to "show/hide null values", but the example now uses ShowHideEmptyValuesSettingsMenuItem. Updating the wording keeps the documentation consistent with the renamed API.
          (props) => <ShowHideEmptyValuesSettingsMenuItem {...props} persist={true} />,
        ],

        // supply an optional custom storage for user preferences, e.g. the show/hide null values used above
        preferencesStorage: new IModelAppUserPreferencesStorage("my-favorites-namespace"),

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

JonasDov and others added 3 commits June 18, 2026 09:51
…EmptyValuesSetting.tsx

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
@JonasDov
JonasDov enabled auto-merge (squash) June 18, 2026 08:11
@saskliutas
saskliutas disabled auto-merge June 19, 2026 07:10
@saskliutas
saskliutas merged commit 6a9a3b9 into master Jun 19, 2026
13 checks passed
@saskliutas
saskliutas deleted the JonasD/non-null-value-hiding branch June 19, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property grid hide null values feature removes boolean switch.

4 participants