Skip to content

Fix render partial deprecation warning on proposals#12035

Merged
andreslucena merged 12 commits intodevelopfrom
chore/fix-deprecations
Nov 22, 2023
Merged

Fix render partial deprecation warning on proposals#12035
andreslucena merged 12 commits intodevelopfrom
chore/fix-deprecations

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Nov 20, 2023

🎩 What? Why?

In the action pipeline there are a lot of deprecation warnings, having the following structure:

DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: decidim/proposals/proposals/_proposals_picker.html.erb (called from decidim_form_for at /home/runner/work/decidim/decidim/decidim-core/app/helpers/decidim/decidim_form_helper.rb:34)
DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: decidim/proposals/proposals/_proposals_picker.html.erb (called from decidim_form_for at /home/runner/work/decidim/decidim/decidim-core/app/helpers/decidim/decidim_form_helper.rb:34)
DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: decidim/proposals/proposals/_proposals_picker.html.erb (called from decidim_form_for at /home/runner/work/decidim/decidim/decidim-core/app/helpers/decidim/decidim_form_helper.rb:34)
DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: decidim/proposals/proposals/_proposals_picker.html.erb (called from decidim_form_for at /home/runner/work/decidim/decidim/decidim-core/app/helpers/decidim/decidim_form_helper.rb:34)

This PR tries to fix this.

Testing

Pipeline should be green
The actions should not broadcast any other deprecation warnings as the one mentioned:

  • Accountability
  • Meetings
  • Budgets

📷 Screenshots

Please add screenshots of the changes you are proposing
image

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['type: feature', 'type: change', 'type: fix', 'type: removal', 'target: developer-experience', 'type: internal']

@alecslupu alecslupu marked this pull request as ready for review November 21, 2023 09:05
@alecslupu alecslupu added type: internal PRs that aren't necessary to add to the CHANGELOG for implementers target: developer-experience labels Nov 21, 2023
@alecslupu alecslupu requested a review from a team November 21, 2023 09:05
github-actions[bot]
github-actions bot previously approved these changes Nov 21, 2023
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! I got to admit that I think that I've introduced one of these just the past week with initiatives signatures 😅

I think I found some more, can you check it out?

  • decidim-core/app/views/decidim/application/_collection.html.erb
    19: <%= render partial: "decidim/application/document.html", locals: { document: } %>
  • decidim-initiatives/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb
    1:<%= render partial: "signatures.html.erb", locals: {

Then I think I found even more but as far as I these aren't even on the logs as they're from cells. I'd want to fix them in either case, to have consistency:

$ rg "partial: (.*).html\"" decidim*/app/ | grep -v formats
decidim-core/app/cells/decidim/user_conversations/show.erb:      <%= render partial: "decidim/messaging/conversations/conversation.html", locals: { conversation:, nickname: } %>
decidim-core/app/cells/decidim/user_conversations/new_conversation_button.erb:    <%= render partial: "decidim/messaging/conversations/add_conversation_users.html" %>
decidim-core/app/cells/decidim/newsletter_templates/basic_only_text/show.erb:                    <%= render partial: "layouts/decidim/mailer_logo.html", locals: { organization:, custom_url_for_mail_root: } %>
decidim-core/app/cells/decidim/linked_resources_for/show.erb:  <%= render partial: "#{klass.constantize.resource_manifest.template}.html", locals: { resources: } %>
decidim-core/app/cells/decidim/documents_panel/show.erb:<%= render partial: "decidim/application/documents.html", locals: { documents: } %>
decidim-core/app/cells/decidim/newsletter_templates/image_text_cta/show.erb:                    <%= render partial: "layouts/decidim/mailer_logo.html", locals: { organization:, custom_url_for_mail_root: } %>
decidim-core/app/cells/decidim/user_conversation/messages.erb:<%= render partial: "decidim/messaging/conversations/messages.html", locals: { sender:, messages: } %>
decidim-core/app/views/decidim/application/_collection.html.erb:      <%= render partial: "decidim/application/document.html", locals: { document: } %>
decidim-meetings/app/cells/decidim/meetings/dates_and_map/static_map.erb:<%= render partial: "decidim/shared/static_map.html", locals: { geolocalizable: meeting } %>
decidim-comments/app/cells/decidim/comments/comment/deletion_data.erb:<%= render partial: "decidim/comments/comments/delete.html", locals: { comment: model } %>
decidim-comments/app/cells/decidim/comments/comment/moderation_data.erb:<%= render partial: "decidim/comments/comments/moderated.html", locals: { comment: model } %>
decidim-budgets/app/cells/decidim/budgets/budgets_list/main_list.erb:<%= render partial: "decidim/shared/orders.html", locals: { orders: AVAILABLE_ORDERS, i18n_scope: "decidim.budgets.projects.orders" } %>

github-actions[bot]
github-actions bot previously approved these changes Nov 21, 2023
…/index.js.erb

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
github-actions[bot]
github-actions bot previously approved these changes Nov 21, 2023
@andreslucena
Copy link
Copy Markdown
Member

@alecslupu heads-up, we have a broken build

@alecslupu
Copy link
Copy Markdown
Contributor Author

@alecslupu heads-up, we have a broken build

Already working on it ...

github-actions[bot]
github-actions bot previously approved these changes Nov 21, 2023
github-actions[bot]
github-actions bot previously approved these changes Nov 21, 2023
@andreslucena
Copy link
Copy Markdown
Member

@alecslupu FYI there's still a relevant failing spec here 😃

@alecslupu
Copy link
Copy Markdown
Contributor Author

@alecslupu FYI there's still a relevant failing spec here 😃

@andreslucena another round ?

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect-nice

@andreslucena andreslucena merged commit 757b3af into develop Nov 22, 2023
@andreslucena andreslucena deleted the chore/fix-deprecations branch November 22, 2023 16:00
@andreslucena
Copy link
Copy Markdown
Member

@alecslupu should we backport this one? I'm thinking in the pollution of the logs/CI, and that this should not be difficult to backport, although it can get a bit tricky if we find new partials on v0.27.

What do you think?

@alecslupu
Copy link
Copy Markdown
Contributor Author

@alecslupu should we backport this one? I'm thinking in the pollution of the logs/CI, and that this should not be difficult to backport, although it can get a bit tricky if we find new partials on v0.27.

What do you think?

I would say to skip it :)

Let's focus on cleaning up the 0.28 pipeline... as there are some other things that are bugging me ( static_map 500 errors, Some find( count: 1) on capybara, some CSP errors and also a lot of JS errors ... ) . If we clean those, it may easier to spot pipeline issues in the future.

entantoencuanto added a commit that referenced this pull request Nov 27, 2023
* develop: (51 commits)
  Fix a11y violations and title layout on announcements (#12067)
  Fix randomness on nickname and emails for seeded users (#12058)
  Fix render partial deprecation warning on proposals (#12035)
  Redesign: proposal counter total number avaliable (#12014)
  Fix disabling access to space private users when the space is public (#12031)
  Redesign: admin screen overflow on smaller screens (#11956)
  Make the breadcrumb consistent in the components import pages (#12024)
  Fix develop branch (#12051)
  Create the IconRegistry (#11982)
  Fix process groups component content blocks (#11872)
  Remove the asemblies settings page (#11873)
  Fix n+1 query on assemblies permissions (#12040)
  Remove unused scope filter from search controller and command (#12038)
  Fix issues in "Verify your identity" (#12030)
  Fix flash of dropdowns in buttons from the title bar and "Manage" button (#12011)
  Add CI workflow configuration for decidim-design (#12022)
  Extract methods from participatory processes seeds (#12032)
  Show message when there are no debates (#12037)
  Show error message when there are no budgets nor projects in budgets (#12034)
  Fix faker requirement in production environment 2 (#12033)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target: developer-experience type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants