decidim 0.28.3 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/decidim-core/lib/decidim/webpacker/esbuild.config.js +14 -0
  3. data/decidim-core/lib/decidim/webpacker/shakapacker.yml +2 -2
  4. data/decidim-core/lib/decidim/webpacker/tsconfig.json +11 -0
  5. data/decidim-core/lib/decidim/webpacker/webpack/custom.js +13 -35
  6. data/decidim.gemspec +2 -1
  7. data/docs/README.adoc +2 -2
  8. data/docs/antora.yml +1 -1
  9. data/docs/modules/configure/pages/environment_variables.adoc +6 -92
  10. data/docs/modules/configure/pages/index.adoc +1 -1
  11. data/docs/modules/configure/pages/initializer.adoc +1 -1
  12. data/docs/modules/customize/pages/admin_filters.adoc +32 -0
  13. data/docs/modules/customize/pages/data_consent.adoc +1 -1
  14. data/docs/modules/customize/pages/index.adoc +2 -1
  15. data/docs/modules/customize/pages/javascript.adoc +2 -2
  16. data/docs/modules/customize/pages/logic.adoc +1 -1
  17. data/docs/modules/customize/pages/social_shares.adoc +2 -2
  18. data/docs/modules/customize/pages/styles.adoc +3 -3
  19. data/docs/modules/customize/pages/views.adoc +1 -1
  20. data/docs/modules/develop/pages/authorable.adoc +3 -3
  21. data/docs/modules/develop/pages/backports.adoc +6 -5
  22. data/docs/modules/develop/pages/c4_component.adoc +2 -7
  23. data/docs/modules/develop/pages/c4_container.adoc +1 -3
  24. data/docs/modules/develop/pages/c4_context.adoc +0 -2
  25. data/docs/modules/develop/pages/classes/commands.adoc +204 -25
  26. data/docs/modules/develop/pages/components.adoc +5 -5
  27. data/docs/modules/develop/pages/custom_seed_data.adoc +1 -1
  28. data/docs/modules/develop/pages/embeddable.adoc +1 -1
  29. data/docs/modules/develop/pages/endorsable.adoc +2 -2
  30. data/docs/modules/develop/pages/guide_conventions.adoc +6 -6
  31. data/docs/modules/develop/pages/guide_development_app.adoc +2 -1
  32. data/docs/modules/develop/pages/guide_example_apps.adoc +1 -1
  33. data/docs/modules/develop/pages/guide_github_projects.adoc +1 -1
  34. data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +2 -2
  35. data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +1 -1
  36. data/docs/modules/develop/pages/maintainers/releases.adoc +2 -4
  37. data/docs/modules/develop/pages/managing_translations_i18n.adoc +2 -2
  38. data/docs/modules/develop/pages/maps.adoc +5 -5
  39. data/docs/modules/develop/pages/metrics.adoc +1 -1
  40. data/docs/modules/develop/pages/modules.adoc +1 -1
  41. data/docs/modules/develop/pages/newsletter_templates.adoc +2 -2
  42. data/docs/modules/develop/pages/notifications.adoc +124 -1
  43. data/docs/modules/develop/pages/reminders.adoc +2 -2
  44. data/docs/modules/develop/pages/reportable.adoc +1 -1
  45. data/docs/modules/develop/pages/testing.adoc +2 -2
  46. data/docs/modules/develop/pages/troubleshooting_metrics.adoc +2 -2
  47. data/docs/modules/develop/pages/view_models_aka_cells.adoc +1 -1
  48. data/docs/modules/install/pages/checklist.adoc +3 -2
  49. data/docs/modules/install/pages/empty-database.adoc +3 -3
  50. data/docs/modules/install/pages/index.adoc +5 -5
  51. data/docs/modules/install/pages/manual.adoc +3 -2
  52. data/docs/modules/install/pages/update.adoc +2 -2
  53. data/docs/modules/services/pages/activestorage.adoc +1 -1
  54. data/docs/modules/services/pages/index.adoc +0 -1
  55. data/docs/modules/services/pages/maps.adoc +2 -2
  56. data/docs/modules/services/pages/sms.adoc +1 -1
  57. data/docs/modules/services/pages/social_providers.adoc +3 -3
  58. data/lib/decidim/gem_manager.rb +2 -0
  59. data/lib/decidim/version.rb +1 -1
  60. data/package-lock.json +6359 -19611
  61. data/package.json +4 -6
  62. data/packages/browserslist-config/package.json +1 -1
  63. data/packages/core/package.json +11 -11
  64. data/packages/dev/package.json +1 -1
  65. data/packages/eslint-config/index.js +58 -82
  66. data/packages/eslint-config/package.json +1 -1
  67. data/packages/prettier-config/package.json +1 -1
  68. data/packages/stylelint-config/package.json +1 -1
  69. data/packages/webpacker/index.js +2 -1
  70. data/packages/webpacker/package.json +5 -11
  71. metadata +61 -61
  72. data/babel.config.json +0 -25
  73. data/docs/modules/develop/pages/consulations_removal.bash +0 -117
  74. data/docs/modules/services/pages/elections_bulletin_board.adoc +0 -55
  75. data/lib/decidim/backporter.rb +0 -98
  76. data/lib/decidim/backports_reporter/cli_report.rb +0 -44
  77. data/lib/decidim/backports_reporter/csv_report.rb +0 -32
  78. data/lib/decidim/backports_reporter/report.rb +0 -46
  79. data/lib/decidim/git_backport_checker.rb +0 -70
  80. data/lib/decidim/git_backport_manager.rb +0 -179
  81. data/lib/decidim/github_manager/poster.rb +0 -70
  82. data/lib/decidim/github_manager/querier/base.rb +0 -78
  83. data/lib/decidim/github_manager/querier/by_issue_id.rb +0 -46
  84. data/lib/decidim/github_manager/querier/by_label.rb +0 -95
  85. data/lib/decidim/github_manager/querier/related_issues.rb +0 -51
  86. data/lib/decidim/github_manager/querier.rb +0 -20
  87. data/packages/elections/package.json +0 -17
  88. data/packages/webpacker/package-lock.json +0 -18045
@@ -15,7 +15,6 @@ Person(administration_user, "Administration User", "A registered user with speci
15
15
 
16
16
  System(decidim_system, "Decidim", "Allows participants to make decisions collaboratively through participatory processes, assemblies, initiatives, etc.")
17
17
 
18
- System_Ext(decidim_bulletin_board_system, "Decidim Bulletin Board", "Allows participants to cast end-to-end verifiable secret votes.")
19
18
  System_Ext(mail_system, "SMTP system (e-mail)", "Sends mails to users, like confirmations, reminders, notifications, etc.")
20
19
  System_Ext(etherpad_system, "Etherpad-Lite system", "Optional. Allows real-time text edition in Meetings.")
21
20
  System_Ext(geocoding_system, "Geocoding system", "Optional. An Open Street Maps provider, allows geographical localization of Proposals and Meetings..")
@@ -26,7 +25,6 @@ Rel(participant_user, decidim_system, "Uses")
26
25
  Rel(administration_user, decidim_system, "Uses")
27
26
  Rel_Back(participant_user, mail_system, "Sends e-mails to")
28
27
  Rel_Back(administration_user, mail_system, "Sends e-mails to")
29
- Rel_Back_Neighbor(decidim_bulletin_board_system, decidim_system, "Uses")
30
28
  Rel_Neighbor(decidim_system, mail_system, "Sends e-mails", "SMTP")
31
29
  Rel(decidim_system, oauth_system, "Uses")
32
30
  Rel(decidim_system, geocoding_system, "Uses")
@@ -2,11 +2,188 @@
2
2
 
3
3
  A command is custom class that manages the logic between your input, usually a xref:develop:classes/forms.adoc[form] object, an object and an user.
4
4
 
5
- Usually, a command is used to create, update or delete a object.
5
+ Usually, a command is used to handle the interaction between the controller and the model.
6
6
 
7
7
  Commands are located in the `app/commands/decidim/<my_module>` directory, and named: `<action>_<my_resource>.rb`.
8
8
 
9
- In the below example, you will be able to see how the command (`CreateMyResource`), events (`Decidim::MyModule::MyResourceEvent`) and jobs (`Decidim::MyModule::MyCustomJob`) can be used.
9
+ Because most of the time, a command is used to create, update a resource, we are shipping 3 commands by default, which you can inherit in your own commands:
10
+
11
+ - xref:_decidimcommandscreateresource[`Decidim::Commands::CreateResource`] - for creating resources
12
+ - xref:_decidimcommandsupdateresource[`Decidim::Commands::UpdateResource`] - for updating resources
13
+ - xref:_decidimcommandsdestroyresource[`Decidim::Commands::DestroyResource`] - for destroying resources
14
+
15
+ == Decidim::Commands::CreateResource
16
+
17
+ In order to create a resource, you need to provide the form with the values you want to create.
18
+
19
+ This is a custom implementation for demonstration purposes:
20
+
21
+ ```ruby
22
+ # frozen_string_literal: true
23
+
24
+ # app/commands/decidim/my_module/create_my_resource.rb
25
+ module Decidim
26
+ module MyModule
27
+ class CreateMyResource < Decidim::Commands::CreateResource
28
+ # Tell the parent class which fields are going to be
29
+ # copied from the form
30
+ fetch_form_attributes :title, :description, :component
31
+
32
+ # Tell the parent class which files are going to be
33
+ # extracted from the form and attached to the resource
34
+ fetch_file_attributes :logo, :banner
35
+
36
+ # This is the class initializer. It can be ignored if you do not need
37
+ # to do anything special.
38
+ def initialize(form)
39
+ @form = form
40
+ end
41
+
42
+ private
43
+ # Tell the parent what is the ActiveRecord class needed
44
+ def resource_class = Decidim::MyModule::MyResource
45
+
46
+ # This method allows you to customize the log visibility
47
+ def extra_params = { visibility: "all" }
48
+
49
+ # The command has a before hook that you can use:
50
+ def run_before_hooks
51
+ # do something
52
+ end
53
+
54
+ # The command has an after hook that you can use:
55
+ def run_after_hooks
56
+ # do something
57
+ end
58
+
59
+ # Additionally, you can override the `attributes` method
60
+ # to add more attributes to the resource
61
+ def attributes
62
+ super.merge({
63
+ my_custom_attribute: form.my_custom_attribute
64
+ })
65
+ end
66
+
67
+ # You can also provide a custom form validation
68
+ # by overriding the `invalid?` method
69
+ def invalid?
70
+ return true if form.my_custom_attribute.blank?
71
+ super
72
+ end
73
+ end
74
+ end
75
+ end
76
+ ```
77
+
78
+ == Decidim::Commands::UpdateResource
79
+
80
+ In order to update a resource, you need to provide the resource you want to update, and the form with the new values.
81
+
82
+ This is a custom implementation for demonstration purposes:
83
+
84
+ ```ruby
85
+ # frozen_string_literal: true
86
+
87
+ # app/commands/decidim/my_module/update_my_resource.rb
88
+ module Decidim
89
+ module MyModule
90
+ class UpdateMyResource < Decidim::Commands::UpdateResource
91
+ # Tell the parent class which fields are going to be
92
+ # copied from the form
93
+ fetch_form_attributes :title, :description, :component
94
+
95
+ # Tell the parent class which files are going to be
96
+ # extracted from the form and attached to the resource
97
+ fetch_file_attributes :logo, :banner
98
+
99
+ # This is the class initializer. It can be ignored if you do not need
100
+ # to do anything special.
101
+ def initialize(form, resource)
102
+ @form = form
103
+ @resource = resource
104
+ end
105
+
106
+ private
107
+ # Tell the parent what is the ActiveRecord class needed
108
+ def resource_class = Decidim::MyModule::MyResource
109
+
110
+ # This method allows you to customize the log visibility
111
+ def extra_params = { visibility: "all" }
112
+
113
+ # The command has a before hook that you can use:
114
+ def run_before_hooks
115
+ # do something
116
+ end
117
+
118
+ # The command has an after hook that you can use:
119
+ def run_after_hooks
120
+ # do something
121
+ end
122
+
123
+ # Additionally, you can override the `attributes` method
124
+ # to add more attributes to the resource
125
+ def attributes
126
+ super.merge({
127
+ my_custom_attribute: form.my_custom_attribute
128
+ })
129
+ end
130
+
131
+ # You can also provide a custom form validation
132
+ # by overriding the `invalid?` method
133
+ def invalid?
134
+ return true if form.my_custom_attribute.blank?
135
+ super
136
+ end
137
+ end
138
+ end
139
+ end
140
+ ```
141
+
142
+ == Decidim::Commands::DestroyResource
143
+
144
+ If you do not need to do anything special, you can just call this command for any resource you want to destroy.
145
+
146
+ If you still want to customize the command, you can do it like this:
147
+
148
+ ```ruby
149
+ # frozen_string_literal: true
150
+
151
+ # app/commands/decidim/my_module/destroy_my_resource.rb
152
+ module Decidim
153
+ module MyModule
154
+ class DestroyMyResource < Decidim::Commands::DestroyResource
155
+ # This is the class initializer, that can be safely ignored if you do not perform additional actions
156
+ def initialize(resource, current_user)
157
+ @resource = resource
158
+ @current_user = current_user
159
+ end
160
+
161
+ private
162
+
163
+ # This method allows you to customize the log visibility
164
+ def extra_params = { visibility: "all" }
165
+
166
+ # The command has a before hook that you can use:
167
+ def run_before_hooks
168
+ # do something
169
+ end
170
+
171
+ # The command has an after hook that you can use:
172
+ def run_after_hooks
173
+ # do something
174
+ end
175
+
176
+ # You can also provide a custom validation by overriding the `invalid?` method
177
+ def invalid? = false
178
+ end
179
+ end
180
+ end
181
+ ```
182
+
183
+ == Advanced usage
184
+
185
+ In the below example, you will be able to see an advanced example on how you can write your custom command (`CreateMyResource`), events (`Decidim::MyModule::MyResourceEvent`) and jobs (`Decidim::MyModule::MyCustomJob`) can be used.
186
+
10
187
  ```ruby
11
188
  # frozen_string_literal: true
12
189
 
@@ -23,23 +200,23 @@ module Decidim
23
200
  end
24
201
 
25
202
  def call
26
- return broadcast(:invalid) if form.invalid?
203
+ return broadcast(:invalid) if form.invalid?
27
204
 
28
- transation do
29
- create_resource
30
- dispatch_event
31
- process_jobs
205
+ transaction do
206
+ create_resource
207
+ dispatch_event
208
+ process_jobs
209
+ end
210
+ broadcast(:ok)
32
211
  end
33
- broadcast(:ok)
34
- end
35
212
 
36
213
  private
37
214
 
38
215
  attr_reader :form, :resource
39
216
 
40
217
  def process_jobs
41
- Decidim::MyModule::MyCustomJob.perform_later(resource)
42
- end
218
+ Decidim::MyModule::MyCustomJob.perform_later(resource)
219
+ end
43
220
 
44
221
  def dispatch_event
45
222
  Decidim::EventsManager.publish(
@@ -47,31 +224,33 @@ module Decidim
47
224
  event_class: Decidim::MyModule::MyResourceEvent,
48
225
  resource:
49
226
  )
50
- end
227
+ end
51
228
 
52
229
  def create_resource
53
- @resource = Decidim.traceability.create!(
54
- resource,
55
- form.current_user,
56
- **attributes,
57
- visibility: "public-only"
58
- )
59
- end
230
+ @resource = Decidim.traceability.create!(
231
+ resource,
232
+ form.current_user,
233
+ **attributes,
234
+ visibility: "public-only"
235
+ )
236
+ end
60
237
 
61
238
  # this is mapping of
62
239
  # ActiveRecord::attribute => form.attribute
63
240
  def attributes
64
- {
65
- title: form.title,
66
- description: form.description,
67
- resource: form.resource
68
- }
69
- end
241
+ {
242
+ title: form.title,
243
+ description: form.description,
244
+ resource: form.resource
245
+ }
246
+ end
70
247
  end
71
248
  end
72
249
  end
73
250
  ```
74
251
 
252
+ == Overriding Decidim commands
253
+
75
254
  Sometimes you may need to extend a `Decidim` supplied command, then you can either override the `attributes` method, either extend it with a `super` call.
76
255
 
77
256
  ```ruby
@@ -6,7 +6,7 @@ Components are the core contract between external xref:develop:modules.adoc[modu
6
6
 
7
7
  If you want to create a new component, you can use https://github.com/decidim/decidim/tree/develop/decidim-generators[decidim-generators] to
8
8
  automatically generate a decidim component skeleton, or copy the basic structure
9
- of an existing mantained plugin.
9
+ of an existing maintained plugin.
10
10
 
11
11
  [source,console]
12
12
  ----
@@ -43,7 +43,7 @@ Decidim.register_component(:my_component) do |component|
43
43
 
44
44
  # Component hooks get called whenever relevant lifecycle events happen, like
45
45
  # adding a new component o destroying it. You always get passed the instance
46
- # so you can act on it. Creating or destroying a comoponent is transactional
46
+ # so you can act on it. Creating or destroying a component is transactional
47
47
  # along with its hooks, so you can decide to halt the transaction by raising
48
48
  # an exception.
49
49
  #
@@ -125,7 +125,7 @@ Each attribute defined can be described through properties:
125
125
  * `text` and `string` attributes can be `translated`, which will allow admin users to enter values for every language.
126
126
  * `text` attributes can use an `editor` to edit them as HTML code
127
127
  * `enum` attributes should have a `choices` attributes that list all the possible values. This could be a lambda function.
128
- * they can be `readonly` in some cases, throught a lambda function that received the current component within the `context`.
128
+ * they can be `readonly` in some cases, through a lambda function that received the current component within the `context`.
129
129
 
130
130
  [source,ruby]
131
131
  ----
@@ -167,7 +167,7 @@ This sections explains how to add dummy content to a development application.
167
167
  === Tips and Tricks
168
168
 
169
169
  * Take advantage of the Faker gem, already in decidim.
170
- * If you need content for i18n fields, you can use https://github.com/decidim/decidim/blob/develop/decidim-core/lib/decidim/faker/localized.rb[Localizaed], which uses `Faker` internally.
170
+ * If you need content for i18n fields, you can use https://github.com/decidim/decidim/blob/develop/decidim-core/lib/decidim/faker/localized.rb[Localized], which uses `Faker` internally.
171
171
 
172
172
  == Assets
173
173
 
@@ -187,7 +187,7 @@ While the component is being developed, it will be simpler and faster to update
187
187
 
188
188
  Also, components might have one or many entrypoints (for CSSs and javascripts) and images. These entrypoints need to be manually added to `config/webpack/custom.js`. **Any change in both files** requires to restart `webpack-dev-server` process.
189
189
 
190
- Take into account that generating a new development application **overwrites** Webpacker configuration so these changes might be overwriten. That is why it is necessary, once the changes are stable enough, to update the generators files.
190
+ Take into account that generating a new development application **overwrites** Webpacker configuration so these changes might be overwritten. That is why it is necessary, once the changes are stable enough, to update the generators files.
191
191
 
192
192
  === Updating Webpacker configuration for the generators
193
193
 
@@ -27,5 +27,5 @@ If you set the variables _before_ creating the seeds data, the values in those v
27
27
  * `SMTP_PORT`: The port used to connect to your email sending system.
28
28
  * `DECIDIM_SYSTEM_USER_PASSWORD`: The password for the System user. Useful to hide access to the System panel, where the SMTP config can be retrieved in plain text.
29
29
 
30
- This is useful, for example, to set up a staging application open to anyone, and use Sendgrid as a mailing system. By changing the default password only you will be able to access the System panel, so nobody will be able to see the credentials used to connect to Sendgrid.
30
+ This is useful, for example, to set up a staging application open to anyone, and use SendGrid as a mailing system. By changing the default password only you will be able to access the System panel, so nobody will be able to see the credentials used to connect to SendGrid.
31
31
 
@@ -11,7 +11,7 @@ or even `Meetings` component in an easy way with the `embeddable` option that of
11
11
 
12
12
  == How to
13
13
 
14
- All that you have to do, is to enter into whathever space/component you want to share info to, and look for down right part of the page to find embeddable share option.
14
+ All that you have to do, is to enter into whatever space/component you want to share info to, and look for down right part of the page to find embeddable share option.
15
15
 
16
16
  If it is embeddable, you will see `embed <\>` option there.
17
17
 
@@ -20,7 +20,7 @@ For performance, an endorsable has a counter cache of endorsements.
20
20
  | ((Proposal,...)) | +-------------+
21
21
  +----------------------+ 0..N +--------------------+ +--+Decidim::User|
22
22
  |-has_many endorsements|-------+Decidim::Endorsement| | +-------------+
23
- |#counter cahce column | +--------------------+ |
23
+ |#counter cache column | +--------------------+ |
24
24
  |-endorsements_counter | |-author: may be a |<--+
25
25
  +----------------------+ | user or a | |
26
26
  | user_group | | +------------------+
@@ -81,7 +81,7 @@ To render this button, `decidim-core` offers the `decidim/endorsement_buttons` c
81
81
  cell("decidim/endorsement_buttons", resource)
82
82
  ----
83
83
 
84
- This cell, renders the endorsements counter and the endorsement button by default. But it has the possibility to be invoked to render elements sepparately.
84
+ This cell, renders the endorsements counter and the endorsement button by default. But it has the possibility to be invoked to render elements separately.
85
85
 
86
86
  [source,ruby]
87
87
  ----
@@ -2,7 +2,7 @@
2
2
 
3
3
  == GitFlow Branching model
4
4
 
5
- The Decidim respository follows the GitFlow branching model. There are good documentations on it at:
5
+ The Decidim repository follows the GitFlow branching model. There are good documentations on it at:
6
6
 
7
7
  * https://nvie.com/posts/a-successful-git-branching-model/[the original post]
8
8
  * https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow[Atlassian tutorial]
@@ -25,7 +25,7 @@ Please note that Decidim does not use the `master` branch.
25
25
 
26
26
  == Naming branches
27
27
 
28
- We would like to have all branches following this namings:
28
+ We would like to have all branches following this naming convention:
29
29
 
30
30
  |===
31
31
  | Branch prefix | Comment
@@ -34,7 +34,7 @@ We would like to have all branches following this namings:
34
34
  | Internal work. For instance, automatisms, etc. No production code change.
35
35
 
36
36
  | ci/
37
- | For continous integration related tasks. No production code change.
37
+ | For continuous integration related tasks. No production code change.
38
38
 
39
39
  | deps/
40
40
  | For dependency management tasks.
@@ -67,7 +67,7 @@ After the prefix we recommend to add some words that describe what the change is
67
67
  . feature/add-pagination-to-moderated-users
68
68
  . fix/free-text-choice-answer
69
69
 
70
- The rationale behind this is that we do not like to have the issue number (`fix/9123` or just `9123`) as that difficults working with `git`.
70
+ The rationale behind this is that we do not like to have the issue number (`fix/9123` or just `9123`) as that is difficult to work with in `git`.
71
71
 
72
72
  == Git commit messages and Pull Request titles
73
73
 
@@ -87,7 +87,7 @@ For keeping track of changes we like the rules of https://keepachangelog.com/en/
87
87
 
88
88
  In the past we kept a file for all the development of a given version but that was difficult to maintain, as we had conflicts all the time. See the full discussion in https://github.com/decidim/decidim/issues/5908[#5908]. We decided that:
89
89
 
90
- * We will not ask CHANGELOG for all the changes make on this repository. We will ask for CHANGELOG instructions only for special changes that really need some actions on part of developers/implementers or something to comunicate on the releases notes
90
+ * We will not ask CHANGELOG for all the changes make on this repository. We will ask for CHANGELOG instructions only for special changes that really need some actions on part of developers/implementers or something to communicate on the releases notes
91
91
  * The CHANGELOG will be manually made as part of the release process with the tooling from git (`git log v0.20.0..v0.20.1 --grep " (#[0-9]\+)" --oneline`) or https://github.com/decidim/decidim/compare/v0.20.0...v0.20.1[github]
92
92
 
93
93
  == Semantic Versioning
@@ -105,5 +105,5 @@ For more information, refer to the xref:develop:guide_accessibility.adoc[Decidim
105
105
 
106
106
  == JavaScript
107
107
 
108
- * Do not use CSS classes to bind JavaScript selectors or Ruby specs. Try to use an `id` (with the `js-` preffix) or a `data-attribute` as selector, in order to shrink the couplish between changing technologies.
108
+ * Do not use CSS classes to bind JavaScript selectors or Ruby specs. Try to use an `id` (with the `js-` prefix) or a `data-attribute` as selector, in order to shrink the coupling between changing technologies.
109
109
  * Do not use jQuery if you can do it with vanilla JavaScript. Specially try to not introduce new code with jQuery, and if you are working with a legacy file take consider migrating it to vanilla JS.
@@ -3,7 +3,7 @@
3
3
  In order to start developing you will need what is called a `development_app`. This is nearly the same as a new Decidim
4
4
  app (that you can create with `decidim app_name`) but with a Gemfile pre-configured for local development and some other small config modifications.
5
5
 
6
- We recommend that you first have a xref:install:manual.adoc[working Decidim app] so that you have fullfilled all the necessary
6
+ We recommend that you first have a xref:install:manual.adoc[working Decidim app] so that you have fulfilled all the necessary
7
7
  system and services requirements, like having a working Ruby installation, PostgreSQL, Node.JS, etc.
8
8
 
9
9
  You will need to configure the PostgreSQL database before anything. For this,
@@ -49,6 +49,7 @@ On creation, these steps are automatically invoked by the generator:
49
49
  * `bin/rails decidim:upgrade`
50
50
  * `bin/rails db:create`
51
51
  * `bin/rails db:migrate`
52
+ * `bin/rails assets:precompile`
52
53
  * `bin/rails db:seed`
53
54
 
54
55
  Mind that if everything went well you should not need to run these commands manually.
@@ -27,7 +27,7 @@ image::helsinki.png[Helsinki OmaStadi]
27
27
 
28
28
  Some highlights:
29
29
 
30
- * They have their https://github.com/City-of-Helsinki/decidim-helsinki/blob/b9a09e570eb6090dee93f2ee73b5951882c74755/Gemfile[Gemfile] with lots of modules with their own code. Some of them are also in ruybgems (like `decidim-access_requests`, `decidim-antivirus`, `decidim-mpassid`, `decidim-process_groups_content_block`, `decidim-suomifi`, `decidim-term_customizer`), others are only in Github (`decidim-accountability_simple`, `decidim-apiauth`, `decidim-combined_budgeting`, `decidim-plans`, `decidim-redirects`). They even use a module made by other organization in the community (`decidim-budgets_enhanced`)
30
+ * They have their https://github.com/City-of-Helsinki/decidim-helsinki/blob/b9a09e570eb6090dee93f2ee73b5951882c74755/Gemfile[Gemfile] with lots of modules with their own code. Some of them are also in ruybgems (like `decidim-access_requests`, `decidim-antivirus`, `decidim-mpassid`, `decidim-process_groups_content_block`, `decidim-suomifi`, `decidim-term_customizer`), others are only in GitHub (`decidim-accountability_simple`, `decidim-apiauth`, `decidim-combined_budgeting`, `decidim-plans`, `decidim-redirects`). They even use a module made by other organization in the community (`decidim-budgets_enhanced`)
31
31
  * They have their UI customized to their needs. See the https://github.com/City-of-Helsinki/decidim-helsinki/tree/a7396a312cc04198654a86d66c2a7de556c212af/app/assets/stylesheets[CSS] and https://github.com/City-of-Helsinki/decidim-helsinki/tree/a7396a312cc04198654a86d66c2a7de556c212af/app/views[HTML (views)].
32
32
  * They have an awesome README explaining how it works and what changes have made.
33
33
 
@@ -1,6 +1,6 @@
1
1
  = GitHub Projects Workflow
2
2
 
3
- This is an internal document on how we are organizing the development of Decidim with external contractors through Github projects.
3
+ This is an internal document on how we are organizing the development of Decidim with external contractors through GitHub projects.
4
4
 
5
5
  There are three teams:
6
6
 
@@ -43,7 +43,7 @@ This task do a few steps to allow the Rails instance to have a webpacker instanc
43
43
 
44
44
  This task is automatically performed every time decidim is updated, to get the latest Webpack configuration. This happens when you run the `decidim:upgrade` task.
45
45
 
46
- === Copy Decidim custom CSS and Javascript
46
+ === Copy Decidim custom CSS and JavaScript
47
47
 
48
48
  `webpacker:install` task should have created to you the following dirs structure:
49
49
 
@@ -104,7 +104,7 @@ If any of the CSS is re-defining CSS vars add them to `_decidim-settings.scss`.
104
104
 
105
105
  === Migrate javascripts
106
106
 
107
- Existing javascripts should be moved from `app/assets/javascsripts` to `app/packs/src` and imported with `import` into `decidim_application.js`. Take into account that you might need to adjust a bit the paths of the `import` to adjust them to the new locations.
107
+ Existing javascripts should be moved from `app/assets/javascripts` to `app/packs/src` and imported with `import` into `decidim_application.js`. Take into account that you might need to adjust a bit the paths of the `import` to adjust them to the new locations.
108
108
 
109
109
  If that JS file is replacing a Decidim file, there is no need to add it to `decidim_application.js`
110
110
 
@@ -109,7 +109,7 @@ What you should do instead is to follow the asset compilation migration guide ab
109
109
 
110
110
  base_path = File.expand_path("..", __dir__)
111
111
 
112
- # Register the additonal path for Webpacker in order to make the module's
112
+ # Register the additional path for Webpacker in order to make the module's
113
113
  # stylesheets available for inclusion.
114
114
  Decidim::Webpacker.register_path("#{base_path}/app/packs")
115
115
 
@@ -231,10 +231,10 @@ NOTE: When you bump the version, the generator tests will fail because the gems
231
231
  .. Re-run the failed generators tests at the release branch.
232
232
  .. Create a new release at this repository, just go to the https://github.com/decidim/decidim/releases[releases page] and create a new one.
233
233
  . Update Decidim's Docker repository as explained in the Docker images section below.
234
- . Update Crowdin synchronization configuration with Github:
234
+ . Update Crowdin synchronization configuration with GitHub:
235
235
  .. Add the new `release/x.y-stable` branch.
236
236
  .. Remove from Crowdin branches that are not officially supported anymore.
237
- That way they do not synchronize with Github.
237
+ That way they do not synchronize with GitHub.
238
238
  . Update the version in the documentation system that we use, Antora. For the https://github.com/decidim/decididm[decidim repository] this is done automatically when bumping the versions. For the https://github.com/decidim/documentation[documentation repository]:
239
239
  ... Create and push the branch in that repository: `git checkout release/0.XX-stable && git push origin release/x.y-stable`
240
240
  ... Add the new version on the https://github.com/decidim/documentation/blob/develop/antora-playbook.yml[antora-playbook.yml] `branches` key, for the both sources (decidim and documentation repository). Do not forget to also remove the oldest and change the new default in the `start_page` key. For instance for v0.28 this is how it'd look like:
@@ -267,8 +267,6 @@ index 31be47c..75c7d5e 100644
267
267
  - release/0.27-stable
268
268
  - - release/0.26-stable
269
269
  - develop
270
- - url: https://github.com/decidim/decidim-bulletin-board
271
- start_path: docs
272
270
  ----
273
271
  After you commit this change in `develop` branch you will have to wait a couple minutes for the automatic deployment to see it live at https://docs.decidim.org.
274
272
 
@@ -5,12 +5,12 @@
5
5
  Decidim uses https://crowdin.com/[Crowdin] to manage the translations.
6
6
 
7
7
  * Whenever someone https://github.com/decidim/decidim/pull/1814/files#diff-c78c80097da59920d55b3f462ca21afaR177[adds a new translation key] to _Decidim_, _Crowdin_ gets notified and the new content is available to be translated from https://crowdin.com/project/decidim[Crowdin's Decidim dashboard].
8
- * When a translator translates any key from Crowdin, it automatically creates a https://github.com/decidim/decidim/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Adecidim-bot%20Crowdin[PR in Github], adding the keys in the corresponding _yaml_ files.
8
+ * When a translator translates any key from Crowdin, it automatically creates a https://github.com/decidim/decidim/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Adecidim-bot%20Crowdin[PR in GitHub], adding the keys in the corresponding _yaml_ files.
9
9
  * 🌈
10
10
 
11
11
  == Adding a new language
12
12
 
13
- * Setup the new language in https://crowdin.com/project/decidim[_Crowdin's Decidim project_] (or open an issue on Github asking an admin to do that).
13
+ * Setup the new language in https://crowdin.com/project/decidim[_Crowdin's Decidim project_] (or open an issue on GitHub asking an admin to do that).
14
14
  * Add the locale mapping in the `crowdin.yml` file
15
15
  * Translate at least one key from every engine, so, your _yaml_ files are not empty. The easiest way to do this is to automatically translate and sync all the content. Later you will be able to fix the content that was not properly translated.
16
16
  * Add the new language to `available_locales` (https://github.com/decidim/decidim/pull/1991[PR]).
@@ -6,7 +6,7 @@ If you want to create your own provider integration, you will need to find a ser
6
6
 
7
7
  * https://en.wikipedia.org/wiki/Geocoding[A geocoding server] in order to turn user entered addresses into https://en.wikipedia.org/wiki/Geographic_coordinate_system[geocoordinates].
8
8
  * https://en.wikipedia.org/wiki/Autocomplete[A geocoding autocompletion server] in order to suggest and predict addresses based on the user input and turning these suggested addresses into https://en.wikipedia.org/wiki/Geographic_coordinate_system[geocoordinates].
9
- * https://en.wikipedia.org/wiki/Tile_Map_Service[A map tile server] for the dynamic maps, preferrably one that is compatible with the default https://leafletjs.com/[Leaflet] map library.
9
+ * https://en.wikipedia.org/wiki/Tile_Map_Service[A map tile server] for the dynamic maps, preferably one that is compatible with the default https://leafletjs.com/[Leaflet] map library.
10
10
  * https://wiki.openstreetmap.org/wiki/Static_map_images[A static map image server] for the static map images e.g.
11
11
  on the proposal pages.
12
12
  This service is optional as Decidim will use the dynamic map tiles to generate a similar map element if the static map image cannot be provided.
@@ -118,7 +118,7 @@ Please refer to the Geocoder gem's https://github.com/alexreisner/geocoder/blob/
118
118
 
119
119
  === Defining the geocoding autocompletion maps utility
120
120
 
121
- For the geocoding autocompletion map functionality, you should preferrably use a service provider that is compatible with https://github.com/komoot/photon[Photon] which is already integrated with Decidim.
121
+ For the geocoding autocompletion map functionality, you should preferably use a service provider that is compatible with https://github.com/komoot/photon[Photon] which is already integrated with Decidim.
122
122
 
123
123
  If this is not possible, you can also create a custom geocoding autocompletion maps utility for your own service provider by defining the following empty class to start with:
124
124
 
@@ -145,7 +145,7 @@ See below for further notes about the builder class.
145
145
  * `builder_options` - A method that prepares the options for the builder instance that is used to create the maps in the front-end.
146
146
  By default, this is an empty hash that needs to be configured for each provider.
147
147
 
148
- To see an example how to customize the static map utility, take a look at the link:/decidim-core/lib/decidim/map/provider/autocomplete/here.rb[HERE Maps geocoding autocomletion utility].
148
+ To see an example how to customize the static map utility, take a look at the link:/decidim-core/lib/decidim/map/provider/autocomplete/here.rb[HERE Maps geocoding autocompletion utility].
149
149
 
150
150
  In order to provide configuration options for the geocoding autocompletion, you can pass them directly through the maps configuration with the following syntax:
151
151
 
@@ -232,7 +232,7 @@ The result objects need to contain the following keys:
232
232
  * `key` - The key which will be matched against the user entered input
233
233
  * `value` - The value which will be added to the address input if the user decides to select this value
234
234
 
235
- Optionally, you can also include a `coordinates` key in the result object which contains an array of two cordinates (latitude and longitude respectively).
235
+ Optionally, you can also include a `coordinates` key in the result object which contains an array of two coordinates (latitude and longitude respectively).
236
236
  You can also include any other data you might need in the front-end for these results but it will be not used by Decidim.
237
237
 
238
238
  The final code would look something like follows:
@@ -404,7 +404,7 @@ L.tileLayer(
404
404
 
405
405
  === Defining the static maps utility
406
406
 
407
- For the static map functionality, you should preferrably use a service provider that is compatible with https://github.com/jperelli/osm-static-maps[osm-static-maps] which is already integrated with Decidim.
407
+ For the static map functionality, you should preferably use a service provider that is compatible with https://github.com/jperelli/osm-static-maps[osm-static-maps] which is already integrated with Decidim.
408
408
 
409
409
  If this is not possible, you can also create a custom static maps utility for your own service provider by defining the following empty class to start with:
410
410
 
@@ -76,7 +76,7 @@ Only available for `ParticipatorySpaces` (restricted to `ParticipatoryProcesses`
76
76
 
77
77
  == Persistence
78
78
 
79
- The metrics module percomutes calculations and persists them into
79
+ The metrics module precomputes calculations and persists them into
80
80
  `decidim_metrics` database table. So this module only uses one single table to
81
81
  persist metrics from all times and types.
82
82
 
@@ -140,7 +140,7 @@ module Decidim
140
140
  root to: "authorizations#new"
141
141
  end
142
142
 
143
- # This is a Dedicim::Verifications specific initializer
143
+ # This is a Decidim::Verifications specific initializer
144
144
  initializer "decidim_verifications_my_verifier.verification_workflow" do |_app|
145
145
  Decidim::Verifications.register_workflow(:my_verifier) do |workflow|
146
146
  workflow.engine = Decidim::Verifications::MyVerifier::Engine
@@ -1,6 +1,6 @@
1
1
  = Newsletter templates
2
2
 
3
- The newsletter templates allow the user to select a template amongst a set of of them, and use it as base to send newsletters. This allow for more customization on newsletter, tematic newsletters, etc.
3
+ The newsletter templates allow the user to select a template amongst a set of of them, and use it as base to send newsletters. This allow for more customization on newsletter, thematic newsletters, etc.
4
4
 
5
5
  Code-wise, they use the content blocks system internally, so xref:develop:content_blocks.adoc[check the docs] for that section first.
6
6
 
@@ -44,7 +44,7 @@ Then we define the cell that will be used to render the form in the admin sectio
44
44
 
45
45
  In the third line inside the block we define the I18n path to the public name of the template. This name will serve as identifier for the users who write the newsletters, so be sure to make it descriptive.
46
46
 
47
- After that we define the images this newsletter supports. We give it a unique name, the class name of the uploader we will use (the example one is the default one, but you might want to customize this value) and a way to preview this image. This preview image will only be used in the "Preview" page of the template, it is not a fallback. If you want a fallback, please implement it through a custom uploader (see ``carrierwave``'s docs for that). There is no limit of the amount of images you add.
47
+ After that we define the images this newsletter supports. We give it a unique name, the class name of the uploader we will use (the example one is the default one, but you might want to customize this value) and a way to preview this image. This preview image will only be used in the "Preview" page of the template, it is not a fallback. If you want a fallback, please implement it through a custom uploader. There is no limit of the amount of images you add.
48
48
 
49
49
  Finally, we define the attributes for the newsletter. In this case we define a body attribute, which is a translatable text. Whether this text require an editor or not will be defined by the settings cell. We also have a way to preview that attribute. There is no limit on the number of attributes you define.
50
50