Matt Rider
2af4151918
Update to use <client-only> instead of <no-ssr>
2019-08-26 17:09:24 +02:00
roschaefer
8b31cefebe
If this commit fixes the build, docs are broken
...
The latest commit has some cypress tests failing when only a few posts
are visible on the index page. If this explicit default fixes the tests,
the documentation cannot be quite right in saying that it's the default.
FYI: @mattwr18
2019-08-26 16:58:11 +02:00
roschaefer
194665bf2e
Remove explicit default, see if cypress tests fail
2019-08-26 13:56:32 +02:00
roschaefer
c9b5f8e8d3
Fix infinite-loading infinitely loading
2019-08-26 13:39:01 +02:00
roschaefer
894a59ecc7
Fix flickering create-button
2019-08-23 20:05:08 +02:00
Wolfgang Huß
a10e2e3a9b
Make user profile follow(ed) lists exceeds 5 users and X more better translatable
...
Slite adjustment of `more` to `more …`
2019-08-23 14:37:52 +02:00
Alina Beck
b74c47a265
Merge branch 'master' into add-masonry-grid
2019-08-19 15:05:54 +01:00
Alina Beck
52c3a15be1
use masonry grid on user profile
2019-08-19 12:01:43 +01:00
mattwr18
90fa70e83d
Merge pull request #1282 from Human-Connection/count_from_0_to_0_by_default
...
Get rid of property warnings
2019-08-19 10:06:09 +02:00
roschaefer
aa52587f83
Get rid of property warnings
...
If we always choose `0` as the default value for `endVal` in case it is
not given (maybe apollo assigns null when the request is in flight) then
just make `0` the default.
2019-08-16 17:08:00 +02:00
Matt Rider
fdc0d808f6
Fix search query
2019-08-16 14:18:18 +02:00
Matt Rider
d511d6aa78
Refactor graphql queries
...
- Remove duplicate queries
- Use smart query in pages/post/_id/_slug/index.vue to avoid multiple db requests for a post and its comments.
We cannot update the apollo cache with asyncData and smart queries have a prefetch policy set to true by default, which
means that they will resolve in a similar timeframe. https://stackoverflow.com/questions/55885337/in-nuxt-should-i-use-asyncdata-or-default-apollo-queries
https://vue-apollo.netlify.com/api/smart-query.html#options
https://vue-apollo.netlify.com/guide/ssr.html#vue-cli-plugin
2019-08-16 11:25:53 +02:00
Robert Schäfer
f5c939472b
Fix console.errors in frontend tests
...
@MoldaB here's how you can register plugins in a frontend test. Pro tip:
You can run `yarn run test --run-in-band` to find out where the
console.errors come from. Jest, by default, runs in parallel which makes
it a little difficult to debug errors that don't fail the test.
2019-08-15 11:08:42 +02:00
molda
7cd3b0d524
implemented infinite-scroll in profile page
2019-08-15 11:08:42 +02:00
roschaefer
717147bd0c
Refetch posts list if you block a user
...
Because you won't see any posts of a blocked user
2019-08-13 16:06:10 +02:00
Robert Schäfer
7f509b3201
Implement block/unbock UI
2019-08-13 11:05:29 +02:00
Matt Rider
8d7c55c97d
Use a link's username, open separate window on click
2019-08-01 07:34:52 +02:00
Robert Schäfer
2736738c36
Fix @Tirokk 's suggestions
...
Wow @Tirokk that was a good catch! I thought that the emitting side
knows the `index`, but no, it only emits `removePostFromList` and that's
it. In order to delete the right post, we have to pass in the `index`
ourselves. So, the caller of the function is the page component itself.
I didn't see the error myself, because in Javascript if you parse
`undefined` or `null` as Integer, you get 0 and it does not raise an
error.
2019-07-15 18:26:23 +02:00
Robert Schäfer
585e798dc0
Fix #822 by updating the counts of the user
...
The load more button depends on the total of the posts available.
Removing posts changes the total counts, so we have to manually update
it.
2019-07-13 23:57:14 +02:00
Matt Rider
7d9e6623ea
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 759-teaser-image-create-posts
2019-06-20 12:28:26 -03:00
Wolfgang Huß
68dcbacaff
Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 734-authorization-problem-disabling-post
...
# Conflicts:
# webapp/components/ContributionForm/index.vue
# webapp/graphql/PostMutations.js
2019-06-14 19:02:33 +02:00
Wolfgang Huß
0b0fd6e825
Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 734-authorization-problem-disabling-post
...
# Conflicts:
# webapp/pages/post/_id/_slug/index.vue
# webapp/pages/profile/_id/_slug.vue
2019-06-14 18:56:02 +02:00
mattwr18
dd627535e4
Merge pull request #795 from Human-Connection/781-language-of-contribution
...
Create Posts with a specified language, or fallback
2019-06-14 13:53:22 -03:00
Matt Rider
1c10e0863f
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 781-language-of-contribution
2019-06-14 13:31:39 -03:00
Matt Rider
664a8b327f
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 404-delete-user-account-and-data
2019-06-14 11:37:45 -03:00
Wolfgang Huß
58b36372b9
Merge remote-tracking branch 'origin/master' into 734-authorization-problem-disabling-post
...
# Conflicts:
# webapp/pages/profile/_id/_slug.spec.js
Defined missing `$filter.truncate` which made console errors in the webapp Jest test.
2019-06-14 11:11:22 +02:00
Matt Rider
306da8a4e3
Revert _slug.vue to master
2019-06-13 16:05:20 -03:00
Matt Rider
3c3db87c1b
Add back deleted translations
...
- mistakenly deleted when working through merge conflict
2019-06-13 15:34:45 -03:00
Wolfgang Huß
482ac1572b
Refactored and created the tests of DeletePostCallback
...
Created a folder `utils` for PostHelpers.js.
Fixed a new incoming problem of the master with deleting Posts on the User Profile.
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-06-13 19:23:13 +02:00
Robert Schäfer
b8c5db48a6
Implement prefix of image urls with a filter
...
Fix #820
Ok, so after I would have to use the same method in three different
locations (`<ds-card>` expects an `image` attribute but cannot render
entire components) I decided to implement the prefix of image urls with
a filter rather than a component. The downside of this is that we have
to add the filter on a lot of component tests. The benefit is less
components and hopefully less complexity.
2019-06-13 16:56:41 +02:00
Matt Rider
40aaa151dd
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 781-language-of-contribution
2019-06-12 16:42:40 -03:00
Matt Rider
70567857e8
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 404-delete-user-account-and-data
2019-06-12 15:51:38 -03:00
Wolfgang Huß
cd0074ec86
Merge remote-tracking branch 'origin/master' into 734-authorization-problem-disabling-post
...
# Conflicts:
# webapp/pages/profile/_id/_slug.spec.js
# webapp/pages/profile/_id/_slug.vue
2019-06-12 18:22:50 +02:00
Wolfgang Huß
1339734281
Rename DeleteModal to ConfirmModel and write some refactor some tests
...
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-06-12 18:02:50 +02:00
Wolfgang Huß
8eb089d218
Rename event deletePost to removePostFromList
...
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-06-12 15:58:23 +02:00
Wolfgang Huß
1c6016ddcc
Refactored the PostHelpers to an imported lib instead a mixin
2019-06-12 09:05:43 +02:00
Matt Rider
4407d6648a
Add component tests, translations
2019-06-11 15:47:10 -03:00
Robert Schäfer
5eaac8b077
Document loading spinner implementation with test
...
Because it's slightly odd how I avoid a duplicate loading spinner, I
thought this is a good target for a test.
2019-06-11 18:48:01 +02:00
Robert Schäfer
d1364e4aed
Merge remote-tracking branch 'origin/master' into 402-userprofil-tab-click-function
2019-06-11 17:41:17 +02:00
Matt Rider
a110a067fa
Add teaser image to contribution form
2019-06-08 14:24:55 -03:00
Robert Schäfer
15b7043d00
Write a test for "load more" button
...
The crucial test is still missing: Write a test to check that no more
than one loading spinner is visible all the time.
@Tirokk FYI I wrote a page component test and made sure that the test
will also fail if the implementation is broken.
2019-06-08 01:50:08 +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
Robert Schäfer
9384f85ebf
Use jest's expectation matchers if possible
...
@Tirokk jest has a lot of assertion matchers that will give you better
error messages than the default ones:
https://jestjs.io/docs/en/expect.html#tohavelengthnumber
2019-06-07 16:53:30 +02:00
Robert Schäfer
94ea9c9530
Fix lint
2019-06-07 13:48:59 +02:00
Robert Schäfer
7ab6ce4ed2
Fix typo in translation keys
2019-06-07 13:10:04 +02:00
Robert Schäfer
a06733fbfd
Translate network tab on the left profile page
2019-06-07 13:01:47 +02:00
Robert Schäfer
574b42a2a7
"commentedCount" is different from "commentsCount"
...
One is how many comments you wrote, one is how many **posts** are there
with at least one comment of you.
E.g. you can comment twice on the same post. You will have a
`commentedCount` increase of 1 but a `commentsCount` of 2.
FYI @ogerly @Tirokk
2019-06-07 01:39:09 +02:00
Robert Schäfer
d3a70321b8
Show a loading spinner for better UX
2019-06-07 01:39:09 +02:00
Robert Schäfer
de0bcd949a
Fix test
2019-06-07 01:39:09 +02:00
Robert Schäfer
08778f3798
Remove unnecessary refetching
...
First of all this removes a bug, but it also shows that apollo triggers
the rerendering of dependent components.
FYI @mattwr18
2019-06-07 01:38:02 +02:00