Skip to content

Create process types to allow filtering Processes by them#8583

Merged
andreslucena merged 41 commits intodevelopfrom
feature/process_types
Mar 9, 2022
Merged

Create process types to allow filtering Processes by them#8583
andreslucena merged 41 commits intodevelopfrom
feature/process_types

Conversation

@entantoencuanto
Copy link
Copy Markdown
Contributor

@entantoencuanto entantoencuanto commented Dec 2, 2021

🎩 What? Why?

This PR:

  • Adds a new Decidim::ParticipatoryProcessType model associated with processes
  • Adds admin management of the model allowing to create, update and destroy participatory process types and assign a process to a type
  • Adds a filter in processes index and process groups processes list block which appears if there is any process type with processes in the corresponding context of other filters search results and only shows the types with processes in the search results of the other filters.
  • Changes the assemblies types filter to behave like the participatory process types filter, hiding it if there is no types with assemblies and listing only the types with assemblies

📌 Related Issues

Link your PR to an issue

Testing

As admin visit the participatory processes section, add some types and assign some processes to them. Go to the front and use the type filter both in global index and groups of processes (remember to enable the participatory processes content block on processes groups landing pages to see the processes and the filter)

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Please add screenshots of the changes you're proposing
Description

♥️ Thank you!

@entantoencuanto entantoencuanto changed the title Feature/process types Create process types to allow filtering Processes by them Dec 2, 2021
@entantoencuanto entantoencuanto force-pushed the feature/process_types branch 5 times, most recently from 4edb57d to d2ab590 Compare December 3, 2021 17:27
@entantoencuanto entantoencuanto marked this pull request as ready for review December 3, 2021 17:43
This includes:
* Admin controller for CRUD
* Admin form
* Admin commands for CRUD
* New permissions for admins
* New admin log presenter
* Admin menu item and views
Now the selection is not affected by changes on the other filters, the
old behavior was confusing showing available types of the current
filter
@aramollis
Copy link
Copy Markdown

📷 Screenshots

Some screenshots of the changes proposed:

In the processes & groups processes list (frontend view):

  1. Participants and visitors can see a new filter drop-down menu "Process type", which shows only the options in which if there is any assigned process. If there is none, the filter is not displayed.
    Captura de pantalla 2021-12-30 a las 23 12 38

In the admin management of the process type (backend view):

  1. Admin users can create, update, and destroy participatory process types just as they can with assembly types from /admin/participatory_process_types:
    Captura de pantalla 2021-12-30 a las 23 13 54

In the admin edit page of each process (backend view):

  1. Admin users can assign a process to a "process type":
    Captura de pantalla 2021-12-30 a las 23 14 33

@entantoencuanto
Copy link
Copy Markdown
Contributor Author

Ready to check, @andreslucena

cc/ @decidim/product

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.

Sorry for the delay on reviewing this one @entantoencuanto
I found some typos. Can you check them?
Also, have you took the AssemblyTypes implementation to make this one? Just trying to understand how easy it'd be to implement the generic SpaceTypes in the future if we need it.
Finally, it'd be great to have a second look on this one as it's a big PR, so I'm invoking @ferblape to review this one

entantoencuanto and others added 6 commits February 18, 2022 12:20
* develop: (134 commits)
  Remove Rectify::Presenter references (#8758)
  Clarify the locales on the list of admins (#8838)
  Fix activity cell disappearing author images (#8826)
  Fix notifications when there is a note proposal in other spaces than processes (#8822)
  Fix accountability text search (#8831)
  Fix displaying hidden meetings in show process page (#8823)
  Fix docs for install-decidim.sh permissions (#8839)
  Fix report moderation for all the spaces (#8813)
  Clarify the comment at the resource search class (#8829)
  Fix displaying hidden related resources (#8812)
  Replace Decidim mentions in UI with 'the platform' (#8827)
  Add natively a .keep file to empty directory to include on git committing (#8830)
  Fix scope validation on initiative's creation (#8755)
  Replace `searchlight` with `ransack` which is already a core dependency (#8748)
  Fix characters not encoded in highlighted participatory process group title (#8820)
  Test ensuring the moderated comments are not computed in stats (#8816)
  Update rails to 6.0.4.6 and puma to 5.6.2 (#8817)
  Fix displaying hidden meetings in processes group's "upcoming meetings" content block (#8818)
  Fix displaying hidden meetings in homepage's "upcoming meetings" content block (#8809)
  Improve "Release Candidates" release docs (#8804)
  ...
…ipatory_processes/admin/participatory_process_types_controller.rb

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

Sorry I missed your comment @andreslucena, I'll take a look ASAP

ferblape
ferblape previously approved these changes Feb 23, 2022
Copy link
Copy Markdown
Contributor

@ferblape ferblape left a comment

Choose a reason for hiding this comment

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

OK to me! @andreslucena it's easy to check in a local development_app but you can also review it in our staging https://decidim.populate.tools/processes?locale=es

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.

Some tiny changes and we're good to go 😄

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
entantoencuanto and others added 4 commits March 2, 2022 13:16
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
* develop: (57 commits)
  Add a subtitle to assemblies and processes pages (#8918)
  Add a subtitle to votings page (#8919)
  Fix profile notifications (#8943)
  Fix email for verification conflict with managed users (#8926)
  Move VAPID keys generators to core (#8923)
  Fix officialized user event missing translations (#8927)
  Fix verification report with multitenants: notify it only to admins of that organization (#8929)
  Fix processes creation form with stats, metrics and announcements (#8925)
  Fix flaky spec in meetings multi-date selectors (#8924)
  Local HTML validator for the CI (#8937)
  Fix translatable presence validator for hyphenated locales (#8795)
  Fix link to docs in initiatives admin (#8921)
  Fix initiatives signatures issues (#8448)
  Fix the meetings export to also include unpublished meetings (#8874)
  Fix heading order in the consultation question page (#8920)
  Fix diff mode selector roles and tabindexes (#8912)
  Fix budget hard dependency and caching flag issues in comments (#8899)
  Fix emoji picker hiding Foundation Abide form errors (#8886)
  Fix logical heading order for the endorsers list (#8892)
  Fix Foundation Abide errors for Rails remote (AJAX) forms (#8889)
  ...
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.

5 participants