From 8389e5e96129fe3f1340b952dfa732b957b181e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 28 Jul 2023 10:01:19 +0200 Subject: [PATCH] Reorder and renumber the RELEASES_NOTES (#11379) * Move 'Configuration parameter change' to 'Changes in APIs' section * Add exception explanation on `decidim-consultations` removal instructions * Move 'Note for development' explanation to the correct place * Fix numerations of titles * Fix timestamp in DB migration Suggested by code review Co-authored-by: Alexandru Emil Lupu --------- Co-authored-by: Alexandru Emil Lupu --- RELEASE_NOTES.md | 111 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 32 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1df5789bb293..88e2160d2e84 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -23,15 +23,6 @@ bin/rails db:migrate ### 1.3. Follow the steps and commands detailed in these notes -#### 1.3.1 Configuration parameter change - -Prior to 0.28, there was the possibility of configuring a list of disallowed passwords using the configuration parameter `Decidim.password_blacklist` or the environment variable `DECIDIM_PASSWORD_BLACKLIST`. These methods have been renamed as follows: - -- `Decidim.password_blacklist` becomes `Decidim.denied_passwords` -- `DECIDIM_PASSWORD_BLACKLIST` becomes `DECIDIM_DENIED_PASSWORDS` - -You can read more about this change on PR [\#10288](https://github.com/decidim/decidim/pull/10288). - ## 2. General notes ## 2.1. Redesign @@ -50,6 +41,53 @@ If you're not using it, then you don't need to do anything. If you're maintaining a version of this module, please share the URL of the git repository by [creating an issue on the decidim.org website repository](https://github.com/decidim/decidim.org) so that we can update the [Modules page](https://decidim.org/modules). +There's an error with the migrations after you've removed this module, you'd need to change them like this: + +### db/migrate/*_add_commentable_counter_cache_to_consultations.decidim_consultations.rb + +```ruby +# frozen_string_literal: true +# This migration comes from decidim_consultations (originally 20200827154143) + +class AddCommentableCounterCacheToConsultations < ActiveRecord::Migration[5.2] + class Question < ApplicationRecord + self.table_name = :decidim_consultations_questions + end + + def change + add_column :decidim_consultations_questions, :comments_count, :integer, null: false, default: 0, index: true + Question.reset_column_information + Question.find_each(&:update_comments_count) + end +end +``` + +### db/migrate/*_add_followable_counter_cache_to_consultations.decidim_consultations.rb + +```ruby +# frozen_string_literal: true +# This migration comes from decidim_consultations (originally 20210310120626) + +class AddFollowableCounterCacheToConsultations < ActiveRecord::Migration[5.2] + class Question < ApplicationRecord + self.table_name = :decidim_consultations_questions + end + + def change + add_column :decidim_consultations_questions, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Question.reset_column_information + Question.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end +``` + You can read more about this change on PR [#11171](https://github.com/decidim/decidim/pull/11171). ## 3. One time actions @@ -100,7 +138,7 @@ In some other cases when you run your application on a custom port (other than 3 You can read more about this change on PR [\#10519](https://github.com/decidim/decidim/pull/10519). -### 3.3. User moderation panel changes +### 3.4. User moderation panel changes In older Decidim installations, when blocking an user directly from the participants menu, without being previously reported, it will hide that user, making it unavailable in the Reported Participants section. You will need to run this command once to make sure there are no users or entities that got blocked but are not visible in the participants listing. @@ -110,7 +148,7 @@ bundle exec rake decidim:upgrade:moderation:fix_blocked_user_panel You can read more about this change on PR [\#10521](https://github.com/decidim/decidim/pull/10521). -### 3.4. Change Webpacker to Shakapacker +### 3.5. Change Webpacker to Shakapacker Since the Rails team has retired the Webpacker in favour or importmap-rails or js-bundling, we got ouserlves in a situation where performance improvements could not be performed. In order to continue having support for Webpacker like syntax, we have switched to Shakapacker. @@ -136,7 +174,23 @@ bundle exec rake decidim:webpacker:install This will make the necessary changes in the `config/webpacker.yml`, but also in the `config/webpack/` folder. -### 3.5. Initialize content blocks on spaces or resources with landing page +#### Note for development + +If you are using the `Procfile.dev` file, you will need to make sure that you have the following line in your configuration. If you have not altered the `Procfile.dev` file, you will not need to do anything, as we covered that part: + +```console +webpacker: ./bin/webpacker-dev-server +``` + +In order to run your development server, you will need to run the following command: + +```console +./bin/dev +``` + +You can read more about this change on PR [\#10389](https://github.com/decidim/decidim/pull/10389). + +### 3.6. Initialize content blocks on spaces or resources with landing page The processes and assemblies participatory spaces have changed the show page and now is composed using content blocks. For the new spaces created in this version a callback is executed creating the content blocks marked as `default!` in the engine for the corresponding homepage scope. To have the same initialization in the existing spaces there is a task to generate those blocks if not present already. Run the below command to generate default content blocks when not present for all spaces and resources with content blocks homepage (participatory processes, participatory process groups and assemblies): @@ -156,29 +210,13 @@ For example, to generate the default content blocks and also the components bloc bundle exec rake decidim:content_blocks:initialize_default_content_blocks[,,true] ``` -#### Note for development - -If you are using the `Procfile.dev` file, you will need to make sure that you have the following line in your configuration. If you have not altered the `Procfile.dev` file, you will not need to do anything, as we covered that part: - -```console -webpacker: ./bin/webpacker-dev-server -``` - -In order to run your development server, you will need to run the following command: - -```console -./bin/dev -``` - -You can read more about this change on PR [\#10389](https://github.com/decidim/decidim/pull/10389). - -### 3.5. Graphql upgrade +### 3.7. Graphql upgrade In [\#10606](https://github.com/decidim/decidim/pull/10606) we have upgraded the GraphQL gem to version 2.0.19. This upgrade introduces some breaking changes, so you will need to update your GraphQL queries to match the new API. This change should be transparent for most of the users, but if you have custom GraphQL queries, you will need to update them. Also, please note, there might be some issues with community plugins that offer support for GraphQL, so you might need to update them as well. Please see the [change log](https://github.com/rmosolgo/graphql-ruby/blob/master/CHANGELOG.md) for graphql gem for more information. -### 3.6. Orphans valuator assignments cleanup +### 3.8. Orphans valuator assignments cleanup We have added a new task that helps you clean the valuator assignements records of roles that have been deleted. @@ -190,7 +228,7 @@ bundle exec rake decidim:proposals:upgrade:remove_valuator_orphan_records You can see more details about this change on PR [\#10607](https://github.com/decidim/decidim/pull/10607) -### 3.7. Initiatives pages exception fix +### 3.9. Initiatives pages exception fix We have added a new tasks to fix a bug related to the pages component inside of the Initiatives module (`decidim-initiatives`). @@ -202,7 +240,7 @@ bundle exec rake decidim:initiatives:upgrade:fix_broken_pages You can see more details about this change on PR [\#10928](https://github.com/decidim/decidim/pull/10928) -### 3.7. Add Content Security Policy (CSP) support +### 3.10. Add Content Security Policy (CSP) support We have introduced support for Content Security Policy (CSP). This is a security feature that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. By default, the CSP is enabled, and is configured to be as restrictive as possible, having the following default configuration: @@ -659,3 +697,12 @@ end ``` You can read more about this change at PR [\#10760](https://github.com/decidim/decidim/pull/10760). + +### 5.5. Configuration parameter change + +Prior to 0.28, there was the possibility of configuring a list of disallowed passwords using the configuration parameter `Decidim.password_blacklist` or the environment variable `DECIDIM_PASSWORD_BLACKLIST`. These methods have been renamed as follows: + +- `Decidim.password_blacklist` becomes `Decidim.denied_passwords` +- `DECIDIM_PASSWORD_BLACKLIST` becomes `DECIDIM_DENIED_PASSWORDS` + +You can read more about this change on PR [\#10288](https://github.com/decidim/decidim/pull/10288).