decidim-comments 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +7 -0
- data/app/assets/javascripts/decidim/comments/bundle.js +115 -111
- data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
- data/app/commands/decidim/comments/create_comment.rb +24 -2
- data/app/events/decidim/comments/comment_created_event.rb +13 -30
- data/app/events/decidim/comments/user_mentioned_event.rb +39 -0
- data/app/frontend/application/apollo_client.ts +10 -6
- data/app/frontend/application/application.component.test.tsx +0 -13
- data/app/frontend/application/application.component.tsx +0 -2
- data/app/frontend/comments/add_comment_form.component.tsx +23 -21
- data/app/frontend/comments/comment.component.test.tsx +9 -4
- data/app/frontend/comments/comment.component.tsx +80 -22
- data/app/frontend/comments/comments.component.test.tsx +1 -0
- data/app/frontend/comments/comments.component.tsx +2 -2
- data/app/frontend/comments/down_vote_button.component.tsx +48 -50
- data/app/frontend/comments/up_vote_button.component.tsx +13 -11
- data/app/frontend/fragments/comment_data.fragment.graphql +5 -2
- data/app/frontend/queries/comments.query.graphql +2 -0
- data/app/frontend/support/generate_comments_data.ts +10 -4
- data/app/frontend/support/generate_user_data.ts +2 -1
- data/app/frontend/support/schema.ts +419 -216
- data/app/models/decidim/comments/comment.rb +11 -0
- data/app/queries/decidim/comments/sorted_comments.rb +2 -2
- data/app/types/decidim/comments/commentable_interface.rb +10 -1
- data/config/locales/ca.yml +20 -16
- data/config/locales/en.yml +18 -13
- data/config/locales/es.yml +22 -18
- data/config/locales/eu.yml +18 -13
- data/config/locales/fi.yml +19 -14
- data/config/locales/fr.yml +18 -13
- data/config/locales/gl.yml +75 -0
- data/config/locales/it.yml +18 -13
- data/config/locales/nl.yml +18 -13
- data/config/locales/pl.yml +18 -13
- data/config/locales/pt-BR.yml +75 -0
- data/config/locales/pt.yml +18 -13
- data/config/locales/ru.yml +1 -14
- data/config/locales/sv.yml +75 -0
- data/config/locales/uk.yml +0 -13
- data/lib/decidim/comments/api/comment_type.rb +5 -1
- data/lib/decidim/comments/commentable.rb +2 -1
- data/lib/decidim/comments/version.rb +1 -1
- metadata +15 -11
@@ -9,7 +9,8 @@ module Decidim
|
|
9
9
|
extend ActiveSupport::Concern
|
10
10
|
|
11
11
|
included do
|
12
|
-
has_many :
|
12
|
+
has_many :comment_threads, as: :root_commentable, foreign_key: "decidim_commentable_id", foreign_type: "decidim_commentable_type", class_name: "Decidim::Comments::Comment"
|
13
|
+
has_many :comments, as: :commentable, foreign_key: "decidim_root_commentable_id", foreign_type: "decidim_root_commentable_type", class_name: "Decidim::Comments::Comment"
|
13
14
|
|
14
15
|
# Public: Whether the object's comments are visible or not.
|
15
16
|
def commentable?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.9.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.9.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: jquery-rails
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,28 +46,28 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.9.0
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.9.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-dev
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.9.0
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.9.0
|
71
71
|
description: Pluggable comments system for some components.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- app/commands/decidim/comments/create_comment.rb
|
87
87
|
- app/commands/decidim/comments/vote_comment.rb
|
88
88
|
- app/events/decidim/comments/comment_created_event.rb
|
89
|
+
- app/events/decidim/comments/user_mentioned_event.rb
|
89
90
|
- app/forms/decidim/comments/comment_form.rb
|
90
91
|
- app/frontend/application/apollo_client.ts
|
91
92
|
- app/frontend/application/application.component.test.tsx
|
@@ -149,11 +150,14 @@ files:
|
|
149
150
|
- config/locales/eu.yml
|
150
151
|
- config/locales/fi.yml
|
151
152
|
- config/locales/fr.yml
|
153
|
+
- config/locales/gl.yml
|
152
154
|
- config/locales/it.yml
|
153
155
|
- config/locales/nl.yml
|
154
156
|
- config/locales/pl.yml
|
157
|
+
- config/locales/pt-BR.yml
|
155
158
|
- config/locales/pt.yml
|
156
159
|
- config/locales/ru.yml
|
160
|
+
- config/locales/sv.yml
|
157
161
|
- config/locales/uk.yml
|
158
162
|
- db/migrate/20161130143508_create_comments.rb
|
159
163
|
- db/migrate/20161214082645_add_depth_to_comments.rb
|
@@ -191,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
195
|
requirements:
|
192
196
|
- - ">="
|
193
197
|
- !ruby/object:Gem::Version
|
194
|
-
version: 2.3
|
198
|
+
version: '2.3'
|
195
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
200
|
requirements:
|
197
201
|
- - ">="
|
@@ -199,8 +203,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
203
|
version: '0'
|
200
204
|
requirements: []
|
201
205
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.
|
206
|
+
rubygems_version: 2.7.3
|
203
207
|
signing_key:
|
204
208
|
specification_version: 4
|
205
|
-
summary:
|
209
|
+
summary: Decidim comments module
|
206
210
|
test_files: []
|