feat: Add Column toggle button to filter panel in DBSearchPage#1947
feat: Add Column toggle button to filter panel in DBSearchPage#1947kodiakhq[bot] merged 4 commits intomainfrom
Conversation
Add a +/- icon button next to the show distribution button in each FilterGroup header. Clicking the button adds or removes the filter's field from the SELECT statement, reflecting immediately in the table. - Add onColumnToggle and isColumnDisplayed props to FilterGroup - Pass toggleColumn and displayedColumns from DBSearchPage through DBSearchPageFilters and NestedFilterGroup to each FilterGroup - Show IconPlus when column is not displayed, IconMinus when it is - Include tooltip (Add Column / Remove Column) for discoverability Co-authored-by: Mike Shi <mike@hyperdx.io>
🦋 Changeset detectedLatest commit: b1ae829 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
E2E Test Results✅ All tests passed • 91 passed • 3 skipped • 967s
Tests ran across 4 shards in parallel. |
Co-authored-by: Mike Shi <mike@hyperdx.io>
PR Review✅ No critical issues found. The implementation is clean and consistent with existing patterns:
One minor observation: the |
|
@claude add a changeset |
Co-authored-by: Dan Hable <dhable@users.noreply.github.com>
Knip - Unused Code Analysis⚪ 0 change in total issues (240 on main → 240 on PR)
What is this?Knip finds unused files, dependencies, and exports in your codebase. Run |
## Summary Adds a column toggle button (+ / - icon) next to the "Show Distribution" button in each filter group header on the search page. Clicking the button adds or removes the filter's field from the `SELECT` statement, and the table reflects the change immediately. ### Changes - **`FilterGroup`** (`DBSearchPageFilters.tsx`): Added `onColumnToggle` and `isColumnDisplayed` props. Renders an `ActionIcon` with `IconPlus` (add) or `IconMinus` (remove) between the distribution toggle and the pin field button. - **`NestedFilterGroup`**: Passes the new column toggle props through to child `FilterGroup` components. - **`DBSearchPage.tsx`**: Passes `toggleColumn` and `displayedColumns` to `DBSearchPageFilters`, reusing the existing `toggleColumn` callback that manages the `SELECT` form field. ### Screenshots or video | Before | After | | :----- | :---- | | Only distribution and pin buttons in filter header | New +/- column button appears between distribution and pin buttons | ### How to test locally or on Vercel 1. Navigate to the Search page 2. Open the filter panel on the left side 3. Find any filter group and hover over the header area — a `+` icon should appear next to the distribution chart icon 4. Click the `+` icon — the field should be added to the `SELECT` input and appear as a column in the results table 5. Click the `-` icon (now shown since the column is displayed) — the field should be removed from `SELECT` and the column disappears ### References - Linear Issue: HDX-3770 Linear Issue: [HDX-3770](https://linear.app/clickhouse/issue/HDX-3770/telstra-add-column-from-filter-panel-in-dbsearchpage) <div><a href="https://cursor.com/agents/bc-11d702b5-a58e-485c-982f-61d990e45091"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-11d702b5-a58e-485c-982f-61d990e45091"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Adds a column toggle button (+ / - icon) next to the "Show Distribution" button in each filter group header on the search page. Clicking the button adds or removes the filter's field from the
SELECTstatement, and the table reflects the change immediately.Changes
FilterGroup(DBSearchPageFilters.tsx): AddedonColumnToggleandisColumnDisplayedprops. Renders anActionIconwithIconPlus(add) orIconMinus(remove) between the distribution toggle and the pin field button.NestedFilterGroup: Passes the new column toggle props through to childFilterGroupcomponents.DBSearchPage.tsx: PassestoggleColumnanddisplayedColumnstoDBSearchPageFilters, reusing the existingtoggleColumncallback that manages theSELECTform field.Screenshots or video
How to test locally or on Vercel
+icon should appear next to the distribution chart icon+icon — the field should be added to theSELECTinput and appear as a column in the results table-icon (now shown since the column is displayed) — the field should be removed fromSELECTand the column disappearsReferences
Linear Issue: HDX-3770