roschaefer
08e73747bd
refactor: set global defaults of vue-scrollto
2019-10-01 17:51:16 +02:00
roschaefer
db1bcdd3d2
refactor: register vue-scrollto in nuxt.config.js
...
This will allow us to use this.$scrollTo in components. I'm now also
using this in the mixin. With so many `this`s it gets horribly
difficult to properly test the mixin in isolation. So I decided to test
the mixin on the component directly.
2019-10-01 17:25:28 +02:00
roschaefer
9da40c4895
fix: avoid many scrollTo calls for n components
...
Thank you @vbelolapotkov for pointing out the flaws here:
https://github.com/Human-Connection/Human-Connection/pull/1756#discussion_r329361572
So here is my attempt to fix it:
* Install `vue-scrollto` which relies on `requestAnimationFrame`
- apparently this is better on Safari and IE? 🤔
- Mocking out entire modules is easier in jest:
https://jestjs.io/docs/en/bypassing-module-mocks
* Require `checkAnchor` to be implemented on the component
2019-10-01 11:55:18 +02:00
roschaefer
57598df228
refactor: re-use @vbelolapotkov's solution
...
If we make this a mixin, we can re-use the same solution for e.g. the
comment. If sb. notifies you, the browser automatically scrolls to the
comment in which you have been mentioned.
2019-09-29 14:28:38 +02:00
Wolfgang Huß
1c6016ddcc
Refactored the PostHelpers to an imported lib instead a mixin
2019-06-12 09:05:43 +02:00
Wolfgang Huß
b2e1873ade
Refactored to modalData for Delete Comment and Posts
...
The error is gone with this.
2019-06-07 18:04:12 +02:00
Wolfgang Huß
3e3e447bc5
Refactored three quater of the tests
2019-05-29 17:59:07 +02:00
Wolfgang Huß
19771a342e
First approach to test '_slug.spec.js'
2019-05-29 12:19:51 +02:00
Wolfgang Huß
f9fe4f742f
Lint fixes
2019-05-27 12:39:37 +02:00
Wolfgang Huß
68980f85c6
Merge remote-tracking branch 'origin/master' into 553-delete-comment
...
# Conflicts:
# webapp/components/Comment.vue
# webapp/components/ContentMenu.vue
# webapp/components/Modal/DeleteModal.spec.js
# webapp/components/Modal/DeleteModal.vue
# webapp/components/Modal/DisableModal.spec.js
# webapp/components/Modal/DisableModal.vue
# webapp/components/Modal/ReportModal.spec.js
# webapp/components/Modal/ReportModal.vue
# webapp/components/PostCard/index.vue
# webapp/components/comments/CommentList/index.vue
# webapp/locales/de.json
# webapp/pages/index.vue
# webapp/pages/profile/_id/_slug.vue
2019-05-27 12:34:59 +02:00
5202763dd8
frontend lint fixes
2019-05-23 19:40:39 +02:00
Wolfgang Huß
8bcb250951
Started to rewrite the tests of DeleteModal.vue
2019-05-23 10:22:36 +02:00
Wolfgang Huß
7e922fa0b0
Got the go to Index Page to work on Post Page deletion
2019-05-20 07:00:33 +02:00
Wolfgang Huß
f5d9bc9ae4
First proof of functionality for Delete Comment and Post via DeleteModal
2019-05-19 12:54:25 +02:00
Wolfgang Huß
7f83f775a7
Clean up the delete-menu stuff for Comments and Posts
2019-05-19 08:23:51 +02:00
Wolfgang Huß
2016a9445b
Rename confirm callbacks
2019-05-19 07:42:55 +02:00
Wolfgang Huß
388e9ff6b2
Go ahead with refactoring of DeleteModal in Comments and Posts
2019-05-18 15:56:07 +02:00
Wolfgang Huß
9af8c2b46c
Refactored handling of DeleteModal in Comments and Posts
2019-05-18 12:58:51 +02:00
Robert Schäfer
055b79bfe2
RemoveLinks is better suited as a filter
...
Unfortunately with `v-html` you cannot use filters directly in
handlebars.
See: https://github.com/nuxt/nuxt.js/issues/231
I also fixed the tests even **without** mocking vue-filters.js plugin 👍
2019-04-17 01:54:53 +02:00
Robert Schäfer
c4577aa3e8
Move mixins to the right place
2019-04-17 00:08:39 +02:00
Robert Schäfer
4f2e70e871
Refactor and harden PostCard component
2019-04-17 00:08:21 +02:00
Robert Schäfer
76dfd08c82
Follow @mattwr18's review
...
https://github.com/Human-Connection/Human-Connection/pull/248#pullrequestreview-219203465
2019-03-27 00:18:26 +01:00
Robert Schäfer
88ac0601f7
DRY: persistentLink implementation
2019-03-26 23:52:01 +01:00