360 Commits

Author SHA1 Message Date
roschaefer
e4d57f80aa Fix #1333
Ok, so here are multiple issues:
1. In cypher, `NOT NULL` will return `NULL` not `FALSE`. If we want
`FALSE` to be set in the database import, we should use `COAELESCE`
to find the first not-null value.
See:
https://neo4j.com/docs/cypher-manual/current/syntax/working-with-null/
https://markhneedham.com/blog/2017/02/22/neo4j-null-values-even-work/

2. I removed the `disabled` and `deleted` checks on the commented
counter. With `neo4j-graphql-js` it is not possible to filter on the
join models (at least not without a lot of complexity) for disabled or
deleted items. Let's live with the fact that the list of commented posts
will include those posts, where the user has deleted his comment or where
the user's comment was disabled. It's being displayed as "not available"
so I think this is OK for now.

3. De-couple the pagination counters from the "commented", "shouted"
etc. counters. It might be that the list of posts is different for
different users. E.g. if the user has blocked you, the "posts" list
will be empty. The "shouted" or "commented" list will not have the
posts of the author. If you are a moderator, the list will include
disabled posts. So the counters are not in sync with the actual list
coming from the backend. Therefore I implemented "fetch and check if
resultSet < pageSize" instead of a global counter.
2019-08-28 12:57:32 +02:00
Matt Rider
6976336ef0 Merge branch 'master' of github.com:Human-Connection/Human-Connection into fix-deprecation-warnings 2019-08-27 09:20:27 +02:00
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
Wolfgang Huß
66612801ce Change text of invite form 2019-08-23 13:35:22 +02:00
roschaefer
6e2ef65b99 Visual feedback if filters lead to 0 results
This is one of the bugs/improvements suggested by @ulfgebhardt.
2019-08-22 00:26:59 +02:00
Robert Schäfer
deb0fcabd4
Merge pull request #1268 from Human-Connection/post-needs-to-have-category#1222
Validate that a post cannot be created without categories/too many categories
2019-08-21 16:28:32 +02:00
mattwr18
8aa8be3152
Merge pull request #1314 from Human-Connection/1308-fix_broken_graphql_query
Fix #1308
2019-08-21 09:34:50 +02:00
roschaefer
ca24747550 Fix #1308 2019-08-20 23:53:10 +02:00
Matt Rider
8735045d11 Update cypress tests, post query 2019-08-20 20:13:29 +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
Alina Beck
b0de4ec2b5 move calculation from grid to grid item 2019-08-19 10:16:44 +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
Robert Schäfer
87461c21ca
Merge pull request #1280 from Human-Connection/refactor-graphql-queries
Refactor graphql queries
2019-08-19 09:58:38 +02:00
Alina Beck
76be960c03 move grid calculations to masonry grid components 2019-08-18 18:25:14 +01: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
mattwr18
90e5579cab
Merge pull request #1278 from Human-Connection/fix_hashtag_db_import
Fix hashtag db import
2019-08-16 14:37:09 +02:00
Matt Rider
fdc0d808f6 Fix search query 2019-08-16 14:18:18 +02:00
Matt Rider
dbaa8e687f Fix vue warnings, fix tests, refactor
- was throwing an error when trying to update commentsCount because of new implementation by @roschaefer which uses countResolver, but there was no related for commentsCount, it was r... also commentsCount is no longer needed anywhere in the code base, it is commentedCount now
2019-08-16 13:28:55 +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
roschaefer
51b734275a The name of the hashtag is now it's ID
`name` was just a redundant attribute
2019-08-16 01:49:29 +02:00
roschaefer
3d4724e314 Fix Cannot read property countUser of null
This commit message is a great example of why you should explain
**the reason** of your commit.

When I came across this bug I had a quick look into the code where it
came from. I could see that the bug only happened after a timer and
apparently reverting the biggest part of d84892930295dcfd3f6687fc33c7234446127099
would fix the bug. However I have no idea what the following commit
message means:

```
commit d84892930295dcfd3f6687fc33c7234446127099
Author: Grzegorz Leoniec <greg@app-interactive.de>
Date:   Wed Mar 6 18:45:57 2019 +0100

    Improved countTo component
```

I just don't know why the code is there - like what is it's purpose
@appinteractive? I can only guess: I believe that it's supposed to
update the counters in-place (without starting from 0 everytime).
Because apollo was set to poll the data every second.

Taking that into account I would rather remove this polling feature
completely and have less code and less complexity. Admins can still
refresh the page.
2019-08-16 00:28:13 +02:00
Alina Beck
b05599de83 fix item height calculation 2019-08-15 21:44:22 +01:00
Alina Beck
da8491a559 style filter menu grid item 2019-08-15 21:29:37 +01:00
Alina Beck
8ad1ad3769 look at this new and shiny grid component 2019-08-15 21:06:26 +01:00
roschaefer
67bd1184aa Fine tune throttle delay 2019-08-15 17:09:08 +02:00
roschaefer
a052743e8b Bind infinite-scroll-* correctly 2019-08-15 11:39:09 +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
molda
2edf26ac0a implemented infinite-scroll to index page 2019-08-15 11:08:42 +02:00
Alina Beck
38100b2df7 add masonry grid 2019-08-15 11:04:30 +02:00
mattwr18
ab6cd501fe
Merge pull request #1209 from Human-Connection/1054-blocked-users
🍰 1054 blocked users
2019-08-14 16:36:41 +02:00
roschaefer
31299235a3 Better caching policy on the blocked users page
Read: https://medium.com/@galen.corey/understanding-apollo-fetch-policies-705b5ad71980
for the difference. I think it's exactly what we need to update the
blocked users as soon as we switch to the page.
2019-08-14 00:11:45 +02:00
roschaefer
6b884d84c1 Add translations 2019-08-13 19:56:01 +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
bc4bffdc52 Add How-To for blocking a user 2019-08-13 11:05:29 +02:00
Robert Schäfer
3c610caca4 Fix styling and avatar url of blocked users 2019-08-13 11:05:29 +02:00
Robert Schäfer
7f509b3201 Implement block/unbock UI 2019-08-13 11:05:29 +02:00
Robert Schäfer
824b2a5561 Implement page for blocked users 2019-08-13 11:05:29 +02:00
Wolfgang Huß
1d180480c4 Translated several texts and corrected and added some functionalities 2019-08-12 15:35:09 +02:00
Wolfgang Huß
5932d184d7 Corrected namings and countings 2019-08-12 13:27:14 +02:00
Robert Schäfer
9026157018 Better hasMore: Don't wait until length == 0
follow @Tirokk
2019-08-12 11:50:23 +02:00
Robert Schäfer
0b96b300d3 Implement hasMore feature on the index page 2019-08-10 03:50:24 +02:00
Robert Schäfer
0e707cdd4c Massive refactoring
Fix #1231 the filter menu once and for all...
2019-08-10 03:41:38 +02:00
Robert Schäfer
a8cfe96f60 Don't chane the filterPostsMenu with state
@mattwr18 state is the root of all evil
2019-08-09 17:11:55 +02:00