diff --git a/webapp/.babelrc b/webapp/.babelrc
index b23873e12..4538e0ac0 100644
--- a/webapp/.babelrc
+++ b/webapp/.babelrc
@@ -12,6 +12,7 @@
],
"env": {
"test": {
+ "plugins": ["require-context-hook"],
"presets": [
[
"@babel/preset-env",
@@ -24,4 +25,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/webapp/README.md b/webapp/README.md
index def0b739e..185557fc7 100644
--- a/webapp/README.md
+++ b/webapp/README.md
@@ -92,15 +92,15 @@ You can then visit the Storybook playground on `http://localhost:3002`
## Styleguide Migration
-We are currently in the process of migrating our styleguide components and design tokens from the [Nitro Styleguide](https://github.com/Human-Connection/Nitro-Styleguide) into the main [Human Connection repository](https://github.com/Human-Connection/Human-Connection) and refactoring our components in the process. During this migration, our new components will live in a `view` folder to separate them from the old, yet untouched components.
+We are currently in the process of migrating our styleguide components and design tokens from the [Nitro Styleguide](https://github.com/Human-Connection/Nitro-Styleguide) into the main [Human Connection repository](https://github.com/Human-Connection/Human-Connection) and refactoring our components in the process. During this migration, our new components will live in a `_new/` folder to separate them from the old, yet untouched components.
### Folder Structure
-The folder structure we are aiming for is based on the [directory setup proposed by Nuxt.js](https://nuxtjs.org/guide/directory-structure):
+The folder structure we are following is [prescribed by Nuxt.js](https://nuxtjs.org/guide/directory-structure):
-- **assets** contains icons, images and logos in `svg` format
-- **components** are the generic building blocks of the app – small, reusable and usually not coupled to state
-- **features** are composed of components but tied to a particular function of the app (e.g. `comment` or `post`)
+- **assets** contains icons, images and logos in `svg` format and all shared SCSS files such as `tokens`
+- **components** separated into two sub-folders:
+ - **generic** are the generic building blocks of the app – small, reusable and usually not coupled to state
+ - **features** are composed of components but tied to a particular function of the app (e.g. `comment` or `post`)
- **layouts** can use components to create layout templates for pages
- **pages** are the entry points for all `routes` in the app and are composed of layouts, features and components
-- **styles** holds all shared SCSS files such as `variables` and `mixins`
diff --git a/webapp/assets/_new/icons/index.js b/webapp/assets/_new/icons/index.js
new file mode 100644
index 000000000..daa0714f2
--- /dev/null
+++ b/webapp/assets/_new/icons/index.js
@@ -0,0 +1,13 @@
+const svgFileList = require.context('./svgs', true, /\.svg/)
+const icons = {}
+const iconNames = []
+
+svgFileList.keys().forEach(fileName => {
+ const svgCode = svgFileList(fileName)
+ const iconName = fileName.replace('./', '').replace('.svg', '')
+ icons[iconName] = svgCode
+ iconNames.push(iconName)
+})
+
+export { iconNames }
+export default icons
diff --git a/webapp/assets/_new/icons/svgs/angellist.svg b/webapp/assets/_new/icons/svgs/angellist.svg
new file mode 100755
index 000000000..34123f5f0
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/angellist.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/angle-down.svg b/webapp/assets/_new/icons/svgs/angle-down.svg
new file mode 100755
index 000000000..aa6f763c8
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/angle-down.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/arrow-down.svg b/webapp/assets/_new/icons/svgs/arrow-down.svg
new file mode 100755
index 000000000..6cee34766
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/arrow-down.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/arrow-left.svg b/webapp/assets/_new/icons/svgs/arrow-left.svg
new file mode 100755
index 000000000..f7489c43a
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/arrow-left.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/arrow-right.svg b/webapp/assets/_new/icons/svgs/arrow-right.svg
new file mode 100755
index 000000000..62d753057
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/arrow-right.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/at.svg b/webapp/assets/_new/icons/svgs/at.svg
new file mode 100755
index 000000000..e046ea75a
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/at.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/balance-scale.svg b/webapp/assets/_new/icons/svgs/balance-scale.svg
new file mode 100755
index 000000000..f5e446fd2
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/balance-scale.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/ban.svg b/webapp/assets/_new/icons/svgs/ban.svg
new file mode 100755
index 000000000..7dc338541
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/ban.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/bars.svg b/webapp/assets/_new/icons/svgs/bars.svg
new file mode 100755
index 000000000..5ea0f464d
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/bars.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/bell.svg b/webapp/assets/_new/icons/svgs/bell.svg
new file mode 100755
index 000000000..ee58c443c
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/bell.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/bold.svg b/webapp/assets/_new/icons/svgs/bold.svg
new file mode 100755
index 000000000..c3516808d
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/bold.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/bookmark.svg b/webapp/assets/_new/icons/svgs/bookmark.svg
new file mode 100755
index 000000000..bd3ff4559
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/bookmark.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/bullhorn.svg b/webapp/assets/_new/icons/svgs/bullhorn.svg
new file mode 100755
index 000000000..95e0d21d3
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/bullhorn.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/check.svg b/webapp/assets/_new/icons/svgs/check.svg
new file mode 100755
index 000000000..bf49fe01d
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/check.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/clock.svg b/webapp/assets/_new/icons/svgs/clock.svg
new file mode 100755
index 000000000..2344dd890
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/clock.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/close.svg b/webapp/assets/_new/icons/svgs/close.svg
new file mode 100755
index 000000000..48604d097
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/close.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/cogs.svg b/webapp/assets/_new/icons/svgs/cogs.svg
new file mode 100755
index 000000000..3d0104d19
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/cogs.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/comment.svg b/webapp/assets/_new/icons/svgs/comment.svg
new file mode 100755
index 000000000..fe848ec20
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/comment.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/comments.svg b/webapp/assets/_new/icons/svgs/comments.svg
new file mode 100755
index 000000000..551f10e4e
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/comments.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/edit.svg b/webapp/assets/_new/icons/svgs/edit.svg
new file mode 100755
index 000000000..a80101e6c
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/edit.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/ellipsis-v.svg b/webapp/assets/_new/icons/svgs/ellipsis-v.svg
new file mode 100755
index 000000000..89313ddfd
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/ellipsis-v.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/envelope.svg b/webapp/assets/_new/icons/svgs/envelope.svg
new file mode 100755
index 000000000..92d5320c0
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/envelope.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/exclamation-circle.svg b/webapp/assets/_new/icons/svgs/exclamation-circle.svg
new file mode 100755
index 000000000..cd658b997
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/exclamation-circle.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/eye-slash.svg b/webapp/assets/_new/icons/svgs/eye-slash.svg
new file mode 100755
index 000000000..4e434ac8d
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/eye-slash.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/eye.svg b/webapp/assets/_new/icons/svgs/eye.svg
new file mode 100755
index 000000000..1e3e8fef3
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/eye.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/file.svg b/webapp/assets/_new/icons/svgs/file.svg
new file mode 100755
index 000000000..82d36fe17
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/file.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/filter.svg b/webapp/assets/_new/icons/svgs/filter.svg
new file mode 100755
index 000000000..6e9f379b6
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/filter.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/flag.svg b/webapp/assets/_new/icons/svgs/flag.svg
new file mode 100755
index 000000000..6d2769808
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/flag.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/flash.svg b/webapp/assets/_new/icons/svgs/flash.svg
new file mode 100755
index 000000000..f3647d420
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/flash.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/globe.svg b/webapp/assets/_new/icons/svgs/globe.svg
new file mode 100755
index 000000000..91bf9bf2b
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/globe.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/graduation-cap.svg b/webapp/assets/_new/icons/svgs/graduation-cap.svg
new file mode 100755
index 000000000..5d35226d3
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/graduation-cap.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/heart-o.svg b/webapp/assets/_new/icons/svgs/heart-o.svg
new file mode 100755
index 000000000..6605b96ac
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/heart-o.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/image.svg b/webapp/assets/_new/icons/svgs/image.svg
new file mode 100755
index 000000000..efbd9131f
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/image.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/italic.svg b/webapp/assets/_new/icons/svgs/italic.svg
new file mode 100755
index 000000000..81d29483c
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/italic.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/link.svg b/webapp/assets/_new/icons/svgs/link.svg
new file mode 100755
index 000000000..624a255b1
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/link.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/list-ol.svg b/webapp/assets/_new/icons/svgs/list-ol.svg
new file mode 100755
index 000000000..f3fb101ac
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/list-ol.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/list-ul.svg b/webapp/assets/_new/icons/svgs/list-ul.svg
new file mode 100755
index 000000000..d565a8064
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/list-ul.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/lock.svg b/webapp/assets/_new/icons/svgs/lock.svg
new file mode 100755
index 000000000..31813d729
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/lock.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/map-marker.svg b/webapp/assets/_new/icons/svgs/map-marker.svg
new file mode 100755
index 000000000..af7f96727
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/map-marker.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/medkit.svg b/webapp/assets/_new/icons/svgs/medkit.svg
new file mode 100755
index 000000000..43076dc9c
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/medkit.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/minus.svg b/webapp/assets/_new/icons/svgs/minus.svg
new file mode 100755
index 000000000..b7a94beb1
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/minus.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/money.svg b/webapp/assets/_new/icons/svgs/money.svg
new file mode 100755
index 000000000..04a116d2a
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/money.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/mouse-pointer.svg b/webapp/assets/_new/icons/svgs/mouse-pointer.svg
new file mode 100755
index 000000000..2917ef518
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/mouse-pointer.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/paint-brush.svg b/webapp/assets/_new/icons/svgs/paint-brush.svg
new file mode 100755
index 000000000..03b06aac6
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/paint-brush.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/paragraph.svg b/webapp/assets/_new/icons/svgs/paragraph.svg
new file mode 100755
index 000000000..26365f984
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/paragraph.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/paw.svg b/webapp/assets/_new/icons/svgs/paw.svg
new file mode 100755
index 000000000..364ff1918
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/paw.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/plus.svg b/webapp/assets/_new/icons/svgs/plus.svg
new file mode 100755
index 000000000..66da52005
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/plus.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/question-circle.svg b/webapp/assets/_new/icons/svgs/question-circle.svg
new file mode 100755
index 000000000..1ae2bbf6b
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/question-circle.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/quote-right.svg b/webapp/assets/_new/icons/svgs/quote-right.svg
new file mode 100755
index 000000000..4e6469624
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/quote-right.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/search.svg b/webapp/assets/_new/icons/svgs/search.svg
new file mode 100755
index 000000000..ddbb4da44
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/search.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/shield.svg b/webapp/assets/_new/icons/svgs/shield.svg
new file mode 100755
index 000000000..d897203ad
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/shield.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/shopping-cart.svg b/webapp/assets/_new/icons/svgs/shopping-cart.svg
new file mode 100755
index 000000000..9ca3c5e13
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/shopping-cart.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/sign-in.svg b/webapp/assets/_new/icons/svgs/sign-in.svg
new file mode 100755
index 000000000..bb300f950
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/sign-in.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/sign-out.svg b/webapp/assets/_new/icons/svgs/sign-out.svg
new file mode 100755
index 000000000..d185fbe6f
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/sign-out.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/smile.svg b/webapp/assets/_new/icons/svgs/smile.svg
new file mode 100755
index 000000000..7de0ac746
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/smile.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/sort-amount-asc.svg b/webapp/assets/_new/icons/svgs/sort-amount-asc.svg
new file mode 100755
index 000000000..6344da1a9
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/sort-amount-asc.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/sort-amount-desc.svg b/webapp/assets/_new/icons/svgs/sort-amount-desc.svg
new file mode 100755
index 000000000..7239c1d72
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/sort-amount-desc.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/trash.svg b/webapp/assets/_new/icons/svgs/trash.svg
new file mode 100755
index 000000000..6475fd236
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/trash.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/tree.svg b/webapp/assets/_new/icons/svgs/tree.svg
new file mode 100755
index 000000000..e0534af45
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/tree.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/university.svg b/webapp/assets/_new/icons/svgs/university.svg
new file mode 100755
index 000000000..cddb5775a
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/university.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/unlink.svg b/webapp/assets/_new/icons/svgs/unlink.svg
new file mode 100755
index 000000000..f63b36e9b
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/unlink.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/user-plus.svg b/webapp/assets/_new/icons/svgs/user-plus.svg
new file mode 100755
index 000000000..dea6ab228
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/user-plus.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/user-times.svg b/webapp/assets/_new/icons/svgs/user-times.svg
new file mode 100755
index 000000000..8f4cb905a
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/user-times.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/user.svg b/webapp/assets/_new/icons/svgs/user.svg
new file mode 100755
index 000000000..04cc45b41
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/user.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/users.svg b/webapp/assets/_new/icons/svgs/users.svg
new file mode 100755
index 000000000..7572021ba
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/users.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/assets/_new/icons/svgs/warning.svg b/webapp/assets/_new/icons/svgs/warning.svg
new file mode 100755
index 000000000..cd0a7baed
--- /dev/null
+++ b/webapp/assets/_new/icons/svgs/warning.svg
@@ -0,0 +1,5 @@
+
+
diff --git a/webapp/view/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss
similarity index 100%
rename from webapp/view/styles/tokens.scss
rename to webapp/assets/_new/styles/tokens.scss
diff --git a/webapp/assets/styles/main.scss b/webapp/assets/styles/main.scss
index 5c4964688..b59399b02 100644
--- a/webapp/assets/styles/main.scss
+++ b/webapp/assets/styles/main.scss
@@ -160,7 +160,7 @@ hr {
align-content: center;
align-items: center;
- .ds-icon {
+ .base-icon {
padding-right: $space-xx-small;
}
}
diff --git a/webapp/components/Avatar/Avatar.spec.js b/webapp/components/Avatar/Avatar.spec.js
index 626e584c9..03eaee160 100644
--- a/webapp/components/Avatar/Avatar.spec.js
+++ b/webapp/components/Avatar/Avatar.spec.js
@@ -1,11 +1,7 @@
-import { mount, createLocalVue } from '@vue/test-utils'
-import Styleguide from '@human-connection/styleguide'
+import { mount } from '@vue/test-utils'
import Avatar from './Avatar.vue'
-import Filters from '~/plugins/vue-filters'
-const localVue = createLocalVue()
-localVue.use(Styleguide)
-localVue.use(Filters)
+const localVue = global.localVue
describe('Avatar.vue', () => {
let propsData = {}
@@ -22,6 +18,7 @@ describe('Avatar.vue', () => {
).toBe(false)
})
+ // this is testing the style guide
it('renders an icon', () => {
expect(
Wrapper()
diff --git a/webapp/components/AvatarMenu/AvatarMenu.spec.js b/webapp/components/AvatarMenu/AvatarMenu.spec.js
index 6327ded0a..519b61d00 100644
--- a/webapp/components/AvatarMenu/AvatarMenu.spec.js
+++ b/webapp/components/AvatarMenu/AvatarMenu.spec.js
@@ -1,15 +1,8 @@
-import { config, mount, createLocalVue } from '@vue/test-utils'
+import { config, mount } from '@vue/test-utils'
import Vuex from 'vuex'
-import VTooltip from 'v-tooltip'
-import Styleguide from '@human-connection/styleguide'
import AvatarMenu from './AvatarMenu.vue'
-import Filters from '~/plugins/vue-filters'
-const localVue = createLocalVue()
-localVue.use(Styleguide)
-localVue.use(Vuex)
-localVue.use(Filters)
-localVue.use(VTooltip)
+const localVue = global.localVue
config.stubs['nuxt-link'] = ''
config.stubs['router-link'] = ''
diff --git a/webapp/components/AvatarMenu/AvatarMenu.vue b/webapp/components/AvatarMenu/AvatarMenu.vue
index 7443c91a7..54426852e 100644
--- a/webapp/components/AvatarMenu/AvatarMenu.vue
+++ b/webapp/components/AvatarMenu/AvatarMenu.vue
@@ -12,7 +12,7 @@
@click.prevent="toggleMenu"
>
-
+
@@ -33,13 +33,13 @@
:parents="item.parents"
@click.native="closeMenu(false)"
>
-
+
{{ item.route.name }}
-
+
{{ $t('login.logout') }}
diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.spec.js b/webapp/components/CategoriesSelect/CategoriesSelect.spec.js
index 56534c6ad..b633e5811 100644
--- a/webapp/components/CategoriesSelect/CategoriesSelect.spec.js
+++ b/webapp/components/CategoriesSelect/CategoriesSelect.spec.js
@@ -1,9 +1,7 @@
-import { mount, createLocalVue } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import CategoriesSelect from './CategoriesSelect'
-import Styleguide from '@human-connection/styleguide'
-const localVue = createLocalVue()
-localVue.use(Styleguide)
+const localVue = global.localVue
describe('CategoriesSelect.vue', () => {
let wrapper
diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue
index 1fdb3ce0a..493256546 100644
--- a/webapp/components/CategoriesSelect/CategoriesSelect.vue
+++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue
@@ -10,7 +10,7 @@
:primary="isActive(category.id)"
:disabled="isDisabled(category.id)"
>
-
+
{{ $t(`contribution.category.name.${category.slug}`) }}
diff --git a/webapp/components/Category/index.spec.js b/webapp/components/Category/index.spec.js
index 13de0b690..9abb8a11d 100644
--- a/webapp/components/Category/index.spec.js
+++ b/webapp/components/Category/index.spec.js
@@ -1,9 +1,8 @@
-import { shallowMount, createLocalVue } from '@vue/test-utils'
-import Styleguide from '@human-connection/styleguide'
+import { shallowMount } from '@vue/test-utils'
+
import Category from './index'
-const localVue = createLocalVue()
-localVue.use(Styleguide)
+const localVue = global.localVue
describe('Category', () => {
let icon
@@ -21,7 +20,7 @@ describe('Category', () => {
describe('given Strings for Icon and Name', () => {
beforeEach(() => {
- icon = 'mouse-cursor'
+ icon = 'mouse-pointer'
name = 'Peter'
})
diff --git a/webapp/components/Category/index.vue b/webapp/components/Category/index.vue
index acc35772a..a6410d750 100644
--- a/webapp/components/Category/index.vue
+++ b/webapp/components/Category/index.vue
@@ -1,6 +1,6 @@
-
-
+
+
{{ name }}
@@ -14,3 +14,15 @@ export default {
},
}
+
+
diff --git a/webapp/components/Comment/Comment.spec.js b/webapp/components/Comment/Comment.spec.js
index 59e3f6c5a..b307700d9 100644
--- a/webapp/components/Comment/Comment.spec.js
+++ b/webapp/components/Comment/Comment.spec.js
@@ -1,12 +1,8 @@
-import { config, shallowMount, createLocalVue } from '@vue/test-utils'
+import { config, shallowMount } from '@vue/test-utils'
import Comment from './Comment.vue'
import Vuex from 'vuex'
-import Styleguide from '@human-connection/styleguide'
-const localVue = createLocalVue()
-
-localVue.use(Vuex)
-localVue.use(Styleguide)
+const localVue = global.localVue
config.stubs['client-only'] = ''
diff --git a/webapp/components/Comment/Comment.vue b/webapp/components/Comment/Comment.vue
index 2da0df5fa..06816e5bf 100644
--- a/webapp/components/Comment/Comment.vue
+++ b/webapp/components/Comment/Comment.vue
@@ -3,7 +3,7 @@
-
+
{{ this.$t('comment.content.unavailable-placeholder') }}
diff --git a/webapp/components/CommentForm/CommentForm.spec.js b/webapp/components/CommentForm/CommentForm.spec.js
index 94ce5aa66..47bc01982 100644
--- a/webapp/components/CommentForm/CommentForm.spec.js
+++ b/webapp/components/CommentForm/CommentForm.spec.js
@@ -1,12 +1,11 @@
-import { mount, createLocalVue } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import CommentForm from './CommentForm'
-import Styleguide from '@human-connection/styleguide'
+
import MutationObserver from 'mutation-observer'
global.MutationObserver = MutationObserver
-const localVue = createLocalVue()
-localVue.use(Styleguide)
+const localVue = global.localVue
describe('CommentForm.vue', () => {
let mocks
diff --git a/webapp/components/CommentList/CommentList.spec.js b/webapp/components/CommentList/CommentList.spec.js
index 3287b7cd4..0c037d2ff 100644
--- a/webapp/components/CommentList/CommentList.spec.js
+++ b/webapp/components/CommentList/CommentList.spec.js
@@ -1,14 +1,9 @@
-import { config, mount, createLocalVue } from '@vue/test-utils'
+import { config, mount } from '@vue/test-utils'
import CommentList from './CommentList'
import Vuex from 'vuex'
-import Styleguide from '@human-connection/styleguide'
-import Filters from '~/plugins/vue-filters'
-const localVue = createLocalVue()
+const localVue = global.localVue
-localVue.use(Styleguide)
-localVue.use(Vuex)
-localVue.use(Filters)
localVue.filter('truncate', string => string)
config.stubs['v-popover'] = ''
diff --git a/webapp/components/CommentList/CommentList.vue b/webapp/components/CommentList/CommentList.vue
index df008e9ee..888c167e9 100644
--- a/webapp/components/CommentList/CommentList.vue
+++ b/webapp/components/CommentList/CommentList.vue
@@ -2,7 +2,7 @@
-
+
-
+
@@ -16,7 +16,7 @@
:parents="item.parents"
@click.stop.prevent="openItem(item.route, toggleMenu)"
>
-
+
{{ item.route.name }}
diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js
index 52f77b3f2..3ec538bde 100644
--- a/webapp/components/ContributionForm/ContributionForm.spec.js
+++ b/webapp/components/ContributionForm/ContributionForm.spec.js
@@ -1,20 +1,16 @@
-import { config, mount, createLocalVue } from '@vue/test-utils'
+import { config, mount } from '@vue/test-utils'
import ContributionForm from './ContributionForm.vue'
-import Styleguide from '@human-connection/styleguide'
+
import Vuex from 'vuex'
import PostMutations from '~/graphql/PostMutations.js'
import CategoriesSelect from '~/components/CategoriesSelect/CategoriesSelect'
-import Filters from '~/plugins/vue-filters'
+
import TeaserImage from '~/components/TeaserImage/TeaserImage'
import MutationObserver from 'mutation-observer'
global.MutationObserver = MutationObserver
-const localVue = createLocalVue()
-
-localVue.use(Vuex)
-localVue.use(Styleguide)
-localVue.use(Filters)
+const localVue = global.localVue
config.stubs['client-only'] = ' '
config.stubs['nuxt-link'] = ' '
diff --git a/webapp/components/DeleteData/DeleteData.spec.js b/webapp/components/DeleteData/DeleteData.spec.js
index 73ca985fa..abcdf9101 100644
--- a/webapp/components/DeleteData/DeleteData.spec.js
+++ b/webapp/components/DeleteData/DeleteData.spec.js
@@ -1,12 +1,9 @@
-import { mount, createLocalVue } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import DeleteData from './DeleteData.vue'
-import Styleguide from '@human-connection/styleguide'
+
import Vuex from 'vuex'
-const localVue = createLocalVue()
-
-localVue.use(Vuex)
-localVue.use(Styleguide)
+const localVue = global.localVue
describe('DeleteData.vue', () => {
let mocks
diff --git a/webapp/components/DeleteData/DeleteData.vue b/webapp/components/DeleteData/DeleteData.vue
index 451a44eb4..045d00f26 100644
--- a/webapp/components/DeleteData/DeleteData.vue
+++ b/webapp/components/DeleteData/DeleteData.vue
@@ -5,7 +5,7 @@
-
+
{{ $t('settings.deleteUserAccount.name') }}
@@ -134,6 +134,7 @@ export default {
diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js
index eb628c7d6..0d61302ff 100644
--- a/webapp/nuxt.config.js
+++ b/webapp/nuxt.config.js
@@ -100,13 +100,14 @@ export default {
** Global processed styles
*/
styleResources: {
- scss: [styleguideStyles, '~view/styles/tokens.scss'],
+ scss: [styleguideStyles, '~assets/_new/styles/tokens.scss'],
},
/*
** Plugins to load before mounting the App
*/
plugins: [
+ { src: '~/plugins/base-components.js', ssr: true },
{
src: `~/plugins/styleguide${process.env.STYLEGUIDE_DEV ? '-dev' : ''}.js`,
ssr: true,
diff --git a/webapp/package.json b/webapp/package.json
index 4af522143..a4322aebd 100644
--- a/webapp/package.json
+++ b/webapp/package.json
@@ -45,8 +45,13 @@
"moduleNameMapper": {
"^@/(.*)$": "/src/$1",
"^~/(.*)$": "/$1",
- "\\.(css|less)$": "identity-obj-proxy"
+ "\\.(css|less)$": "identity-obj-proxy",
+ "\\.(svg)$": "/test/fileMock.js"
},
+ "setupFiles": [
+ "/test/registerContext.js",
+ "/test/testSetup.js"
+ ],
"testMatch": [
"**/?(*.)+(spec|test).js?(x)"
]
@@ -108,6 +113,7 @@
"babel-eslint": "~10.0.3",
"babel-jest": "~24.9.0",
"babel-loader": "~8.0.6",
+ "babel-plugin-require-context-hook": "^1.0.0",
"babel-preset-vue": "~2.0.2",
"core-js": "~2.6.10",
"css-loader": "~3.2.0",
diff --git a/webapp/pages/admin/categories.vue b/webapp/pages/admin/categories.vue
index 23aa4d606..c72506e64 100644
--- a/webapp/pages/admin/categories.vue
+++ b/webapp/pages/admin/categories.vue
@@ -2,7 +2,7 @@
-
+
diff --git a/webapp/pages/admin/index.spec.js b/webapp/pages/admin/index.spec.js
index 68256aa9d..35e8ba212 100644
--- a/webapp/pages/admin/index.spec.js
+++ b/webapp/pages/admin/index.spec.js
@@ -1,11 +1,10 @@
-import { mount, createLocalVue } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import AdminIndexPage from './index.vue'
-import Styleguide from '@human-connection/styleguide'
+
import VueApollo from 'vue-apollo'
-const localVue = createLocalVue()
+const localVue = global.localVue
-localVue.use(Styleguide)
localVue.use(VueApollo)
describe('admin/index.vue', () => {
diff --git a/webapp/pages/admin/users.spec.js b/webapp/pages/admin/users.spec.js
index f477aab1d..37d155b92 100644
--- a/webapp/pages/admin/users.spec.js
+++ b/webapp/pages/admin/users.spec.js
@@ -1,10 +1,7 @@
-import { mount, createLocalVue } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import Users from './users.vue'
-import Styleguide from '@human-connection/styleguide'
-const localVue = createLocalVue()
-
-localVue.use(Styleguide)
+const localVue = global.localVue
describe('Users', () => {
let wrapper
diff --git a/webapp/pages/index.spec.js b/webapp/pages/index.spec.js
index 73e88d972..d5d677af1 100644
--- a/webapp/pages/index.spec.js
+++ b/webapp/pages/index.spec.js
@@ -1,19 +1,9 @@
-import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils'
+import { config, shallowMount, mount } from '@vue/test-utils'
import PostIndex from './index.vue'
import Vuex from 'vuex'
-import Styleguide from '@human-connection/styleguide'
-import Filters from '~/plugins/vue-filters'
-import VTooltip from 'v-tooltip'
import FilterMenu from '~/components/FilterMenu/FilterMenu'
-import InfiniteLoading from '~/plugins/vue-infinite-loading'
-const localVue = createLocalVue()
-
-localVue.use(Vuex)
-localVue.use(Styleguide)
-localVue.use(Filters)
-localVue.use(VTooltip)
-localVue.use(InfiniteLoading)
+const localVue = global.localVue
config.stubs['client-only'] = ' '
config.stubs['router-link'] = ' '
diff --git a/webapp/pages/moderation/index.vue b/webapp/pages/moderation/index.vue
index f5dd06a57..57c7ccab4 100644
--- a/webapp/pages/moderation/index.vue
+++ b/webapp/pages/moderation/index.vue
@@ -5,17 +5,17 @@
-
-
- '
diff --git a/webapp/pages/post/_id/_slug/index.spec.js b/webapp/pages/post/_id/_slug/index.spec.js
index b5827db8d..db960bb67 100644
--- a/webapp/pages/post/_id/_slug/index.spec.js
+++ b/webapp/pages/post/_id/_slug/index.spec.js
@@ -1,14 +1,8 @@
-import { config, shallowMount, createLocalVue } from '@vue/test-utils'
+import { config, shallowMount } from '@vue/test-utils'
import PostSlug from './index.vue'
import Vuex from 'vuex'
-import Styleguide from '@human-connection/styleguide'
-import Filters from '~/plugins/vue-filters'
-const localVue = createLocalVue()
-
-localVue.use(Vuex)
-localVue.use(Styleguide)
-localVue.use(Filters)
+const localVue = global.localVue
config.stubs['client-only'] = ' '
diff --git a/webapp/pages/post/_id/_slug/more-info.vue b/webapp/pages/post/_id/_slug/more-info.vue
index dae3021aa..fa690c354 100644
--- a/webapp/pages/post/_id/_slug/more-info.vue
+++ b/webapp/pages/post/_id/_slug/more-info.vue
@@ -3,10 +3,7 @@
{{ $t('post.moreInfo.title') }}
{{ $t('post.moreInfo.description') }}
- - {{ $t('post.moreInfo.titleOfCategoriesSection') }} -
+{{ $t('post.moreInfo.titleOfCategoriesSection') }}