diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index cc5a6d00c69d9..4f6416f022576 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -17,14 +17,14 @@ rbenv local 3.2.2 If not, you need to adapt it to your environment. See "2.1. Ruby update to 3.2" -### 2.1. Update your Gemfile +### 1.2. Update your Gemfile ```ruby gem "decidim", github: "decidim/decidim" gem "decidim-dev", github: "decidim/decidim" ``` -### 2.2. Run these commands +### 1.3. Run these commands ```console bundle update decidim @@ -32,7 +32,7 @@ bin/rails decidim:upgrade bin/rails db:migrate ``` -### 2.3. Follow the steps and commands detailed in these notes +### 1.4. Follow the steps and commands detailed in these notes ## 2. General notes @@ -47,6 +47,12 @@ We have updated the Rails version to 7.0.8.1. You do not need to do anything. You can read more about this change on PR [#12616](https://github.com/decidim/decidim/pull/12616). +## 2.3. Removal of the accountability naming customization + +We have removed the ability to customize the labels from the Accountability component, as it was not following the recommended way of handling these text customizations. If you want to migrate your current customizations, you can read about [Text customizations in Decidim Documentation](https://docs.decidim.org/en/develop/customize/texts) + +You can read more about this change on PR [#12853](https://github.com/decidim/decidim/pull/12853). + ## 3. One time actions These are one time actions that need to be done after the code is updated in the production database. @@ -181,7 +187,41 @@ You can read more about this change on PR [\#XXXX](https://github.com/decidim/de ## 5. Changes in APIs -### 5.1. [[TITLE OF THE CHANGE]] +### 5.1 Migration of Proposal states in own table + +As of [\#12052](https://github.com/decidim/decidim/pull/12052) all the proposals states are kept in a separate database table, enabling end users to customize the states of the proposals. By default we will create for any proposal component that is being installed in the project 5 default states that cannot be disabled nor deleted. These states are: + +- Not Answered ( default state for any new created proposal ) +- Evaluating +- Accepted +- Rejected +- Withdrawn ( special states for proposals that have been withdrawn by the author ) + +For any of the above states you can customize the name, description, css class used by labels. You can also decide which states the user can receive a notification or an answer. + +You do not need to run any task to migrate the existing states, as we will automatically migrate the existing states to the new table. + +You can see more details about this change on PR [\#12052](https://github.com/decidim/decidim/pull/12052) + +### 5.2. Seeds require assets precompiling + +In order to successfully showcase the features of the application, we have added as a mandatory step the assets precompiling, as the seeds will now fire the notification system. That allows any Decidim demo instance to display user notifications. + +if you previously seeded your database using: + +```bash +bin/rails db:drop db:create db:migrate db:seed +``` + +You are required to run using: + +```bash +bin/rails db:drop db:create db:migrate assets:precompile db:seed +``` + +You can see more details about this change on PR [\#12828](https://github.com/decidim/decidim/pull/12828) + +### 5.3. [[TITLE OF THE CHANGE]] In order to [[REASONING (e.g. improve the maintenance of the code base)]] we have changed... @@ -198,19 +238,3 @@ You need to change it to: # Explain the usage of the API as it is in the new version result = 1 + 1 if after ``` - -### 5.8 Migration of Proposal states in own table - -As of [\#12052](https://github.com/decidim/decidim/pull/12052) all the proposals states are kept in a separate database table, enabling end users to customize the states of the proposals. By default we will create for any proposal component that is being installed in the project 5 default states that cannot be disabled nor deleted. These states are: - -- Not Answered ( default state for any new created proposal ) -- Evaluating -- Accepted -- Rejected -- Withdrawn ( special states for proposals that have been withdrawn by the author ) - -For any of the above states you can customize the name, description, css class used by labels. You can also decide which states the user can receive a notification or an answer. - -You do not need to run any task to migrate the existing states, as we will automatically migrate the existing states to the new table. - -You can see more details about this change on PR [\#12052](https://github.com/decidim/decidim/pull/12052) diff --git a/decidim-accountability/app/cells/decidim/accountability/status_cell.rb b/decidim-accountability/app/cells/decidim/accountability/status_cell.rb index cd787ac1153af..6d9caaddab06a 100644 --- a/decidim-accountability/app/cells/decidim/accountability/status_cell.rb +++ b/decidim-accountability/app/cells/decidim/accountability/status_cell.rb @@ -75,12 +75,7 @@ def display_count(count) end def heading_parent_level_results(count) - text = translated_attribute(component_settings.heading_parent_level_results).presence - if text - pluralize(count, text) - else - t("results.count.results_count", scope: "decidim.accountability", count:) - end + t("results.count.results_count", scope: "decidim.accountability", count:) end def render_count diff --git a/decidim-accountability/app/events/decidim/accountability/base_result_event.rb b/decidim-accountability/app/events/decidim/accountability/base_result_event.rb index 3f14f856b3e0d..083d3c9f6e039 100644 --- a/decidim-accountability/app/events/decidim/accountability/base_result_event.rb +++ b/decidim-accountability/app/events/decidim/accountability/base_result_event.rb @@ -20,6 +20,10 @@ def proposal_path def proposal @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id]) end + + def hidden_resource? + super || (proposal.respond_to?(:hidden?) && proposal.hidden?) + end end end end diff --git a/decidim-accountability/app/helpers/decidim/accountability/application_helper.rb b/decidim-accountability/app/helpers/decidim/accountability/application_helper.rb index 74ee3c065d1ed..bb12d9f4c51a2 100644 --- a/decidim-accountability/app/helpers/decidim/accountability/application_helper.rb +++ b/decidim-accountability/app/helpers/decidim/accountability/application_helper.rb @@ -18,14 +18,6 @@ def component_name (defined?(current_component) && translated_attribute(current_component&.name).presence) || t("decidim.components.accountability.name") end - def categories_label - translated_attribute(component_settings.categories_label).presence || t("results.home.categories_label", scope: "decidim.accountability") - end - - def subcategories_label - translated_attribute(component_settings.subcategories_label).presence || t("results.home.subcategories_label", scope: "decidim.accountability") - end - def filter_items_for(participatory_space:, category:) [ { diff --git a/decidim-accountability/app/views/decidim/accountability/results/_home_categories.html.erb b/decidim-accountability/app/views/decidim/accountability/results/_home_categories.html.erb index f8af1c6a87702..b5938eaf01a43 100644 --- a/decidim-accountability/app/views/decidim/accountability/results/_home_categories.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/results/_home_categories.html.erb @@ -9,12 +9,12 @@ ) %>