Skip to content

Implement focus mode in the budget projects component#14512

Merged
alecslupu merged 12 commits intodevelopfrom
feat/focus-mode-budgets
Apr 15, 2025
Merged

Implement focus mode in the budget projects component#14512
alecslupu merged 12 commits intodevelopfrom
feat/focus-mode-budgets

Conversation

@mllocs
Copy link
Copy Markdown
Contributor

@mllocs mllocs commented Apr 9, 2025

🎩 What? Why?

This PR simplifies the process of voting a budget by introducing a new "path" called focus mode. Overall, this simplifies the UI and guides the user through the steps.

📌 Related Issues

Testing

📷 Screenshots

CleanShot 2025-04-14 at 10 58 58@2x

CleanShot 2025-04-14 at 11 00 39@2x

CleanShot 2025-04-14 at 11 01 37@2x

♥️ Thank you!

github-actions[bot]

This comment was marked as outdated.

@mllocs mllocs self-assigned this Apr 9, 2025
@mllocs mllocs added type: feature project: 2024-developments Barcelona City Council contract labels Apr 9, 2025
github-actions[bot]
github-actions bot previously approved these changes Apr 9, 2025
github-actions[bot]
github-actions bot previously approved these changes Apr 9, 2025
github-actions[bot]
github-actions bot previously approved these changes Apr 10, 2025
github-actions[bot]
github-actions bot previously approved these changes Apr 11, 2025
Copy link
Copy Markdown
Member

@NilHomedes NilHomedes left a comment

Choose a reason for hiding this comment

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

Hi @mllocs, thanks for your effort on this 💪

Here is my review:

Bottom sheet

  • Message in bottom sheet: It seems that in mobile this message is hardcoded and it's not changing according to the rules that admins define.

  • See the message in Desktop (as it should be):
    imatge

  • See the message in mobile:
    imatge

  • Bottom sheet is breaking the list view when the Sticky button is shown.
    photo_2025-04-11_12-41-56

Copies

  • Change copy of the info message. Right now, depending on the voting rules, is:

  • "Start adding projects. Assign at least €750,000 to the projects you want and vote according to your preferences to define the budget." or

  • "Start adding projects. Select at least 3 projects you want and vote according to your preferences to define the budget."
    We want to simplify it by getting rid of the last part of the sentence "to define the budget".

  • In the projects list, we want to change "Select Projects" for "Add projects" to give more consistency across all the terms used.
    imatge

CTA Copy

  • If I'm not verified, I should see the "Start Voting" CTA as "Verify yourself to vote". When I click on the CTA, I'm prompted with the verification form, and then, I can click on the "Start voting" CTA.
    imatge(5)

For this, is important to avoid do something that could cause a performance issue in Decidim. As a lot of people will be visting at the same time this page, and depending on their verification status, the CTA will be rendered on different ways.

Project page

Back button

  • Change the copy for “Back to list”
  • Format del Back button in desktop, should be all in blue.

Design fixes

  • In desktop, on budgets landing page, if I have voted on a budget, the card is broken. It should be with the same width as the others.
    imatge

  • Sticky button “Start voting” is mixed with language selector.
    imatge(7)

Modal messages

  • Primary button. When I have not finish my voting and I click the "Cancel" button on focus mode. The primary CTA should be "Continue Voting", and "Exit Voting" should be a secondary button. Could be apply the proto design? See how it was defined in the prototype:
    imatge

  • Ok Button Wrong behaviour. In this modal, clicking the "Ok" button (that should be "continue voting") is kicking me out of the budget. However, it should keep me in the same page.
    imatge

  • Weird behaviour of modals. It seems there are two modals mixed, that appears randomly. It might be something related to ephemeral users. You have a clue on what could be happening here?

Option a)
Screenshot 2025-04-11 at 13-29-45 Projects for Nou Barris - Page 1 of 1 - Test Site for Lot2

Option b)
imatge

github-actions[bot]
github-actions bot previously approved these changes Apr 11, 2025
@NilHomedes
Copy link
Copy Markdown
Member

NilHomedes commented Apr 14, 2025

Hi @mllocs thanks for all the changes, a few comments:

Regarding this:

If I'm not verified, I should see the "Start Voting" CTA as "Verify yourself to vote". When I click on the CTA, I'm prompted with the verification form, and then, I can click on the "Start voting" CTA.

For the record: We have changed the approach. So after the verification, you are redirected to the project list, where you can start adding projects.

Project page

I'm adding a new request I just detected:

  • If as a visitant, I click on the "Add project" CTA. I should be redirected to the Ephemeral Verification form. Not to the log-in modal.
  • Once I'm verified, I'm being redirected to the project list. However, the expected behavior is that I should be redirected to the Project page again.

github-actions[bot]
github-actions bot previously approved these changes Apr 14, 2025
@mllocs mllocs marked this pull request as ready for review April 14, 2025 09:03
github-actions[bot]
github-actions bot previously approved these changes Apr 14, 2025
@NilHomedes
Copy link
Copy Markdown
Member

Thanks @mllocs, everything working as expected!

Just a small detail:

Following this flow:

If as a visitant, I click on the "Add project" CTA. I should be redirected to the Ephemeral Verification form.
Once I'm verified, I should be redirected to the Project page again.

Now I'm redirected to the project page without focus mode, this can block participants on that page (https://decidim-lot2.populate.tools/processes/branch-highway/f/6/budgets/3/projects/14):
imatge

Instead of this, I should be redirected to the same page but with Focus Mode enabled (https://decidim-lot2.populate.tools/processes/branch-highway/f/6/budgets/3/focus/projects/14):
imatge

github-actions[bot]
github-actions bot previously approved these changes Apr 14, 2025
@mllocs mllocs requested a review from alecslupu April 14, 2025 16:12
@alecslupu
Copy link
Copy Markdown
Contributor

@mllocs could you fix the code climate as well
image

github-actions[bot]
github-actions bot previously approved these changes Apr 15, 2025
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

@mllocs a first round of changes ...

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
github-actions[bot]
github-actions bot previously approved these changes Apr 15, 2025
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

👍 LGTM

merging with codecov failing piepline.

image

@alecslupu alecslupu merged commit 9f88df2 into develop Apr 15, 2025
118 of 119 checks passed
@alecslupu alecslupu deleted the feat/focus-mode-budgets branch April 15, 2025 15:00
@alecslupu alecslupu added this to the 0.31.0 milestone Apr 15, 2025
entantoencuanto added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Apr 22, 2025
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
fblupi added a commit to AjuntamentdeBarcelona/decidim that referenced this pull request May 8, 2025
…ows features (#46)

* Improve registration and verification flow (decidim#13295)

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Maxim Colls <collsmaxim@gmail.com>

* Fix title on spec for the 'Create new proposal' page (decidim#14347)

* Fix title on spec for the 'Create new proposal' page

* Fix another spec

* Remove scopes_select_field from dummy authorization form

* Fix admin pipeline with `welcome_notification_body` spec error (decidim#14475)

* Standardize direct verification for one-time participation (decidim#13579)

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>

* Fix title on spec for the 'Create new proposal' page (decidim#14347)

* Fix title on spec for the 'Create new proposal' page

* Fix another spec

* Remove scope from tests

* Make transferable authorization when duplicate user is ephemeral (decidim#13981)

* Implement share and download buttons in budget successful vote screen (decidim#14283)

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

* Extract success animation to a helper

* Fix HexaPDF dependency (decidim#13834)

* Fix HexaPDF dependency

* Fix Gemfile

* Remove reference to rqrcode

* Update decidim-generators lockfile

* Implement focus mode in the budget projects component (decidim#14512)

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

* Allow customization of focus_mode_back_button text and path and use in projects index

* Define a setting in budgets component to enter in focus mode by default voting budgets

* Hide start voting button if voting is not available

* Hide voting progress box in project show if not in focus mode

* Consider focus mode settings in budgets lists cells

* Adapt tests

* Do not display vote text in budget list item cell if voting is not available

* Set authorization_redirect_path of project vote button to take into account focus mode

* Avoid duplication of button id

* Allow displaying close focus mode or ephemeral session on header with focus mode back button

* Adapt tests

* Add missing i18n strings from ca/es (#49)

* Use focus mode and Vote text regardless the allowed vote status

* Define budget order status view in focus mode

* Redirect to focus mode endpoints when component settings sets focus mode as default

* Fix linter offense

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>

* Remove unused translations

* Fix tests

* Add new strings for the budgets voting phase

* Remove 'Download your vote' from the success page in Budgets

* Fix size in project's title

* Remove unused strings

* Change bold messages in the budget's voting explanation

* Change behavior of the minimum budget so it's minimum projects

* Redirect authorized vote button in projects index to the same page

* Exclude focus navigation links from exit focus warning modal behavior

* Normalize i18n on English locale and make consistent the other translations

* Fix budget detail with "You voted for this" string (decidim#14284)

* Adapt tests

* Add highlighted colors on the different states of the budgets' voting (#55)

* Add highlighted colors on the different states of the budgets' voting

* Improve the message in the finished budget voting

* Fix linter offense

* Remove share button and fix header close button (#56)

* Remove share button and center CTA

* Add title to success page

* Fix placing of the Cancel button in ephemeral/focus modes

* Remove unused strings from i18n-tasks

---------

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Maxim Colls <collsmaxim@gmail.com>
Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Co-authored-by: Andrés Pereira de Lucena <andreslucena@gmail.com>
Co-authored-by: Francisco Bolívar <francisco.bolivar@nazaries.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding focus mode to budgets

3 participants