Skip to content

Commit

Permalink
feat(eda): filter by column (#1217)
Browse files Browse the repository at this point in the history
Closes #1216 

### Summary of Changes

Can now filter rows by columns.
Filters update and retain state. Profiling gets outdated depending on if
current History state has profiling. Can get refreshed (that runner
method inefficient since calling runner 3 times but not enough time).
Tabs get set to outdated appropriately.
WARNING: Includes all other pending PRs, approve those first.

---------

Co-authored-by: Lars Reimann <[email protected]>
Co-authored-by: megalinter-bot <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 1b742e7 commit 77ad26c
Show file tree
Hide file tree
Showing 21 changed files with 1,115 additions and 201 deletions.
70 changes: 39 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"docs:api": "shx rm -rf dist docs/api && safe-ds document packages/safe-ds-lang/src/resources/builtins -o docs/api"
},
"devDependencies": {
"@lars-reimann/eslint-config-svelte": "^7.3.0",
"@lars-reimann/eslint-config-svelte": "^7.4.0",
"@lars-reimann/prettier-config-svelte": "^5.2.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/safe-ds-eda/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import TableView from './components/TableView.svelte';
import Sidebar from './components/Sidebar.svelte';
import { throttle } from 'lodash';
import { currentTabIndex, tableKey, tabs } from './webviewState';
import { currentTabIndex, tabKey, tableKey, tabs } from './webviewState';
import TabContent from './components/tabs/TabContent.svelte';
let sidebarWidth = 307; // Initial width of the sidebar in pixels
Expand Down Expand Up @@ -49,7 +49,7 @@
<TableView {sidebarWidth} />
{/key}
</div>
{#key $tableKey}
{#key $tabKey}
{#if $tabs.length > 0}
{#each $tabs as tab, index}
<div class:hide={index !== $currentTabIndex}>
Expand Down
16 changes: 14 additions & 2 deletions packages/safe-ds-eda/src/apis/extensionApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { get } from 'svelte/store';
import type { HistoryEntry } from '../../types/state';
import { table } from '../webviewState';
import { profilingLoading, table, history } from '../webviewState';
import type { ExecuteRunnerAllEntry } from '../../types/messaging';
import { filterHistoryOnlyInternal } from './historyApi';
import { filterHistoryOnlyInternal } from '../filterHistory';

export const createInfoToast = function (message: string) {
window.injVscode.postMessage({ command: 'setInfo', value: message });
Expand Down Expand Up @@ -102,3 +102,15 @@ export const executeRunner = function (state: HistoryEntry[], entry: HistoryEntr
executeRunnerDefault(state, entry);
}
};

export const refreshProfiling = function (historyId: number) {
profilingLoading.set(true);

window.injVscode.postMessage({
command: 'refreshProfiling',
value: {
historyEntries: get(history).slice(0, historyId + 1),
historyId,
},
});
};
Loading

0 comments on commit 77ad26c

Please sign in to comment.