Skip to content

Commit 056f190

Browse files
committed
refactor: remove ability to configure sample data visibility at runtime
1 parent e3bce7e commit 056f190

3 files changed

Lines changed: 2 additions & 26 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
env:
1313
DOWNLOAD_TIMEOUT: 60000
14+
VITE_SHOW_SAMPLE_DATA: true
1415
steps:
1516
- uses: actions/checkout@v4
1617
with:

docs/configuration_file.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ hdf5, iwi.cbor, mha, nii, nii.gz, nrrd, vtk
5757

5858
When loading files, VolView can automatically convert images to segment groups
5959
if they follow a naming convention. For example, an image with name like `foo.segmentation.bar`
60-
will be converted to a segment group for a base image named like `foo.baz`.
60+
will be converted to a segment group for a base image named like `foo.baz`.
6161
The `segmentation` extension is defined by the `io.segmentGroupExtension` key, which takes a
6262
string. Files `foo.[segmentGroupExtension].bar` will be automatilly converted to segment groups for a base image named `foo.baz`. The default is `''` and will disable the feature.
6363

@@ -87,18 +87,6 @@ To configure a key for an action, add its action name and the key(s) under the `
8787
}
8888
```
8989

90-
## Visibility of Sample Data section
91-
92-
Simplify the data browser by hiding the Sample Data expandable section.
93-
94-
```json
95-
{
96-
"dataBrowser": {
97-
"hideSampleData": false
98-
}
99-
}
100-
```
101-
10290
## Example JSON:
10391

10492
```json

src/io/import/configJson.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Layouts } from '@/src/config';
66
// for applyConfig
77
import { useRectangleStore } from '@/src/store/tools/rectangles';
88
import { useRulerStore } from '@/src/store/tools/rulers';
9-
import { useDataBrowserStore } from '@/src/store/data-browser';
109
import { usePolygonStore } from '@/src/store/tools/polygons';
1110
import { useViewStore } from '@/src/store/views';
1211
import { useWindowingStore } from '@/src/store/view-configs/windowing';
@@ -24,12 +23,6 @@ const layout = z
2423
})
2524
.optional();
2625

27-
const dataBrowser = z
28-
.object({
29-
hideSampleData: z.boolean().optional(),
30-
})
31-
.optional();
32-
3326
const shortcuts = z.record(zodEnumFromObjKeys(ACTIONS), z.string()).optional();
3427

3528
// --------------------------------------------------------------------------
@@ -83,7 +76,6 @@ const windowing = z
8376

8477
export const config = z.object({
8578
layout,
86-
dataBrowser,
8779
labels,
8880
shortcuts,
8981
io,
@@ -124,10 +116,6 @@ const applyLabels = (manifest: Config) => {
124116
applyLabelsToStore(usePolygonStore(), polygonLabels);
125117
};
126118

127-
const applySampleData = (manifest: Config) => {
128-
useDataBrowserStore().hideSampleData = !!manifest.dataBrowser?.hideSampleData;
129-
};
130-
131119
const applyLayout = (manifest: Config) => {
132120
if (manifest.layout?.activeLayout) {
133121
const startingLayout = Layouts[manifest.layout.activeLayout];
@@ -161,7 +149,6 @@ const applyWindowing = (manifest: Config) => {
161149
export const applyConfig = (manifest: Config) => {
162150
applyLayout(manifest);
163151
applyLabels(manifest);
164-
applySampleData(manifest);
165152
applyShortcuts(manifest);
166153
applyIo(manifest);
167154
applyWindowing(manifest);

0 commit comments

Comments
 (0)