Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New budgets administration and front views #4198

Closed
wants to merge 6 commits into from
Closed

Conversation

decabeza
Copy link
Collaborator

@decabeza decabeza commented Oct 12, 2020

Objectives

This PR refactor and redesign the Participative Budgets. This code introduces a lot of changes for the administration panel and the user's front views.

Here is the list of the most relevant changes. Don't miss the screenshots in the Visual Changes section! 😌

Participatory budgets creation by steps

Now it's possible to create budgets with "single heading" and "multiple headings" Now, the creation of the budget, is divided by steps: budget > group > heading > phases.

Refactor participatory budgets in draft mode

Previously the draft mode was a phase of the PB, but that had some limitations.

Now the phase drafting disappears, and the PB can have the status published or not published (in draft mode).

That will give more flexibility to navigate through the different phases and see how it looks for administrators before
publishing the PB, and everybody can see.

By default, the PB is in draft mode, so it gives you the flexibility to adjust and modify anything before publishing it.

Groups and headings CRUD from budget view

Before, users needed to navigate to the list of groups to add, edit, or delete a group.

Also, they need to navigate to the list of groups first, and then to the list of headings for that group to add, edit, or delete a heading.

Now, it's possible to do all these actions for any group or heading from the participatory budget view to bring simplicity and to reduce the number of clicks from a user perspective.

Unify budget landing pages

There was a big difference between the current budget and a specific budget landing page, and this didn't make too much sense. Also, it was not possible to know how a draft participatory budget will look before publishing.

By unifying those two views now they will look quite similar, and it will be possible for administrators to preview any draft budget and to know how the budget will look like before actually publishing it.

Other changes in participatory budgets

  • Add a button to budget with a custom URL.
  • Ability to attach an image to the budgets.
  • Add a button to each phase of the budgets.
  • Ability to edit the name of the budget phases.
  • Ability to attach an image to budget phases.
  • Show results and stats settings only in budget edit view.
  • Allow users to remove their supports on budget investments during selecting phase.

At last but not least

A new design for the admin and front views! 🎉

Visual Changes

WIP more upcoming gifs soon! 🎨

Admin panel budgets index

admin_panel_1

Admin panel budgets edit

admin_panel_2

New front view for the users

front

spec/rails_helper.rb Outdated Show resolved Hide resolved
spec/models/budget_spec.rb Outdated Show resolved Hide resolved
app/models/abilities/administrator.rb Outdated Show resolved Hide resolved
app/assets/stylesheets/participation.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/participation.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/participation.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/participation.scss Outdated Show resolved Hide resolved
@decabeza decabeza force-pushed the admin_budgets branch 2 times, most recently from b8aa5ce to d426f65 Compare October 13, 2020 09:44
@decabeza decabeza force-pushed the admin_budgets branch 2 times, most recently from 8ca5a5c to f1d698b Compare October 21, 2020 11:12
@javierm javierm force-pushed the admin_budgets branch 4 times, most recently from 5493486 to b273fb5 Compare February 15, 2021 19:23
.table-actions {
margin-top: rem-calc(26);

> :first-child {

Choose a reason for hiding this comment

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

Nesting should be no greater than 4, but was 5

.table-actions {
margin-top: rem-calc(26);

> :first-child {

Choose a reason for hiding this comment

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

Selector should have depth of applicability no greater than 5, but was 6

margin-left: rem-calc(3);;
}

> :not(:first-child) {

Choose a reason for hiding this comment

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

Nesting should be no greater than 4, but was 5

margin-left: rem-calc(3);;
}

> :not(:first-child) {

Choose a reason for hiding this comment

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

Selector should have depth of applicability no greater than 5, but was 6

margin-top: rem-calc(26);

> :first-child {
margin-left: rem-calc(3);;

Choose a reason for hiding this comment

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

Declaration should be terminated by a single semicolon

@javierm javierm changed the base branch from master to remove-supports June 14, 2021 13:04
@javierm javierm force-pushed the admin_budgets branch 2 times, most recently from 8690efc to 3a23f55 Compare June 14, 2021 13:14
Base automatically changed from remove-supports to master June 14, 2021 13:50
@taitus taitus mentioned this pull request Jul 5, 2021
decabeza and others added 6 commits September 1, 2021 22:42
Note one of the tests dealing with random results is a bit flaky; since
it's a permutation selecting 7 objects out of 12, it will fail about
once every 4 million times. We think this is acceptable.

Co-Authored-By: Julian Nicolas Herrero <microweb10@gmail.com>
Co-authored-by: decabeza <alberto@decabeza.es>
Co-Authored-By: Julian Nicolas Herrero <microweb10@gmail.com>
@javierm
Copy link
Member

javierm commented Oct 17, 2021

I think the only pending pull request related to this one is pull request #4686, so closing this one.

Thank you @decabeza @microweb10 @Senen @taitus! 🎉

@javierm javierm closed this Oct 17, 2021
@javierm javierm deleted the admin_budgets branch October 17, 2021 15:58
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.

None yet

4 participants