Skip to content

Fix proposal listing on space's index content block#14035

Merged
andreslucena merged 6 commits intodevelopfrom
fix/proposal-voting
Feb 11, 2025
Merged

Fix proposal listing on space's index content block#14035
andreslucena merged 6 commits intodevelopfrom
fix/proposal-voting

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

🎩 What? Why?

While trying to review #14030, i have noticed that on nightly, we get the following layout:
image

This PR hides the voting component in the highlighted proposals cell to respect the previous layout.

While trying on my local, i have noticed that the page is raising an error

📌 Related Issues

Link your PR to an issue

Testing

  1. Login as admin, visit the admin panel
  2. In participatory processes admin, navigate to a single process and enable the proposal content block
  3. Visit the component and make sure votes are enabled
  4. Visit the process about page, see the error / the layout
  5. Apply patch
  6. Refresh and see the error is not there.

📷 Screenshots

Please add screenshots of the changes you are proposing
Description

♥️ Thank you!

@alecslupu alecslupu added the no-backport Pull Requests that should not be backported label Feb 8, 2025
@github-actions github-actions bot added module: proposals type: fix PRs that implement a fix for a bug labels Feb 8, 2025
github-actions[bot]
github-actions bot previously approved these changes Feb 8, 2025
github-actions[bot]
github-actions bot previously approved these changes Feb 8, 2025
@alecslupu alecslupu marked this pull request as ready for review February 9, 2025 15:49
github-actions[bot]
github-actions bot previously approved these changes Feb 10, 2025
@andreslucena andreslucena changed the title Fix proposal listing on Process Space Page Fix proposal listing on space's index content block Feb 10, 2025
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.

I see that this is indeed fixing the issue, but instead of the issue that you've found, I'm also seeing a 500 error in develop related to this content block:

ActionView::Template::Error (undefined local variable or method `current_settings' for an instance of Decidim::Proposals::ProposalLCell):
    32:     <% active_content_blocks.each do |content_block| %>
    33:       <% next unless content_block.manifest %>
    34:
    35:       <%= cell content_block.manifest.cell, content_block %>
    36:     <% end %>
    37:
    38:   </div>

activesupport (7.0.8.4) lib/active_support/core_ext/module/delegation.rb:307:in `method_missing'
/home/apereira/Work/decidim/decidim/decidim-proposals/app/cells/decidim/proposals/proposal_l/show.erb:8:in `__tilt_60240'
tilt (2.6.0) lib/tilt/template.rb:394:in `bind_call'

This is actually fixed with your PR, but can you do a spec for this case? Ideally this should be in decidim-proposals/spec/cells/decidim/proposals/highlighted_proposals_for_component_cell_spec.rb (but if you can't reproduce it there then I guess we can do a system spec)

@alecslupu
Copy link
Copy Markdown
Contributor Author

alecslupu commented Feb 11, 2025

I see that this is indeed fixing the issue, but instead of the issue that you've found, I'm also seeing a 500 error in develop related to this content block:

This is exactly the issue i have found while trying to develop. Later on, i realized that anything else of the exception, is just a proposal cell cache.

github-actions[bot]
github-actions bot previously approved these changes Feb 11, 2025
@alecslupu
Copy link
Copy Markdown
Contributor Author

@andreslucena this should be ready for another round.

@andreslucena andreslucena merged commit d837828 into develop Feb 11, 2025
@andreslucena andreslucena deleted the fix/proposal-voting branch February 11, 2025 12:55
antopalidi pushed a commit to openpoke/decidim that referenced this pull request Feb 12, 2025
* Fix proposal listing on Process Space Page

* Add cache key to show/hide voting

* Add specs

* Fix Spelling
mllocs pushed a commit that referenced this pull request Feb 13, 2025
* Fix proposal listing on Process Space Page

* Add cache key to show/hide voting

* Add specs

* Fix Spelling
andreslucena pushed a commit that referenced this pull request Mar 3, 2025
* Fix proposal listing on Process Space Page

* Add cache key to show/hide voting

* Add specs

* Fix Spelling
alecslupu added a commit to i-need-another-coffee/decidim that referenced this pull request Mar 6, 2025
* Fix proposal listing on Process Space Page

* Add cache key to show/hide voting

* Add specs

* Fix Spelling
fblupi pushed a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Mar 31, 2025
* Fix proposal listing on Process Space Page

* Add cache key to show/hide voting

* Add specs

* Fix Spelling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: proposals no-backport Pull Requests that should not be backported type: fix PRs that implement a fix for a bug

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants