41 Commits

Author SHA1 Message Date
mattwr18
f16c8b27e7 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1703-add-vue-apollo-subsriptions 2020-02-10 17:37:34 +01:00
mattwr18
5347f734af Fix cypress tests/frontend implementation
- Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2020-02-10 16:25:00 +01:00
mattwr18
2f43069ea0 Subscribe to notifications/remove polling
- We want to publish when a notification occurs for a specific user, not
  have the client poll the backend for ever user every minute.

- Co-authored-by: @Tirokk <wolle.huss@pjannto.com>
2020-02-05 17:37:38 +01:00
mattwr18
04f0467d2d Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1703-add-vue-apollo-subsriptions 2020-02-05 14:33:57 +01:00
mattwr18
bcc1ab167e Improve styling per @alina-beck review 2020-01-30 10:46:43 +01:00
mattwr18
a28eb8c91f Start subscriptions for notifications 2020-01-24 18:23:59 +01:00
mattwr18
bbb4dd56cd Follow review suggestions/add button to unblock
- @roschaefer gave several suggestions
- we have a button to unblock/unmute users on profile page
2020-01-23 19:18:12 +01:00
mattwr18
ba3e9e1025 Rename blacklist/whitelist to mute/unmute
- Follow @roschaefer suggestion in issue
- This can be reverted if we decide otherwise
2020-01-08 18:04:26 +01:00
mattwr18
c297b83f87 Convert block/unblock to blacklist/whitelist
- at the moment, we have implemented blocked like we want the
blacklist/whitelistUserContent to be, with the exception that is should
not be both ways. If I blacklist a user's content, they still see my
content in their news feed.
2020-01-07 18:57:35 +01:00
mattwr18
3abfe13dcc Fix maintenance service/LocaleSwitch import 2019-12-17 16:15:11 +01:00
roschaefer
107409ecee Fix duplicate fragment user issue
This is refactoring all our fragments and fixing the warning about an
existing name `user`. Apparently, fragments should have a unique name
globally.

I decided to call `userFragment`, `postFragment` the fragments for one
object and use different names to query for related objects.

I would be glad to learn a better way to handle this.
2019-12-14 00:37:42 +01:00
mattwr18
fd1e2c91fd Refactor to consolidate UpdateUser mutations 2019-12-12 18:48:56 +01:00
mattwr18
d375ebe7d9 Write test/refactor tests/resolvers/middleware
- write tests for userMiddleware
- checks the functionality of nodes/locations middleware
- refactor to not allow users to update to remove their name
  debatable whether we want that or not, but we do not allow users to
create accounts with no name, so we should be consistent, before we were
using neode to validate this, but we have are removing neode from
production code, so we must validate ourselves
- collate UpdateUser mutations to one
2019-12-12 18:14:47 +01:00
roschaefer
deefc4e12f Improve notification query performance
Just don't ask for stuff that you don't want to show anyways
2019-12-10 18:09:32 +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
feb65a6c9c Update property name to be more descriptive
- I wanted to trigger a build, since we had issues with our build server
today. I think this naming is more in the direction we want to go,
though. Maybe it could be makeShoutsPublic as @alina-beck used for the
translation keys... what do you think @kachulio
2019-11-12 21:19:52 +01:00
roschaefer
8e129c6001 fix: update counter when notification is read
@mattwr18 vue-apollo rocks! Taking the time to study the docs is a
rewarding investment.

My first idea was to cache the `unreadNotificationsCount` with Vuex.
But the docs of apollo even suggest to use apollo's local state as a
complete replacement of Vuex:
https://vue-apollo.netlify.com/guide/local-state.html

Then I further investigated why the updated `NOTIFIED` objects won't
update the notification counter. Turns out: They don't have an ID and
the computed property didn't fire when the notifications array would
change. I fixed both in this commit and yes, it works as expected.

No additional code required 💪
2019-11-11 08:52:04 +01:00
mattwr18
7007b1c444 Paginate notifications, reusable component w/ test 2019-11-11 08:50:35 +01:00
mattwr18
b79770469f Update notifications page
- display more notifications by simplifying the table
- get sorting working
2019-11-11 08:50:35 +01:00
mattwr18
7cdc12f4b9 Add notifications page with Notifications in table
- At the moment, the notifications are displayed in a table, and have
the same functionality as the NotificationMenu where you can click on
the title of the Post and visit the Post

- Unsure about the styling, it would kind of be nice to have a more
condensed list to see more notifications per page, but still be able to
click on a row and visit the Post
2019-11-11 08:50:35 +01:00
Joseph Ngugi
044155a298 add allowShouts mutation 2019-10-31 21:22:44 +03:00
ogerly
9dccb5fc0a Save language for the user permanently when changing the language 2019-10-22 11:34:04 +02:00
ogerly
63d5140420 break two - two 2019-09-30 11:38:29 +02:00
Alexander Friedland
deb21f6edb
Merge branch 'master' into Allow_embedded_code_in_posts_permanent_memory 2019-09-25 19:11:05 +02:00
ogerly
e8f771b59a first mega PR crazy update, all work 2019-09-25 18:39:01 +02:00
roschaefer
e6d7d1a936 Fix #1650 2019-09-20 20:05:27 +02:00
Vasily Belolapotkov
37a0ab6902 update client to use proper follow/unfollow mutation 2019-09-20 16:57:55 +03: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
mattwr18
16d7e6c91a Update notifications
- create only one relationship by using merge, but do not update
createdAt attribute/update test
- order by updatedAt_desc
2019-09-13 20:14:47 +02:00
Wolfgang Huß
3f4e717163 Move user queries to graphql/User.js 2019-09-09 10:58:10 +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
c585b23d7a Fix notification queries in webapp 2019-08-30 16:00:32 +02:00
Wolfgang Huß
df4f0627b5 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 1062-notification-about-comment-on-post
# Conflicts:
#	backend/src/middleware/index.js
2019-08-23 15:31:48 +02:00
roschaefer
37c12f6681 Fix post count always showing 0 2019-08-23 00:36:47 +02:00
Wolfgang Huß
793485c0fc Write frontend tests 2019-08-22 15:20:40 +02:00
Wolfgang Huß
9a799657e9 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 1062-notification-about-comment-on-post
# Conflicts:
#	backend/src/middleware/handleHtmlContent/handleContentData.js
2019-08-21 14:42:19 +02:00
Matt Rider
053d8bcf7b Fix UserQuery 2019-08-19 11:41:23 +02:00
Wolfgang Huß
efb5c75c24 Refactor after Roberts suggestions, number I
Start writing tests
2019-08-16 16:56:14 +02:00