Skip to content

Vote on proposal from listing page#13883

Merged
andreslucena merged 38 commits intodecidim:developfrom
i-need-another-coffee:feature/vote-on-proposal
Feb 6, 2025
Merged

Vote on proposal from listing page#13883
andreslucena merged 38 commits intodecidim:developfrom
i-need-another-coffee:feature/vote-on-proposal

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Jan 20, 2025

🎩 What? Why?

This PR reintroduces the functionality of voting a proposal directly from index page.

📌 Related Issues

Link your PR to an issue

Testing

  1. Login as a admin
  2. Visit a proposal component and configure various voting params
  3. See component index page
  4. See that proposal cards are displaying voting options
  5. Try to vote
  6. See the voting is reflected in proposal show page
  7. See the voting is changing all the other boxes

📷 Screenshots

Please add screenshots of the changes you are proposing
Description

♥️ Thank you!

github-actions[bot]
github-actions bot previously approved these changes Jan 20, 2025
Copy link
Copy Markdown
Member

@carolromero carolromero left a comment

Choose a reason for hiding this comment

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

@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
    image
    image
  • In Show pages appear two CTAs
    image

Both desktop and mobile | votes enabled / with or without threshold

Card view

  • Change button width (W164)
  • Change grey area height (H68)
  • Align votes counter
    image

List view

  • Change button width (W164)
  • Change grey area height (H68)
  • Change grey area width (W196)
    image

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

@andreslucena , this is ready for another round.

@andreslucena andreslucena changed the title Vote on proposal from homepage Vote on proposal from listing page Feb 6, 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.

lgtm-3

@andreslucena andreslucena merged commit ca550e5 into decidim:develop Feb 6, 2025
antopalidi pushed a commit to openpoke/decidim that referenced this pull request Feb 12, 2025
* 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>
mllocs pushed a commit that referenced this pull request Feb 13, 2025
* 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>
andreslucena pushed a commit that referenced this pull request Mar 3, 2025
* 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 alecslupu deleted the feature/vote-on-proposal branch March 6, 2025 00:59
alecslupu added a commit to i-need-another-coffee/decidim that referenced this pull request Mar 6, 2025
* 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>
@mllocs
Copy link
Copy Markdown
Contributor

mllocs commented Mar 6, 2025

@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 votes_hidden? in the wrong settings.

undefined method `votes_hidden?' for an instance of #<Class:0x00007f377bc37800>

@alecslupu
Copy link
Copy Markdown
Contributor Author

@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 votes_hidden? in the wrong settings.

undefined method `votes_hidden?' for an instance of #<Class:0x00007f377bc37800>

Can you gimme a stacktrace, or add a , hide_voting: true to your exception place

@alecslupu alecslupu mentioned this pull request Mar 6, 2025
@alecslupu
Copy link
Copy Markdown
Contributor Author

Can you gimme a stacktrace, or add a , hide_voting: true to your exception place

I have added the fix on #14244

fblupi pushed a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Mar 31, 2025
* 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>
microstudi pushed a commit to openpoke/decidim that referenced this pull request Mar 10, 2026
* 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>
@microstudi microstudi mentioned this pull request Mar 10, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Vote on proposals from list page

6 participants