From f7621b7b641ed3cd41be83aad2e09ed5e37a1742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Br=C3=BCchner?= Date: Wed, 20 Apr 2022 15:06:20 +0200 Subject: [PATCH 01/38] refactor graphql query (#167) --- pages/benchmarking/_community/_id.spec.js | 4 - pages/benchmarking/_community/_id.vue | 3 - pages/benchmarking/_community/events.spec.js | 13 --- pages/benchmarking/_community/events.vue | 9 -- pages/benchmarking/_community/index.spec.js | 18 ---- pages/benchmarking/_community/index.vue | 9 -- store/challenge.js | 20 +--- store/community.js | 104 +++++++------------ 8 files changed, 43 insertions(+), 137 deletions(-) diff --git a/pages/benchmarking/_community/_id.spec.js b/pages/benchmarking/_community/_id.spec.js index a136da8b..52d9153a 100644 --- a/pages/benchmarking/_community/_id.spec.js +++ b/pages/benchmarking/_community/_id.spec.js @@ -48,9 +48,6 @@ describe('Community Participant', () => { }, actions: { setCurrentEvent: jest.fn(), - getTools: jest.fn(), - getDatasets: jest.fn(), - getBenchmarkingEvents: jest.fn(), getCommunity: jest.fn(), }, mutations: { @@ -113,7 +110,6 @@ describe('Community Participant', () => { const wrapper = factory(mockStore); expect(wrapper).toBeTruthy(); - expect(mockStore.challenge.actions.getDatasets).toHaveBeenCalled(); expect(mockStore.challenge.actions.getChallenge).toHaveBeenCalled(); }); diff --git a/pages/benchmarking/_community/_id.vue b/pages/benchmarking/_community/_id.vue index ae508bd2..360f5b1c 100644 --- a/pages/benchmarking/_community/_id.vue +++ b/pages/benchmarking/_community/_id.vue @@ -145,9 +145,6 @@ export default { mounted() { this.$parent.$emit('emitBreadcrumbs', this.breadcrumbs); if (this.$store.state.challenge.challenge._id !== this.$route.params.id) { - this.$store.dispatch('challenge/getDatasets', { - id: this.$route.params.id, - }); this.$store.dispatch('challenge/getChallenge', { id: this.$route.params.id, }); diff --git a/pages/benchmarking/_community/events.spec.js b/pages/benchmarking/_community/events.spec.js index 5ebc167d..e67d4343 100644 --- a/pages/benchmarking/_community/events.spec.js +++ b/pages/benchmarking/_community/events.spec.js @@ -45,9 +45,6 @@ describe('Event Index Page', () => { }, actions: { setCurrentEvent: jest.fn(), - getTools: jest.fn(), - getDatasets: jest.fn(), - getBenchmarkingEvents: jest.fn(), getCommunity: jest.fn(), }, mutations: { @@ -97,11 +94,6 @@ describe('Event Index Page', () => { expect(wrapper.vm.$route.query.event).toBe('testEventID'); expect(wrapper.vm.$route.params.community).toBe('someCommunityID'); expect(mockStore.community.actions.getCommunity).toHaveBeenCalled(); - expect( - mockStore.community.actions.getBenchmarkingEvents - ).toHaveBeenCalled(); - expect(mockStore.community.actions.getDatasets).toHaveBeenCalled(); - expect(mockStore.community.actions.getTools).toHaveBeenCalled(); expect(mockStore.community.actions.setCurrentEvent).not.toHaveBeenCalled(); }); @@ -112,11 +104,6 @@ describe('Event Index Page', () => { expect(wrapper.vm.$route.params.community).toBe('OEBC005'); expect(mockStore.community.actions.setCurrentEvent).not.toHaveBeenCalled(); expect(mockStore.community.actions.getCommunity).not.toHaveBeenCalled(); - expect( - mockStore.community.actions.getBenchmarkingEvents - ).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getDatasets).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getTools).not.toHaveBeenCalled(); }); it('does display a list of events and clicking an event pushes to community route', () => { diff --git a/pages/benchmarking/_community/events.vue b/pages/benchmarking/_community/events.vue index ceb074f7..85bf66cd 100644 --- a/pages/benchmarking/_community/events.vue +++ b/pages/benchmarking/_community/events.vue @@ -140,15 +140,6 @@ export default { this.$store.dispatch('community/getCommunity', { id: this.$route.params.community, }); - this.$store.dispatch('community/getBenchmarkingEvents', { - id: this.$route.params.community, - }); - this.$store.dispatch('community/getDatasets', { - id: this.$route.params.community, - }); - this.$store.dispatch('community/getTools', { - id: this.$route.params.community, - }); } }, methods: { diff --git a/pages/benchmarking/_community/index.spec.js b/pages/benchmarking/_community/index.spec.js index f832c073..ecea6c91 100644 --- a/pages/benchmarking/_community/index.spec.js +++ b/pages/benchmarking/_community/index.spec.js @@ -43,9 +43,6 @@ describe('CommunityPage', () => { }, actions: { setCurrentEvent: jest.fn(), - getTools: jest.fn(), - getDatasets: jest.fn(), - getBenchmarkingEvents: jest.fn(), getCommunity: jest.fn(), }, mutations: { @@ -100,11 +97,6 @@ describe('CommunityPage', () => { expect(wrapper.vm.$route.query.event).toBe('testEventID'); expect(wrapper.vm.$route.params.community).toBe('someCommunityID'); expect(mockStore.community.actions.getCommunity).toHaveBeenCalled(); - expect( - mockStore.community.actions.getBenchmarkingEvents - ).toHaveBeenCalled(); - expect(mockStore.community.actions.getDatasets).toHaveBeenCalled(); - expect(mockStore.community.actions.getTools).toHaveBeenCalled(); expect(mockStore.community.actions.setCurrentEvent).not.toHaveBeenCalled(); }); @@ -119,11 +111,6 @@ describe('CommunityPage', () => { MockEvent ); expect(mockStore.community.actions.getCommunity).not.toHaveBeenCalled(); - expect( - mockStore.community.actions.getBenchmarkingEvents - ).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getDatasets).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getTools).not.toHaveBeenCalled(); }); it('does not call store actions if no url param with event id and community is already in store', () => { @@ -134,11 +121,6 @@ describe('CommunityPage', () => { expect(wrapper.vm.$route.params.community).toBe('OEBC005'); expect(mockStore.community.actions.setCurrentEvent).not.toHaveBeenCalled(); expect(mockStore.community.actions.getCommunity).not.toHaveBeenCalled(); - expect( - mockStore.community.actions.getBenchmarkingEvents - ).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getDatasets).not.toHaveBeenCalled(); - expect(mockStore.community.actions.getTools).not.toHaveBeenCalled(); }); it('triggers store action setCurrentEvent when handleEventSelection is called', () => { diff --git a/pages/benchmarking/_community/index.vue b/pages/benchmarking/_community/index.vue index c00eb006..a90cf1d7 100644 --- a/pages/benchmarking/_community/index.vue +++ b/pages/benchmarking/_community/index.vue @@ -210,15 +210,6 @@ export default { this.$store.dispatch('community/getCommunity', { id: this.$route.params.community, }); - this.$store.dispatch('community/getBenchmarkingEvents', { - id: this.$route.params.community, - }); - this.$store.dispatch('community/getDatasets', { - id: this.$route.params.community, - }); - this.$store.dispatch('community/getTools', { - id: this.$route.params.community, - }); } else if (this.$route.query.event) { this.setCurrentEvent(this.$route.query.event); } diff --git a/store/challenge.js b/store/challenge.js index 54217dfa..e927d4d9 100644 --- a/store/challenge.js +++ b/store/challenge.js @@ -16,7 +16,7 @@ export default { const response = await this.$graphql.$post('/graphql', { query: ` - query getChallenges($id: String!) { + query ($id: String!) { getChallenges(challengeFilters: { id: $id }) { _id name @@ -28,22 +28,7 @@ export default { } } } - } - `, - variables: { - id: params.id, - }, - }); - commit('setChallenge', response.data); - commit('setLoading', { challenge: false }); - }, - async getDatasets({ commit }, params) { - commit('setLoading', { datasets: true }); - - const response = await this.$graphql.$post('/graphql', { - query: ` - query getDatasets($id: String!) { getDatasets( datasetFilters: { challenge_id: $id, type: "aggregation" } ) { @@ -59,6 +44,9 @@ export default { }, }); + commit('setChallenge', response.data); + commit('setLoading', { challenge: false }); + commit('setDatasets', response.data); commit('setLoading', { datasets: false }); }, diff --git a/store/community.js b/store/community.js index 3f0df06e..a54b9a41 100644 --- a/store/community.js +++ b/store/community.js @@ -19,9 +19,13 @@ export default { actions: { async getCommunity({ commit }, params) { commit('setLoading', { community: true }); + commit('setLoading', { events: true }); + commit('setLoading', { tools: true }); + commit('setLoading', { datasets: true }); + const response = await this.$graphql.$post('/graphql', { query: ` - query getCommunities($community_id: String!) { + query ($community_id: String!) { getCommunities(communityFilters: {id: $community_id}) { _id name @@ -38,59 +42,42 @@ export default { } __typename } - } - `, - variables: { - community_id: params.id, - }, - }); - commit('setCommunity', response.data); - commit('setLoading', { community: false }); - }, - async getBenchmarkingEvents({ commit }, params) { - commit('setLoading', { events: true }); - const response = await this.$graphql.$post('/graphql', { - query: ` - query getBenchmarkingEvents($community_id: String!) { + getBenchmarkingEvents(benchmarkingEventFilters: {community_id: $community_id}) { - _id - dates { - creation - __typename - } - name - url - challenges { _id + dates { + creation + __typename + } name - acronym url + challenges { + _id + name + acronym + url + __typename + } __typename } - __typename - } - } - `, - variables: { - community_id: params.id, - }, - }); - commit('setEvents', response.data); - commit('setLoading', { events: false }); - }, - async getDatasets({ commit }, params) { - commit('setLoading', { datasets: true }); - const response = await this.$graphql.$post('/graphql', { - query: ` - query getDatasets($community_id: String!) { + getDatasets(datasetFilters: {community_id: $community_id, visibility: "public"}) { - name - type - datalink { - uri + name + type + datalink { + uri + __typename + } __typename } - __typename + + getTools(toolFilters: {community_id: $community_id}) { + _id + name + status + description + registry_tool_id + __typename } } `, @@ -98,28 +85,15 @@ export default { community_id: params.id, }, }); + commit('setCommunity', response.data); + commit('setLoading', { community: false }); + + commit('setEvents', response.data); + commit('setLoading', { events: false }); + commit('setDatasets', response.data); commit('setLoading', { datasets: false }); - }, - async getTools({ commit }, params) { - commit('setLoading', { tools: true }); - const response = await this.$graphql.$post('/graphql', { - query: ` - query getTools($community_id: String!) { - getTools(toolFilters: {community_id: $community_id}) { - _id - name - status - description - registry_tool_id - __typename - } - } - `, - variables: { - community_id: params.id, - }, - }); + commit('setTools', response.data); commit('setLoading', { tools: false }); }, From ca8dc1d118d66acb226e0b8751aca9cdbecc0a45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 17:03:01 +0200 Subject: [PATCH 02/38] chore(deps-dev): bump stylelint from 14.6.1 to 14.7.1 (#166) Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.6.1 to 14.7.1. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/14.6.1...14.7.1) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 85 ++++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 45 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 92a32971..0271bafe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "node-notifier": "^10.0.1", "postcss-html": "^1.4.1", "prettier": "^2.6.2", - "stylelint": "^14.6.1", + "stylelint": "^14.7.1", "stylelint-config-prettier": "^9.0.3", "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^25.0.0", @@ -21842,12 +21842,12 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" @@ -23330,9 +23330,9 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -24617,9 +24617,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", - "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -28098,9 +28098,9 @@ } }, "node_modules/stylelint": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.6.1.tgz", - "integrity": "sha512-FfNdvZUZdzh9KDQxDnO7Opp+prKh8OQVuSW8S13cBtxrooCbm6J6royhUeb++53WPMt04VB+ZbOz/QmzAijs6Q==", + "version": "14.7.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.7.1.tgz", + "integrity": "sha512-rUOWm67hrzGXXyO/cInENEejF4urh1dLgOb9cr/3XLDb/t/A+rXQp3p6+no8o8QCKTgBUdhVUq/bXMgE988PJw==", "dev": true, "dependencies": { "balanced-match": "^2.0.0", @@ -28116,7 +28116,7 @@ "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", - "html-tags": "^3.1.0", + "html-tags": "^3.2.0", "ignore": "^5.2.0", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", @@ -28124,7 +28124,7 @@ "known-css-properties": "^0.24.0", "mathml-tag-names": "^2.1.3", "meow": "^9.0.0", - "micromatch": "^4.0.4", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "normalize-selector": "^0.2.0", "picocolors": "^1.0.0", @@ -28132,7 +28132,7 @@ "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.9", + "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "specificity": "^0.4.1", @@ -28315,12 +28315,15 @@ "dev": true }, "node_modules/stylelint/node_modules/html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.2.0.tgz", + "integrity": "sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/stylelint/node_modules/is-fullwidth-code-point": { @@ -49325,12 +49328,12 @@ "dev": true }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "miller-rabin": { @@ -50517,9 +50520,9 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, "pidtree": { "version": "0.5.0", @@ -51566,9 +51569,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", - "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -54333,9 +54336,9 @@ } }, "stylelint": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.6.1.tgz", - "integrity": "sha512-FfNdvZUZdzh9KDQxDnO7Opp+prKh8OQVuSW8S13cBtxrooCbm6J6royhUeb++53WPMt04VB+ZbOz/QmzAijs6Q==", + "version": "14.7.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.7.1.tgz", + "integrity": "sha512-rUOWm67hrzGXXyO/cInENEejF4urh1dLgOb9cr/3XLDb/t/A+rXQp3p6+no8o8QCKTgBUdhVUq/bXMgE988PJw==", "dev": true, "requires": { "balanced-match": "^2.0.0", @@ -54351,7 +54354,7 @@ "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", - "html-tags": "^3.1.0", + "html-tags": "^3.2.0", "ignore": "^5.2.0", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", @@ -54359,7 +54362,7 @@ "known-css-properties": "^0.24.0", "mathml-tag-names": "^2.1.3", "meow": "^9.0.0", - "micromatch": "^4.0.4", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "normalize-selector": "^0.2.0", "picocolors": "^1.0.0", @@ -54367,7 +54370,7 @@ "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.9", + "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "specificity": "^0.4.1", @@ -54407,9 +54410,9 @@ "dev": true }, "html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.2.0.tgz", + "integrity": "sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==", "dev": true }, "is-fullwidth-code-point": { diff --git a/package.json b/package.json index 87cfe4ad..df8e50cb 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "node-notifier": "^10.0.1", "postcss-html": "^1.4.1", "prettier": "^2.6.2", - "stylelint": "^14.6.1", + "stylelint": "^14.7.1", "stylelint-config-prettier": "^9.0.3", "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^25.0.0", From 5380d090da9cd64fd8e07bb4efd7efa030048e3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 17:03:16 +0200 Subject: [PATCH 03/38] fix(deps): bump gsap from 3.10.2 to 3.10.4 (#168) Bumps [gsap](https://github.com/greensock/GSAP) from 3.10.2 to 3.10.4. - [Release notes](https://github.com/greensock/GSAP/releases) - [Commits](https://github.com/greensock/GSAP/compare/3.10.2...3.10.4) --- updated-dependencies: - dependency-name: gsap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0271bafe..7557a295 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@inb/oeb-classification-table": "^1.2.3", "@nuxtjs/axios": "^5.13.6", "core-js": "^3.21.1", - "gsap": "^3.10.2", + "gsap": "^3.10.4", "lodash.debounce": "^4.0.8", "nuxt": "^2.15.8", "pluralize": "^8.0.0", @@ -16685,9 +16685,9 @@ "dev": true }, "node_modules/gsap": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.10.2.tgz", - "integrity": "sha512-exJVOda3O1NpgGjM4dzZONmSODWFP+JF/DwfiBfCPQPr15nm3M0TQczYKLZlMdBNdWxHMvRPKVqc1e1/6YD+zA==" + "version": "3.10.4", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.10.4.tgz", + "integrity": "sha512-6QatdkKxXCMfvCW4rM++0RqyLQAzFX5nwl3yHS0XPgkZBkiSEY3VZVbMltrdtsbER/xZonLtyHt684wRp4erlQ==" }, "node_modules/gzip-size": { "version": "6.0.0", @@ -45445,9 +45445,9 @@ "dev": true }, "gsap": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.10.2.tgz", - "integrity": "sha512-exJVOda3O1NpgGjM4dzZONmSODWFP+JF/DwfiBfCPQPr15nm3M0TQczYKLZlMdBNdWxHMvRPKVqc1e1/6YD+zA==" + "version": "3.10.4", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.10.4.tgz", + "integrity": "sha512-6QatdkKxXCMfvCW4rM++0RqyLQAzFX5nwl3yHS0XPgkZBkiSEY3VZVbMltrdtsbER/xZonLtyHt684wRp4erlQ==" }, "gzip-size": { "version": "6.0.0", diff --git a/package.json b/package.json index df8e50cb..c4f7ecb6 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@inb/oeb-classification-table": "^1.2.3", "@nuxtjs/axios": "^5.13.6", "core-js": "^3.21.1", - "gsap": "^3.10.2", + "gsap": "^3.10.4", "lodash.debounce": "^4.0.8", "nuxt": "^2.15.8", "pluralize": "^8.0.0", From edfe78c29e686056f123db24756f8fea1023f30f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:50:51 +0200 Subject: [PATCH 04/38] chore(deps-dev): bump lint-staged from 12.3.7 to 12.4.1 (#171) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.7 to 12.4.1. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v12.3.7...v12.4.1) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7557a295..11cf56a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "husky": "^7.0.4", "jest": "^27.5.1", "jest-transform-stub": "^2.0.0", - "lint-staged": "^12.3.7", + "lint-staged": "^12.4.1", "node-notifier": "^10.0.1", "postcss-html": "^1.4.1", "prettier": "^2.6.2", @@ -21000,9 +21000,9 @@ "dev": true }, "node_modules/lint-staged": { - "version": "12.3.7", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.7.tgz", - "integrity": "sha512-/S4D726e2GIsDVWIk1XGvheCaDm1SJRQp8efamZFWJxQMVEbOwSysp7xb49Oo73KYCdy97mIWinhlxcoNqIfIQ==", + "version": "12.4.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.1.tgz", + "integrity": "sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", @@ -48679,9 +48679,9 @@ "dev": true }, "lint-staged": { - "version": "12.3.7", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.7.tgz", - "integrity": "sha512-/S4D726e2GIsDVWIk1XGvheCaDm1SJRQp8efamZFWJxQMVEbOwSysp7xb49Oo73KYCdy97mIWinhlxcoNqIfIQ==", + "version": "12.4.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.1.tgz", + "integrity": "sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==", "dev": true, "requires": { "cli-truncate": "^3.1.0", diff --git a/package.json b/package.json index c4f7ecb6..84d214d3 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "husky": "^7.0.4", "jest": "^27.5.1", "jest-transform-stub": "^2.0.0", - "lint-staged": "^12.3.7", + "lint-staged": "^12.4.1", "node-notifier": "^10.0.1", "postcss-html": "^1.4.1", "prettier": "^2.6.2", From 7814a1e4b8ef7281cae63b8542115c5113abf2e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:51:04 +0200 Subject: [PATCH 05/38] chore(deps-dev): bump eslint-plugin-storybook from 0.5.8 to 0.5.11 (#169) Bumps [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) from 0.5.8 to 0.5.11. - [Release notes](https://github.com/storybookjs/eslint-plugin-storybook/releases) - [Changelog](https://github.com/storybookjs/eslint-plugin-storybook/blob/main/CHANGELOG.md) - [Commits](https://github.com/storybookjs/eslint-plugin-storybook/compare/v0.5.8...v0.5.11) --- updated-dependencies: - dependency-name: eslint-plugin-storybook dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 11cf56a1..6133205e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-nuxt": "^3.2.0", - "eslint-plugin-storybook": "^0.5.8", + "eslint-plugin-storybook": "^0.5.11", "eslint-plugin-vue": "^8.6.0", "husky": "^7.0.4", "jest": "^27.5.1", @@ -14791,9 +14791,9 @@ } }, "node_modules/eslint-plugin-storybook": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.5.8.tgz", - "integrity": "sha512-k67mXT9dOl0z8RFWL9SAQ38NaNst6BjCUDQudaDGjMJHrXncOfCSOz9ROGIVu//zVepZw8D3abdGn9OVvyJ3QA==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.5.11.tgz", + "integrity": "sha512-uNQn9zjH/+UiFxRC4hd69DnxOu4RoRbr76+yc3Bp/vIEo/n2K+NdQGh3zK9JLdMoctFAbzMfoKi9FQbZVZsCvQ==", "dev": true, "dependencies": { "@storybook/csf": "^0.0.1", @@ -44125,9 +44125,9 @@ "requires": {} }, "eslint-plugin-storybook": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.5.8.tgz", - "integrity": "sha512-k67mXT9dOl0z8RFWL9SAQ38NaNst6BjCUDQudaDGjMJHrXncOfCSOz9ROGIVu//zVepZw8D3abdGn9OVvyJ3QA==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.5.11.tgz", + "integrity": "sha512-uNQn9zjH/+UiFxRC4hd69DnxOu4RoRbr76+yc3Bp/vIEo/n2K+NdQGh3zK9JLdMoctFAbzMfoKi9FQbZVZsCvQ==", "dev": true, "requires": { "@storybook/csf": "^0.0.1", diff --git a/package.json b/package.json index 84d214d3..78ce4af8 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-nuxt": "^3.2.0", - "eslint-plugin-storybook": "^0.5.8", + "eslint-plugin-storybook": "^0.5.11", "eslint-plugin-vue": "^8.6.0", "husky": "^7.0.4", "jest": "^27.5.1", From 9e2e4f232db85aa671d1f013283ce79c23add201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Br=C3=BCchner?= Date: Fri, 29 Apr 2022 10:46:56 +0200 Subject: [PATCH 06/38] Add project tile to landing page (#33) * Revert "removed project tile for now" This reverts commit 25098fee4ca31cbd5bd082d0c23ea0e5ac3b0915. * specs and link * Update HeroNumbers.vue * Update HeroNumbers.spec.js * Added Text Pluralize to HeroNumbers * Added Key Feature Section to Landing Page * fixing tests * Update LandingParts.stories.js * Update index.vue * permedcoe pages * fixing tests * package update postcss-html * replacing marked with nuxt/content * Revert "replacing marked with nuxt/content" This reverts commit 7d52288c1e71bf4720cfde85ce21eec040ff486f. * Update index.vue * added permedcoe markdown draft * some markup styling * added image urls and styling * some more markdown styling * Update MarkedWrapper.vue * moving the markdown file * img styling wrapper * Update .prettierrc.js * remove static project data, filter based on community metadata * make markdown file load for projects semi-dynamic * some refactoring * added unit tests * more unit tests and some fixes for the markdown wrapper * adding stories to storybook * Added community empty states * Update CommunityComponents.stories.js * Update OEBC009.md * Update OEBC009.md --- .prettierrc.js | 2 +- .storybook/main.js | 1 - components/Cards/CommunityCard.spec.js | 10 +- components/Cards/CommunityCard.vue | 9 +- .../__snapshots__/CommunityCard.spec.js.snap | 4 +- .../Communities/CommunityEmptyState.spec.js | 21 + .../Communities/CommunityEmptyState.vue | 22 + .../CommunityEventSelector.spec.js | 35 ++ .../Communities/CommunityEventSelector.vue | 43 ++ components/Communities/CommunityInfo.spec.js | 34 ++ components/Communities/CommunityInfo.vue | 56 +++ .../CommunityEmptyState.spec.js.snap | 15 + components/Landing/FeatureTeaser.vue | 18 +- components/Landing/HeroNumbers.spec.js | 2 +- components/Landing/HeroNumbers.vue | 31 +- .../__snapshots__/FeatureTeaser.spec.js.snap | 15 +- .../__snapshots__/HeroNumbers.spec.js.snap | 28 +- components/Molecules/MarkedWrapper.spec.js | 30 ++ components/Molecules/MarkedWrapper.vue | 76 +++ .../__snapshots__/MarkedWrapper.spec.js.snap | 155 +++++++ jest.config.js | 1 + nuxt.config.js | 9 +- package-lock.json | 41 ++ package.json | 3 + pages/benchmarking/_community/events.vue | 7 +- pages/benchmarking/_community/index.vue | 100 +--- pages/benchmarking/index.spec.js | 2 + pages/benchmarking/index.vue | 1 + pages/projects/_project/index.spec.js | 62 +++ pages/projects/_project/index.vue | 96 ++++ pages/projects/index.spec.js | 42 ++ pages/projects/index.vue | 100 ++++ static/images/illustrations/chart-person.png | Bin 51660 -> 0 bytes static/images/illustrations/empty-state.svg | 114 +++++ static/images/illustrations/lab-person.png | Bin 65910 -> 0 bytes static/markdown/projects/OEBC009.md | 438 ++++++++++++++++++ static/markdown/projects/sample.md | 140 ++++++ store/communities.js | 11 +- .../Molecules/CommunityComponents.stories.js | 31 ++ stories/Molecules/LandingParts.stories.js | 6 + test/unit/mockData/Community.js | 10 + 41 files changed, 1707 insertions(+), 114 deletions(-) create mode 100644 components/Communities/CommunityEmptyState.spec.js create mode 100644 components/Communities/CommunityEmptyState.vue create mode 100644 components/Communities/CommunityEventSelector.spec.js create mode 100644 components/Communities/CommunityEventSelector.vue create mode 100644 components/Communities/CommunityInfo.spec.js create mode 100644 components/Communities/CommunityInfo.vue create mode 100644 components/Communities/__snapshots__/CommunityEmptyState.spec.js.snap create mode 100644 components/Molecules/MarkedWrapper.spec.js create mode 100644 components/Molecules/MarkedWrapper.vue create mode 100644 components/Molecules/__snapshots__/MarkedWrapper.spec.js.snap create mode 100644 pages/projects/_project/index.spec.js create mode 100644 pages/projects/_project/index.vue create mode 100644 pages/projects/index.spec.js create mode 100644 pages/projects/index.vue delete mode 100644 static/images/illustrations/chart-person.png create mode 100644 static/images/illustrations/empty-state.svg delete mode 100644 static/images/illustrations/lab-person.png create mode 100644 static/markdown/projects/OEBC009.md create mode 100644 static/markdown/projects/sample.md create mode 100644 stories/Molecules/CommunityComponents.stories.js diff --git a/.prettierrc.js b/.prettierrc.js index b6863ce3..c3daf7c6 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -3,7 +3,7 @@ const prettierConfig = { useTabs: true, // we are using tabs! http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/ trailingComma: 'es5', bracketSpacing: true, - jsxBracketSameLine: false, + bracketSameLine: false, arrowParens: 'always', proseWrap: 'never', htmlWhitespaceSensitivity: 'css', diff --git a/.storybook/main.js b/.storybook/main.js index 81648ee8..968593e1 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -13,7 +13,6 @@ module.exports = { use: ['style-loader', 'css-loader', 'sass-loader'], include: path.resolve(__dirname, '../'), }); - let rule = config.module.rules.find( (r) => // it can be another rule with file loader diff --git a/components/Cards/CommunityCard.spec.js b/components/Cards/CommunityCard.spec.js index 4349c1c7..12b3ebac 100644 --- a/components/Cards/CommunityCard.spec.js +++ b/components/Cards/CommunityCard.spec.js @@ -19,12 +19,18 @@ describe('CommunityCard', () => { }); it('should match snapshot for active community', () => { - const wrapper = factory(MockCommunity, { status: 'active' }); + const wrapper = factory(MockCommunity, { + to: '/benchmarking/' + MockCommunity._id, + status: 'active', + }); expect(wrapper.html()).toMatchSnapshot(); }); it('should match snapshot for incubating community', () => { - const wrapper = factory(MockCommunity, { status: 'incubating' }); + const wrapper = factory(MockCommunity, { + to: '/benchmarking/' + MockCommunity._id, + status: 'incubating', + }); expect(wrapper.html()).toMatchSnapshot(); }); }); diff --git a/components/Cards/CommunityCard.vue b/components/Cards/CommunityCard.vue index 0df9ce07..340d3f72 100644 --- a/components/Cards/CommunityCard.vue +++ b/components/Cards/CommunityCard.vue @@ -42,7 +42,7 @@ Current Event - +