Skip to content

Commit b7caa6f

Browse files
committed
remove calls to brainbox website in storybook
1 parent 96c98d3 commit b7caa6f

8 files changed

Lines changed: 69 additions & 43 deletions

File tree

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/dist/
2-
/storybook-static/
2+
/storybook-static/
3+
!.storybook

.storybook/main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
22
const config = {
3-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
3+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
44
addons: [
5-
"@storybook/addon-links",
6-
"@storybook/addon-essentials",
7-
"@storybook/addon-interactions",
5+
'@storybook/addon-links',
6+
'@storybook/addon-essentials',
7+
'@storybook/addon-interactions'
88
],
99
framework: {
10-
name: "@storybook/vue3-vite",
11-
options: {},
10+
name: '@storybook/vue3-vite',
11+
options: {}
1212
},
1313
docs: {
14-
autodocs: "tag",
15-
},
14+
autodocs: 'tag'
15+
}
1616
};
1717
export default config;

.storybook/preview-head.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

.storybook/preview.js

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,51 @@
1-
import Wrapper from "@/components/layout/Wrapper.vue";
1+
import brainboxLogo from '@/assets/brainbox-logo-small_noFont.svg';
2+
import Wrapper from '@/components/layout/Wrapper.vue';
3+
import '@fontsource/roboto/100.css';
24

35
export default {
4-
decorators: [() => {
5-
return {
6+
decorators: [
7+
() => ({
68
components: { Wrapper },
7-
template: "<Wrapper><story/></Wrapper>",
9+
template: '<Wrapper><story/></Wrapper>',
810
provide: {
911
config: {
10-
siteName: "BrainBox",
11-
baseURL: "https://brainbox.pasteur.fr",
12-
logoURL:
13-
"https://brainbox.pasteur.fr/img/brainbox-logo-small_noFont.svg",
14-
githubURL: "https://github.com/neuroanatomy/BrainBox",
15-
issuesURL: "https://github.com/neuroanatomy/BrainBox/issues/new",
16-
searchURL: "https://openneurolab.github.io/metasearch",
17-
docURL: "https://github.com/neuroanatomy/BrainBox",
18-
userSearchURL: 'https://brainbox.pasteur.fr/api/userNameQuery?q=',
19-
fetchLabelSets: async () => {
20-
return (await (await fetch(`https://brainbox.pasteur.fr/api/getLabelsets`)).json())
21-
},
12+
siteName: 'BrainBox',
13+
baseURL: window.location.protocol + '//' + window.location.host,
14+
logoURL: brainboxLogo,
15+
githubURL: 'https://github.com/neuroanatomy/BrainBox',
16+
issuesURL: 'https://github.com/neuroanatomy/BrainBox/issues/new',
17+
searchURL: 'https://openneurolab.github.io/metasearch',
18+
docURL: 'https://github.com/neuroanatomy/BrainBox',
19+
userSearchURL: '/api/userNameQuery?q=',
20+
fetchLabelSets: () => ([
21+
{'name': 'Axolotl: 80 regions', 'source': 'axolotl_labels.json'},
22+
{'name': 'Axolotl: 12 structures', 'source': 'axolotl_structures.json'},
23+
{'name': 'Cerebellum: 28 segments', 'source': 'cerebellum.json'},
24+
{'name': 'Cerebrum', 'source': 'cerebrum.json'},
25+
{'name': 'Corpus Callosum: 5 segments', 'source': 'corpus_callosum.json'},
26+
{'name': 'Ferret 50 Regions', 'source': 'ferret50.json'},
27+
{'name': 'Foreground', 'source': 'foreground.json'},
28+
{'name': '10 regions', 'source': 'freestyle.json'}
29+
]),
2230
annotationTypes: ['text', 'volume'],
23-
usernameField: 'username',
31+
usernameField: 'username'
2432
},
2533
user: {
26-
username: "dhovart",
27-
},
28-
},
29-
};
30-
}]
31-
}
34+
username: 'dhovart'
35+
}
36+
}
37+
})
38+
]
39+
};
3240

3341
export const parameters = {
3442
backgrounds: {
35-
default: "black",
43+
default: 'black',
3644
values: [
3745
{
38-
name: "black",
39-
value: "#222",
40-
},
41-
],
42-
},
46+
name: 'black',
47+
value: '#222'
48+
}
49+
]
50+
}
4351
};

package-lock.json

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nwl-components",
3-
"version": "1.3.17",
3+
"version": "1.3.18",
44
"files": [
55
"dist"
66
],
@@ -38,6 +38,7 @@
3838
"devDependencies": {
3939
"@babel/core": "^7.17.4",
4040
"@faker-js/faker": "^6.0.0-alpha.6",
41+
"@fontsource/roboto": "^5.2.6",
4142
"@storybook/addon-essentials": "^7.6.19",
4243
"@storybook/addon-interactions": "^7.6.19",
4344
"@storybook/addon-links": "^7.6.19",

src/assets/brainbox-logo-small_noFont.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/project/Editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ onMounted(() => {
235235
236236
const areaObserver = new ResizeObserver(() => {
237237
requestAnimationFrame(() => {
238-
areaRect.value = area.value.getBoundingClientRect();
238+
areaRect.value = area.value?.getBoundingClientRect();
239239
});
240240
});
241241
areaObserver.observe(area.value);

0 commit comments

Comments
 (0)