Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Columns Being Displayed #78

Merged
merged 4 commits into from
Jul 15, 2022

Conversation

kpattaswamy
Copy link
Member

This PR presets all column options as chosen to display when a script is selected. Removing a particular column that is being displayed will safely remove that column's usage in a potential groupby/aggregate query as well.

Also renamed the column_filtering.tsx file to column_display.tsx for better representation and moved corresponding functionality to that file from query_editor.tsx.

@aimichelle aimichelle requested a review from NickLanam July 13, 2022 17:10
Copy link
Member

@NickLanam NickLanam left a comment

Choose a reason for hiding this comment

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

LGTM with a few nits

type Props = QueryEditorProps<DataSource, PixieDataQuery, PixieDataSourceOptions>;

export function getColumnsScript(
chosenOptions: Array<SelectableValue<number>>,
Copy link
Member

Choose a reason for hiding this comment

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

Nit for a future diff: Array<SelectableValue<number>> shows up so often in this plugin now that maybe we should alias it in types.ts, like export type SelectableColumns = Array<SelectableValue<number>> or some other useful name.

@aimichelle aimichelle merged commit 10c82d7 into pixie-io:main Jul 15, 2022
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