Skip to content

Conversation

@antopalidi
Copy link
Member

@antopalidi antopalidi commented Oct 21, 2025

Fixes #478

  • Fixed infinite loading state when proposals require authorization for voting
  • Voting cards now display correctly in mobile sticky buttons
  • Index page now shows voting cards instead of non-functional standard voting button when awesome_voting_manifest is set to voting_cards
  • Added vote counter badge to abstain button
  • Hidden voting cards settings in admin when using default voting manifest
Screenshot 2025-10-24 at 12 38 43 Screenshot 2025-10-24 at 12 55 17 Screenshot 2025-10-23 at 16 31 08

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 51.06383% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.75%. Comparing base (8f12308) to head (89bbc7f).

Files with missing lines Patch % Lines
...cidim_awesome/voting/voting_cards_proposal_cell.rb 23.80% 16 Missing ⚠️
...ecidim/decidim_awesome/proposal_g_cell_override.rb 66.66% 5 Missing ⚠️
...ecidim/decidim_awesome/proposal_l_cell_override.rb 50.00% 1 Missing ⚠️
..._awesome/voting/voting_cards_proposal_vote_cell.rb 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
- Coverage   96.66%   93.75%   -2.91%     
==========================================
  Files         157      158       +1     
  Lines        4082     4086       +4     
==========================================
- Hits         3946     3831     -115     
- Misses        136      255     +119     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@antopalidi antopalidi requested a review from microstudi October 21, 2025 12:39
@microstudi
Copy link
Contributor

microstudi commented Oct 22, 2025

Thanks for this, works beatifully.
While checking it out, I found that we need to fix a couple of more things:

  • The mobile "affix" button:
image
  • The index page, which still show the standard button for voting that does not work, should be like:
Captura de pantalla de 2025-10-22 17-19-00

@antopalidi antopalidi self-assigned this Oct 23, 2025
@antopalidi antopalidi changed the title Fix infinite loading on voting cards when proposal has permissions Fix voting cards infinite loading and refactor templates Oct 24, 2025
@antopalidi antopalidi changed the title Fix voting cards infinite loading and refactor templates Fix voting cards authorization loading and index page display Oct 24, 2025
Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

This is improving!

  • see that some views still look not good, specially in the grid for some same-small screens
Captura de pantalla de 2025-10-27 10-39-40

One solution we could apply is to remove the flex-direction: column from the .vote-block, the it looks much nicer:
Captura de pantalla de 2025-10-27 10-45-54
imatge

  • The "loading" status does not appear in the list
imatge
  • Also, the instructions box does not appear
Captura de pantalla de 2025-10-27 10-43-31

end %>
<% end %>
</div>
<% end %>
Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't be this part the vote_block_for ?

@antopalidi antopalidi requested a review from microstudi October 28, 2025 13:12
Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

I've applied som css corrections.

I've found that in the list view, no title in the modal is shown.
Image

Other things to consider:

  • The Readme file mentions the metadata cell, needs to be updated
  • In this PR, the modal in the list is created as many times as the items in the list. Can we just add one modal and update the content?
  • The VotingCardsProposalCell is too complicated, can we create two cells that inheritht one from the other? let's render one or the other depending on if it is comming from a list or not.
  • There is a problem when you vote on the list, it renders the cell inside the class voting-voting_cards when updates the cell, leading to css mistmaches: Image I think this happens because the file _show_vote_button.html.erb

`

if (proceedButton) {
proceedButton.addEventListener("click", () => {
if (modal.storedAction) {
modal.storedAction.click();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we find the voting container here and add the "loading" class too?

Decidim::Proposals::ProposalVote.include(Decidim::DecidimAwesome::HasVoteWeight)
Decidim::Proposals::ProposalType.include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
Decidim::Proposals::ProposalLCell.include(Decidim::DecidimAwesome::ProposalLCellOverride)
Decidim::Proposals::ProposalGCell.include(Decidim::DecidimAwesome::ProposalGCellOverride)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add this to the checksum.yml

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect handling of verification for voting cards

3 participants