156 Commits

Author SHA1 Message Date
mattwr18
e002ed0b49 Add back layout changes/update db_manipulation
- we had removed these changes till we could deploy them by themselves
and run the db_manipulation

Co-authored-by: Alina Beck <alina.beck@mail.com>
2019-12-18 15:39:42 +01:00
roschaefer
e24d8035b1 Fix this annoying bug with a tested helper
I don't know where the bug originates. But it can only be that either
`previousResult` or `fetchMore` result is sometimes undefined. This
should make the function bullet-proof for these situations.
2019-12-10 23:28:01 +01:00
Robert Schäfer
032242ac7c
Merge pull request #2481 from Human-Connection/fix_cannot_read_post_of_undefined
Fix `Cannot read 'Post' of undefined`
2019-12-10 19:04:12 +01:00
roschaefer
1a852ebfab Fix Cannot read 'Post' of undefined 2019-12-10 17:53:54 +01:00
mattwr18
fb4f487abd Revert layout changes for imageAspectRatio
- we still add the imageAspectRatio for new posts, but we don't do
anything with the layout until we figure out how to add
imageAspectRatios for every post with an image in the database without
causing a big downtime
2019-12-10 15:40:03 +01:00
Alina Beck
c75c8c6d2d pass imageAspectRatio to MasonryGridItems on user and more info page 2019-12-02 16:25:39 +03:00
Moriz Wahl
3b49744b51 directory created a path names changed 2019-11-27 14:28:57 +01:00
Alina Beck
a210dd599d Merge branch 'master' into migrate-styleguide-icons 2019-11-20 19:35:03 +03:00
Alina Beck
77f4810ddc set up global localVue
by setting up localVue with all required plugins (such as styleguide and vuex)
in a separate testSetup file we can avoid doing this individually in all component tests
the testSetup is executed before each test suite, so each test file gets a fresh
instance of localVue
2019-11-20 12:31:40 +03:00
Alina Beck
4e6572a042 replace ds-icon with base-icon 2019-11-19 12:26:07 +03:00
Robert Schäfer
735a31ed00
Merge pull request #2101 from Human-Connection/1747-show-shouts
1747 show shouts
2019-11-18 17:00:43 +01:00
roschaefer
950df1cd07 Fix frontend tests
I also removed one frontend test. The test case was checking an edge
case. We use `hasMore` as the single source of truth so I think it's
safe to remove this test case.
2019-11-15 16:20:24 +01:00
roschaefer
3fa7eeb038 @mattwr18 looks like you forgot $state 2019-11-15 15:37:16 +01:00
mattwr18
f8c5290be0 Clean up following @roschaefer PR review suggestions 2019-11-15 15:23:16 +01:00
mattwr18
a10a735e35 Tell vue-infinite-loader when complete or loaded 2019-11-15 14:56:44 +01:00
mattwr18
a6c169c2e0 Fix infinite scrolling out of control 2019-11-15 14:35:08 +01:00
Alina Beck
6213a25355
Merge branch 'master' into 1747-show-shouts 2019-11-14 09:37:54 +03:00
Alina Beck
34239631a2 toggle shouts tab depending on user setting 2019-11-13 11:44:24 +03:00
mattwr18
084388a21e Follow new file structure
- avoid nested directories
2019-11-11 08:50:35 +01:00
mattwr18
2ea0364242 Implement refresh posts, fix duplicate posts bug
- on logo click
- scrollToTop
- remove duplicate records

Co-authored-by: kachulio1 <jngugi88@gmail.com>
2019-11-05 14:57:54 +01:00
mattwr18
8f365a60ce Hide shout count on user profile unless my profile
- we were asked to hide the shouts from other users by Dennis Hack, he
believes people will be more likely to shout a post if it is anonymous.
This only works from our UI to our backend... further steps would need
to be taken to truly make it anonymous. Also, we were asked to implement
it in such a way as to give the user the choice to show their shouts to
others.

Co-authored-by: Alina Beck <alina.beck@mail.com>
2019-10-23 14:07:41 +02:00
mattwr18
44e54372c4 Fix block user workflow
- need to update all the smart queries naming
2019-10-23 10:51:41 +02:00
mattwr18
fda6f683d4 Update fetchMore functionality on profile page
- clean up from pinned Posts PR
2019-10-23 09:41:31 +02:00
roschaefer
6612e4b7ce fix: remove unnecessary pinned orderBy on profile 2019-10-22 20:01:17 +02:00
mattwr18
411bbabcd5 Add profilePagePostsQuery to deal with bug
- we do not want to add pinnedPosts to every user's profile page
2019-10-18 00:42:44 +02:00
mattwr18
b45fd51d15 Pin post on user profile as well 2019-10-18 00:13:01 +02:00
roschaefer
3e04b26068 Add styling to pinned post 2019-10-17 17:56:16 +02:00
mattwr18
f871df02ae Start setting up frontend pinning/unpinning
- Add pin/unpin post to content menu
- Update apollo cache to reactively unpin
- Update apollo cache in root path to re-order Posts
- Order with pinned post first
- Start setting up filters, so that the pinned post is always the first
post visible
2019-10-17 17:56:16 +02:00
mattwr18
fd388fc1ba Fix tests for changed implementation
- we do not display a load more button when there are clearly no more
posts to load... if there are at least 6, the pageSize, we display it
because there might or might not be posts to load
2019-10-04 12:34:48 +02:00
mattwr18
3b5e39c54d Update orderBy, remove >=, more realistic seed data 2019-10-04 11:42:55 +02:00
mattwr18
6f1c5e3efa Set hasMore to false when returned Posts are equal to pageSize
- this was causing bugs on User profile page, and saves a database call
2019-10-03 11:04:23 +02:00
Robert Schäfer
d830fa4ae4
Merge pull request #1596 from Human-Connection/1583-follow-mutation
Improve follow/ufollow mutation
2019-09-19 16:54:35 +02:00
Vasily Belolapotkov
39db954ec6 improve follow/unfollow mutation usage 2019-09-19 12:10:59 +03:00
roschaefer
ec7d9753db Follow @alina-beck's PR review
https://github.com/Human-Connection/Human-Connection/pull/1640#pullrequestreview-290089879
2019-09-18 23:32:10 +02:00
roschaefer
85f1773211 Add slug to user profile page 2019-09-18 17:15:04 +02:00
Wolfgang Huß
714c658844 Add hint translation to plus icon for creating posts
- Position adjustment of the news feed plus icon in hight, because in desktop browsers it intersects the footer.
- Added shadow to plus icon on the user page.
2019-09-16 10:20:36 +02:00
Wolfgang Huß
80d1e03c03
Merge pull request #1510 from Human-Connection/1506-anonymize_deleted_user
1506 Anonymize deleted user also for moderators
2019-09-06 17:12:31 +02:00
roschaefer
1bd57dfeb8 Fix console.errors in test 2019-09-06 16:42:16 +02:00
roschaefer
a053181334 Fix #1506 2019-09-06 13:29:53 +02:00
roschaefer
0b464bf596 Fix leftover of #1479 2019-09-06 10:22:11 +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
290bdf5ff4
Merge pull request #1440 from Human-Connection/1414-soft_delete
1414 Implement soft delete
2019-09-03 23:59:52 +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
491a626031 Replace deleteComment with a more KISS solution 2019-09-03 21:28:29 +02:00
Alina Beck
0fd0cdbe34 separate post title and content with hyphens 2019-09-02 16:46:41 +01: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