decidim-comments 0.24.3 → 0.25.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -20
  3. data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
  4. data/app/cells/decidim/comments/comment/actions.erb +1 -1
  5. data/app/cells/decidim/comments/comment/deletion_data.erb +1 -0
  6. data/app/cells/decidim/comments/comment/show.erb +30 -21
  7. data/app/cells/decidim/comments/comment/utilities.erb +40 -12
  8. data/app/cells/decidim/comments/comment/votes.erb +6 -6
  9. data/app/cells/decidim/comments/comment_cell.rb +29 -0
  10. data/app/cells/decidim/comments/comment_form/show.erb +1 -1
  11. data/app/cells/decidim/comments/comments/add_comment.erb +10 -6
  12. data/app/cells/decidim/comments/comments/order_control.erb +4 -5
  13. data/app/cells/decidim/comments/comments/show.erb +2 -4
  14. data/app/cells/decidim/comments/comments/user_comments_blocked_warning.erb +5 -1
  15. data/app/cells/decidim/comments/comments_cell.rb +24 -2
  16. data/app/cells/decidim/comments/edit_comment_modal_form/show.erb +29 -0
  17. data/app/cells/decidim/comments/edit_comment_modal_form_cell.rb +53 -0
  18. data/app/commands/decidim/comments/create_comment.rb +2 -1
  19. data/app/commands/decidim/comments/delete_comment.rb +46 -0
  20. data/app/commands/decidim/comments/update_comment.rb +62 -0
  21. data/app/controllers/decidim/comments/comments_controller.rb +63 -6
  22. data/app/events/decidim/comments/comment_voted_event.rb +9 -0
  23. data/app/models/decidim/comments/comment.rb +24 -1
  24. data/app/packs/src/decidim/comments/comments.component.js +300 -0
  25. data/app/{assets/javascripts → packs/src}/decidim/comments/comments.component.test.js +116 -26
  26. data/app/packs/src/decidim/comments/comments.component_for_testing.js +8 -0
  27. data/app/packs/src/decidim/comments/comments.js +1 -0
  28. data/app/permissions/decidim/comments/permissions.rb +10 -1
  29. data/app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb +1 -1
  30. data/app/queries/decidim/comments/metrics/comments_metric_manage.rb +1 -1
  31. data/app/queries/decidim/comments/sorted_comments.rb +8 -6
  32. data/app/views/decidim/comments/comments/_delete.html.erb +5 -0
  33. data/app/views/decidim/comments/comments/_edited_comment.html.erb +1 -0
  34. data/app/views/decidim/comments/comments/create.js.erb +4 -2
  35. data/app/views/decidim/comments/comments/delete.js.erb +17 -0
  36. data/app/views/decidim/comments/comments/deletion_error.js.erb +1 -0
  37. data/app/views/decidim/comments/comments/reload.js.erb +2 -0
  38. data/app/views/decidim/comments/comments/update.js.erb +8 -0
  39. data/app/views/decidim/comments/comments/update_error.js.erb +1 -0
  40. data/config/assets.rb +5 -0
  41. data/config/locales/ar.yml +0 -1
  42. data/config/locales/ca.yml +7 -1
  43. data/config/locales/cs.yml +25 -1
  44. data/config/locales/de.yml +7 -1
  45. data/config/locales/el.yml +0 -1
  46. data/config/locales/en.yml +25 -1
  47. data/config/locales/es-MX.yml +7 -1
  48. data/config/locales/es-PY.yml +7 -1
  49. data/config/locales/es.yml +7 -1
  50. data/config/locales/fi-plain.yml +25 -1
  51. data/config/locales/fi.yml +25 -1
  52. data/config/locales/fr-CA.yml +25 -1
  53. data/config/locales/fr-LU.yml +162 -0
  54. data/config/locales/fr.yml +25 -1
  55. data/config/locales/gl.yml +25 -1
  56. data/config/locales/hu.yml +0 -1
  57. data/config/locales/it.yml +38 -1
  58. data/config/locales/ja.yml +35 -1
  59. data/config/locales/lb-LU.yml +1 -0
  60. data/config/locales/lv.yml +0 -1
  61. data/config/locales/nl.yml +27 -2
  62. data/config/locales/no.yml +0 -1
  63. data/config/locales/pl.yml +7 -1
  64. data/config/locales/pt-BR.yml +61 -0
  65. data/config/locales/pt.yml +0 -1
  66. data/config/locales/ro-RO.yml +25 -1
  67. data/config/locales/sk.yml +0 -1
  68. data/config/locales/sr-CS.yml +0 -1
  69. data/config/locales/sv.yml +25 -1
  70. data/config/locales/tr-TR.yml +0 -1
  71. data/config/locales/zh-CN.yml +0 -1
  72. data/db/migrate/20200706123136_make_comments_handle_i18n.rb +1 -1
  73. data/db/migrate/20210402124534_add_participatory_process_to_comments.rb +12 -0
  74. data/db/migrate/20210529095942_add_deleted_at_column_to_comments.rb +7 -0
  75. data/lib/decidim/comments/commentable.rb +6 -1
  76. data/lib/decidim/comments/commentable_with_component.rb +33 -0
  77. data/lib/decidim/comments/engine.rb +1 -9
  78. data/lib/decidim/comments/test/factories.rb +1 -0
  79. data/lib/decidim/comments/version.rb +1 -1
  80. data/lib/decidim/comments.rb +1 -0
  81. data/lib/tasks/decidim_comments.rake +15 -0
  82. metadata +32 -29
  83. data/app/assets/config/decidim_comments_manifest.js +0 -1
  84. data/app/assets/javascripts/decidim/comments/comments.component.js.es6 +0 -292
  85. data/app/assets/javascripts/decidim/comments/comments.js.erb +0 -10
  86. data/config/locales/ja-JP.yml +0 -120
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 530036330c8e8a1793de59fec9cace8bc61f74b3845161cbcb1f2ab5b538e65e
4
- data.tar.gz: b8bd0610748ad557d69bdfc7a0aaa2ad12ba8cfc0bff5719f68d220ffb6ff2e1
3
+ metadata.gz: e27afd2c5c0e3776d03932e6b2b12796c27eab40bf8cfd26f258fde4fdd8a605
4
+ data.tar.gz: c11b3f39a7ba66d72202040ea8da146631d28708e9f15907191f7d41b5812de1
5
5
  SHA512:
6
- metadata.gz: 5cb1e1ec58a22e9a5529312830ecedd90852e81ca9d21e44e008180740a2029e6f1931d8a1039f19ce81785335b25659ab378a460ee8cdb1d43b02ee5f19f1a3
7
- data.tar.gz: 242391c8eaa4cc56abdc58b6840038e601eb110c1a30442d75c54d6fba36da382138720530e4c9697379bc538f95abbdaad5098d5a9da7e453e62f91d71f8dea
6
+ metadata.gz: b53410a35d966fb62716b6db7281fe22410b7e948781144d96d4c370c7907b2a51fe0d35739b0458234a0348332eb3e7b789feeb2ae5c302b7542005bb050b81
7
+ data.tar.gz: 5b1e23259ea6c7ba98e5ce20773d10c37bbe6ef4cca061db480a53f0b110efe9913ae33cc5278bfde800fede543ed9e27f9f518f02c23d944d6bd6def528e3c4
data/README.md CHANGED
@@ -16,10 +16,10 @@ In order to use the helper in your templates you need to include the comments he
16
16
  include Decidim::Comments::CommentsHelper
17
17
  ```
18
18
 
19
- Finally, add the comments javascript module via Sprockets like this:
19
+ Finally, add the comments javascript module like this:
20
20
 
21
21
  ```javascript
22
- //= require decidim/comments/comments
22
+ import "src/decidim/comments/comments";
23
23
  ```
24
24
 
25
25
  ## Installation
@@ -47,11 +47,10 @@ For the backend side:
47
47
 
48
48
  For the frontend side:
49
49
 
50
- - Typescript (introduced in #1001)
51
50
  - React
52
51
  - Apollo
53
52
 
54
- The frontend code can be found in the folder `app/frontend` instead of `app/assets`. We are using Webpack to build the React application so we are keeping the React files in a separate folder and then including the `bundle.js` file using sprockets as usual.
53
+ The frontend code can be found in the folder `app/packs.
55
54
 
56
55
  ### Developing React components
57
56
 
@@ -61,22 +60,6 @@ You need to execute `npm start` in a separate terminal, in the `decidim` root fo
61
60
 
62
61
  You can execute `npm test` to run the javascript test suite or you can run `npm run test:watch` to listen for file changes.
63
62
 
64
- #### GraphQL schema and Typescript
65
-
66
- Since we are using Typescript we can generate interfaces and types from our schema using the following command:
67
-
68
- ```bash
69
- npm run graphql:generate_schema_types
70
- ```
71
-
72
- This command will create a file called `app/frontend/support/schema.ts` that can be used to strict type checking in our components.
73
-
74
- In order for this to work your Rails server must be running at `localhost:3000`, if you're using a different host you can set it with `DECIDIM_HOST`:
75
-
76
- ```bash
77
- DECIDIM_HOST=myhost:3000 npm run graphql:generate_schema_types
78
- ```
79
-
80
63
  ## Contributing
81
64
 
82
65
  See [Decidim](https://github.com/decidim/decidim).