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 filter state management #18602

Merged
merged 17 commits into from
Feb 5, 2025
Merged

Add filter state management #18602

merged 17 commits into from
Feb 5, 2025

Conversation

cssuh
Copy link
Member

@cssuh cssuh commented Jan 28, 2025

Adds filter state management

Before:
filters were only tracked on a column.id level, which led to issues like #18514.

After:
Filters are tracked at a (query editor) uri level, containing multiple sets of filters for each grid id and column id respectively.

I also added a singleton store, which allows us to store state outside of the react state (this is needed in cases where we don't want to trigger a re-render which happens every time the react state is updated). We don't need to re-render here because that is triggered and managed by the slickgrid library.

filterFixFinal

Fixes #18514

Copy link

github-actions bot commented Jan 28, 2025

PR Changes

Category Main Branch PR Branch Difference
Code Coverage 50.43% 50.60% $${\color{lightgreen} .17\% }$$
VSIX Size 12140 KB 12142 KB $${\color{lightgreen} 2 KB \space (0\%) }$$
Webview Bundle Size 3176 KB 3176 KB $${\color{lightgreen} 0 KB \space (0\%) }$$

src/reactviews/common/singletonStore.ts Outdated Show resolved Hide resolved
src/reactviews/common/vscodeWebviewProvider.tsx Outdated Show resolved Hide resolved
src/reactviews/common/vscodeWebviewProvider.tsx Outdated Show resolved Hide resolved
src/queryResult/queryResultWebViewController.ts Outdated Show resolved Hide resolved
src/queryResult/queryResultWebViewController.ts Outdated Show resolved Hide resolved
@cssuh cssuh requested a review from Benjin January 30, 2025 00:58
@cssuh cssuh requested a review from Benjin February 3, 2025 20:49
src/controllers/mainController.ts Show resolved Hide resolved
src/controllers/mainController.ts Show resolved Hide resolved
src/controllers/mainController.ts Show resolved Hide resolved
src/controllers/reactWebviewBaseController.ts Outdated Show resolved Hide resolved
src/queryResult/singletonStore.ts Outdated Show resolved Hide resolved
src/reactviews/pages/QueryResult/table/table.ts Outdated Show resolved Hide resolved
@cssuh cssuh requested a review from Benjin February 5, 2025 20:02
@cssuh cssuh merged commit 35cdb90 into main Feb 5, 2025
6 checks passed
@cssuh cssuh deleted the chsuh/filterWip branch February 5, 2025 20:10
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.

Applying a filter to a column affects all result sets containing a column with that name
3 participants