Skip to content

fix: add explicit Apply and missing-value filtering for boolean columns - #1886

Merged
Fred-Wu merged 1 commit into
REditorSupport:mainfrom
Fred-Wu:fix/data-viewer-logical-filters
Oct 21, 2026
Merged

Fred-Wu merged 1 commit into
REditorSupport:mainfrom
Fred-Wu:fix/data-viewer-logical-filters

Conversation

@Fred-Wu

@Fred-Wu Fred-Wu commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Boolean-column filters currently apply immediately when a choice is selected. This can trigger accidental data fetching before the user finishes choosing a filter, particularly for large datasets.

This change:

  • Adds anApply button alongside Reset so users explicitly apply their selection.
  • Adds a Blank choice to filter NA values in boolean columns such as c(TRUE, FALSE, NA).

Validation: all 13 data-viewer unit tests, TypeScript checks, and lint pass. New tests cover filter options, button configuration, and True/False predicates excluding missing values. Browser interaction has not been tested.

@Fred-Wu
Fred-Wu marked this pull request as ready for review October 20, 2026 12:20
@Fred-Wu
Fred-Wu requested a review from renkun-ken October 20, 2026 12:21

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed commit 18b4f5e780611c10c8d4a7a96975ac562654c60d. No actionable issues found.

I exercised the shared viewer script with AG Grid 36.2.0 in headless Chrome, using both the client-side row model and an infinite-row datasource harness backed by fixtures from this commit's sess implementation:

  • Selecting or changing True/False/Blank leaves the applied filter and displayed rows unchanged until Apply; the infinite datasource receives no extra request while editing the selection.
  • Applying True and False excludes missing values. Blank selects only the missing rows, and its generated filter model is accepted by the R backend.
  • Reset restores all rows; toggling floating filters and restoring saved viewer state preserve the applied boolean filter.

Validation passed: all 13 data-viewer unit tests, TypeScript compilation, lint, and 195 R data-viewer assertions using the exact prepared dist/resources/sess installed in a temporary library. Direct backend checks on c(TRUE, FALSE, NA, TRUE, FALSE, NA) also passed for all three operators. Current macOS, Ubuntu, Windows, build, and lint CI checks are green.

@Fred-Wu
Fred-Wu merged commit f9a9eaa into REditorSupport:main Oct 21, 2026
5 checks passed
@eitsupi

eitsupi commented Oct 21, 2026

Copy link
Copy Markdown
Member

Formatting error should be fixed #1891.

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.

3 participants