feat: Add Column toggle button to filter panel in DBSearchPage#1947
Draft
feat: Add Column toggle button to filter panel in DBSearchPage#1947
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>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
E2E Test Results✅ All tests passed • 92 passed • 3 skipped • 948s
Tests ran across 4 shards in parallel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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