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

Add header filtering to query result grid #18373

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add header filtering to query result grid #18373

wants to merge 12 commits into from

Conversation

cssuh
Copy link
Member

@cssuh cssuh commented Nov 11, 2024

Addresses: #18063
Addresses: #18250

Adds filtering to the header menu
Screenshot 2024-11-11 at 3 29 45 PM

TODO:

  • Add context switching (currently we lose applied filters if we switch tabs)

Copy link

github-actions bot commented Nov 11, 2024

PR Changes

Category Main Branch PR Branch Difference
Code Coverage 49.93% 50.06% $${\color{lightgreen} .13\% }$$
VSIX Size 11696 KB 11699 KB $${\color{lightgreen} 3 KB \space (0\%) }$$
Webview Bundle Size 3084 KB 3088 KB $${\color{lightgreen} 4 KB \space (0\%) }$$

@caohai
Copy link
Member

caohai commented Nov 11, 2024

Can you update the PR title to be more specific? Probably something like Add header filtering to query result grid

@cssuh cssuh changed the title Add filtering Add header filtering to query result grid Nov 11, 2024
@@ -238,6 +376,86 @@ export class HeaderFilter<T extends Slick.SlickData> {
this.setFocusToColumn(columnDef);
}

private async createFilterList(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this list need to be virtualized?

Copy link
Member

Choose a reason for hiding this comment

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

@cssuh Can you test filtering with something like 10k different rows?

apply: l10n.t("Apply"),
clear: l10n.t("Clear"),
search: l10n.t("Search..."),
selected: l10n.t("0 Selected"),
Copy link
Contributor

Choose a reason for hiding this comment

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

When is this shown? My gut says that this either ought to be "{num} selected" or "None selected" (word rather than number for the special "zero-case" feels nicer here to me?)

apply: l10n.t("Apply"),
clear: l10n.t("Clear"),
search: l10n.t("Search..."),
selected: l10n.t("0 Selected"),
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is only shown when none are selected, then the var name should be noneSelected or zeroSelected instead of selected

@Benjin
Copy link
Contributor

Benjin commented Nov 13, 2024

Can you add a video to the PR description so we can see it in action?

Comment on lines +106 to +113
if (
this.theme === ColorThemeKind.Dark ||
this.theme === ColorThemeKind.HighContrast
) {
$el.addClass("vs-dark");
} else {
$el.addClass("vs-light");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know how "vs-light" differs from just "light"? Could this just use utils.resolveVscodeThemeType(themeKind) instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Quick question, why are we adding classes to the component?

Is using vscode css variables not enough in this case? We should generally just stick to them for all of our coloring and styling needs.

Currently, this doesn't support vs Hight Contrast light theme.

@croblesm croblesm self-assigned this Nov 15, 2024
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.

5 participants