Vote on proposal from listing page#13883
Conversation
There was a problem hiding this comment.
@alecslupu I finished reviewing this, and have tried to be as systematic as possible so as not to miss any details or variations. I think with these changes it will be ready but if in doubt in the figma are all the elements:
General
- 'Already voted' missing 'check' icon (see Figma)
- With supports enabled and blocked, the button should be displayed as disabled (see Figma)
- Design breaks when clicking on button


- In Show pages appear two CTAs

Both desktop and mobile | votes enabled / with or without threshold
Card view
List view
decidim-proposals/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb
Outdated
Show resolved
Hide resolved
|
@andreslucena , this is ready for another round. |
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>
|
@alecslupu @andreslucena I think this PR introduced a bug. The proposal cell is used in a meeting page when a meeting has linked proposals. It throws an exception because it is trying to access |
Can you gimme a stacktrace, or add a |
I have added the fix on #14244 |
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>
* Added vote on proposals listing page * Run linter * Fixed tests * Run linter * Refactor for proposal cards vote button * Changed markup * Updated test file to current markup * add styling for listing and grid view * Added class on progress-bar container * styling for grid and listing with and without progress bar * code refactor and small styling fixes * change layout for votes on proposals with votes limit * Added class when votes counter is hidden * design changes for votes hidden * css fixes * Run linter * Fixed test * Refactoring code * Run prettier * changes after review * Final fixes * Fix proposals * Fix failing specs * Add specs * Finish specs * Refactor css * Refactor js selector * Run linters * Refactor remaining votes counter to data attribute --------- Co-authored-by: andra-panaite <andra.panaite@tremend.com> Co-authored-by: MariaDascaluPublicis <maria.dascalu@publicissapient.com>



🎩 What? Why?
This PR reintroduces the functionality of voting a proposal directly from index page.
📌 Related Issues
Link your PR to an issue
Testing
📷 Screenshots
Please add screenshots of the changes you are proposing
