Skip to content

feat: pivot click to add filter in canvas#8951

Merged
djbarnwal merged 63 commits into
mainfrom
feat/pivot-click-filter
May 15, 2026
Merged

feat: pivot click to add filter in canvas#8951
djbarnwal merged 63 commits into
mainfrom
feat/pivot-click-filter

Conversation

@djbarnwal
Copy link
Copy Markdown
Member

@djbarnwal djbarnwal commented Mar 2, 2026

https://linear.app/rilldata/issue/APP-770/click-to-filter-for-pivot-and-table-component

Adds click to filter for pivot and flat table in canvas

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@djbarnwal djbarnwal marked this pull request as ready for review March 9, 2026 15:00
@djbarnwal djbarnwal requested a review from AdityaHegde March 24, 2026 11:30
@AdityaHegde
Copy link
Copy Markdown
Collaborator

Some UXQA items before I do a code review,

  1. Exclude mode breaks the interactions. Selecting values will make the rows disappear vs in leaderboard where they are retained with an x instead of a checkmark in front of values.
  2. Clicking on null doesnt add a filter.
  3. Filtering from a leaderboard component will not retain other values, only filtering from pivot retains other values.

@djbarnwal
Copy link
Copy Markdown
Member Author

This will need some more re-work based on https://www.notion.so/rilldata/Click-to-Filter-31bba33c8f57807189f0dd685498438f

@djbarnwal djbarnwal requested a review from a team as a code owner April 30, 2026 14:33
@ericpgreen2 ericpgreen2 requested a review from ericokuma May 5, 2026 16:05
Copy link
Copy Markdown
Contributor

@ericokuma ericokuma left a comment

Choose a reason for hiding this comment

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

LGTM!

@djbarnwal djbarnwal requested a review from AdityaHegde May 14, 2026 10:14
// (extractDimensionFiltersFromExpression, getActiveDimensionNames, etc.)
// ---------------------------------------------------------------------------

vi.mock(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why are we mocking theses? There doesnt seem to be tests for them specifically so would be good to let them work as is. Same for pivot-row-selection.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The mocks make the setup and orchestration easy. Using the real functions would involve complex real world pivot table setup. The current tests focus on the click selection logic specifically. A broader real world test suite can be a follow up for this.

@djbarnwal djbarnwal merged commit c7e666f into main May 15, 2026
14 checks passed
@djbarnwal djbarnwal deleted the feat/pivot-click-filter branch May 15, 2026 11:23
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