389 Commits

Author SHA1 Message Date
roschaefer
c61b03483e Failed to write a test for admin/index.vue
I am not able to properly mock the data for ApolloQuery. However I find
it valuable to push this particular piece of dead code. Maybe people find
it helpful.
2019-09-05 19:07:12 +02:00
roschaefer
c129c3fbae Admin page handles loading and error state 2019-09-05 17:22:04 +02:00
roschaefer
0fca14a29e Fix nullpointer issues
It seems that `this.$apollo.queries.Post` can be undefined sometimes.
Honestly I don't know why but I could imagine that it might happen on
subpages and when the cypress test triggers the infinite loader, we
face this bug.
2019-09-05 13:07:22 +02:00
roschaefer
da57e9391c Fix #1394
It seems that we weren't using the API of `vue-apollo` in the right way.
The `update` callback is to transform the results (e.g. to map between
the server response and a `data` attribute with a different name). For
pagination there is a dedicated procedure called `fetchMore`. See:

* https://vue-apollo.netlify.com/guide/apollo/pagination.html
* https://vue-apollo.netlify.com/guide/components/query.html#query-operations
2019-09-05 11:30:37 +02:00
mattwr18
4e065325d1
Merge pull request #1480 from Human-Connection/cleanup_unused_code
Remove a lot of unused code, reduce graphql schema
2019-09-05 08:03:39 +02:00
roschaefer
66ed78e19b Remove a lot of unused code, reduce graphql schema 2019-09-05 03:20:32 +02:00
roschaefer
aea9caee80 Remove slow sorting options
Sadly, I think this the only way for now. As I explained in
https://github.com/Human-Connection/Human-Connection/issues/1272#issuecomment-527864948
I think we cannot do anything about it on our side for now.
2019-09-04 23:46:18 +02:00
Robert Schäfer
8d2ea9c4c0
Merge pull request #1474 from Human-Connection/cursor-fixes
Cursor fixes
2019-09-04 23:20:57 +02:00
mattwr18
4ca84ee04a
Merge pull request #1334 from Human-Connection/C-1187-terms-and-conditions-confirmed-function
Check if user has agreed to the current terms and conditions
2019-09-04 20:55:09 +02:00
Alina Beck
d1beed50d7 use masonry grid for related posts 2019-09-04 16:51:08 +01:00
Alina Beck
ba82765fa7 set cursor to auto on post card 2019-09-04 16:23:57 +01:00
ogerly
643b931167 Merge branch 'C-1187-terms-and-conditions-confirmed-function' of https://github.com/Human-Connection/Human-Connection into C-1187-terms-and-conditions-confirmed-function 2019-09-04 07:04:17 +02:00
ogerly
c64ff67a55 Fixed constant for terms and conditions created in folder for constant 2019-09-04 07:03:56 +02:00
Alexander Friedland
e618ff005d
Merge branch 'master' into C-1187-terms-and-conditions-confirmed-function 2019-09-04 06:42:40 +02:00
mattwr18
290bdf5ff4
Merge pull request #1440 from Human-Connection/1414-soft_delete
1414 Implement soft delete
2019-09-03 23:59:52 +02:00
roschaefer
5f14b4c45f Fix lint 2019-09-03 23:19:55 +02:00
roschaefer
99dd6ea20a Centralize fragments, fix @mattwr18's bugs
Most of those bugs weren't even introduced in this PR, e.g. the missing
`this.$i18n` for the comments mutations.
2019-09-03 21:28:29 +02:00
roschaefer
bb3f419532 Refactor graphql queries and fix bug
It's sometimes unbelievable how many bugs you find when doing
refactoring. This time there was some apparent confusion about
`commentsCount` and `commentedCount`. The counters on the post card were
never showing the correct number.
2019-09-03 21:28:29 +02:00
roschaefer
491a626031 Replace deleteComment with a more KISS solution 2019-09-03 21:28:29 +02:00
Alexander Friedland
41767cc27e
Merge branch 'master' into C-1187-terms-and-conditions-confirmed-function 2019-09-03 09:51:12 +02:00
ogerly
1b9303ceaf Jest tests for the Terms and Conditions in frontend and backend 2019-09-03 09:46:18 +02:00
Alina Beck
0fd0cdbe34 separate post title and content with hyphens 2019-09-02 16:46:41 +01:00
ogerly
ee03f0e902 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into C-1187-terms-and-conditions-confirmed-function 2019-08-28 14:21:46 +02:00
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
ogerly
f34cef22f2 Graphical changes 2019-08-23 11:02:24 +02:00
ogerly
54750e39b8 Missing translations added + code checked with Lint 2019-08-23 11:02:24 +02:00
ogerly
c00f281e6c Translations and style adapted 2019-08-23 11:02:24 +02:00
roschaefer
036e2605b7 Implement accept terms and conditions flow 2019-08-23 11:02:24 +02:00
ogerly
592a682bd7 Temporary commit 2019-08-23 11:02:24 +02:00
ogerly
36ce6361ec Alle Daten übernommen die für serverseitig rendern nötig sind 2019-08-23 11:02:24 +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