Skip to content

Add assemblies & processes weight field#7283

Merged
mrcasals merged 8 commits intodecidim:developfrom
CodiTramuntana:feature/assembly_and_process_ordering
Feb 17, 2021
Merged

Add assemblies & processes weight field#7283
mrcasals merged 8 commits intodecidim:developfrom
CodiTramuntana:feature/assembly_and_process_ordering

Conversation

@Leusev
Copy link
Copy Markdown
Contributor

@Leusev Leusev commented Feb 4, 2021

🎩 What? Why?

As and admin, I would like to organize the way in which Assemblies and Processes are displayed in the public page.

In some complex participatory activities, there can be many assamblies or processes and they are sorted by date of the participatory space creation, dismantling the design and planification of the participatory action.

This confuses the users and affects the way the participatory activity has been designed.

This PR adds a "Weight" field in the configuration of each Assemblie/Process working similarly to the weigh in components, which stablish an order.

Related Metadecidim proposal:

📌 Related Issues

  • Related to #?
  • Fixes #?

Testing

📋 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

♥️ Thank you!

Leusev and others added 4 commits February 4, 2021 17:06
 * Add en translation
 * Add weight in commands update and create
 * Add weight field in assembly form
 * Add field in assembly view
@laurajaime laurajaime force-pushed the feature/assembly_and_process_ordering branch from 45ece16 to e16cff5 Compare February 9, 2021 10:07
 * Add en translation
 * Add weight in commands update and create
 * Add weight field in participatory process form
 * Add field in participatory process view
@tramuntanal
Copy link
Copy Markdown
Contributor

Hi @mrcasals ,
This PR is ready for review but @Leusev won't be available for a while and @LauraJaimeC and me, we don't have permissions to change the state of this PR from draft to ready for review. Can you?
Also a job got automatically cancelled, can you re-run it please?

@mrcasals mrcasals marked this pull request as ready for review February 9, 2021 14:30
@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Feb 9, 2021

@tramuntanal I've restarted the job and changed the PR status, thanks for warning me! Should @decidim/product review this?

@carolromero
Copy link
Copy Markdown
Member

@tramuntanal Is there somewhere we can test this? Thanks!

@laurajaime
Copy link
Copy Markdown
Contributor

Hello @carolromero, you can test that in http://staging-am2019.decidim.int.coditdev.net

To test this you can:

  • Go to assemblies or processes
  • Assign weights to them and see that they are ordered in the list.

If the weight is greater, the process or assembly will occupy a lower place in the list.

@carolromero
Copy link
Copy Markdown
Member

@LauraJaimeC this is working fine, good job!

VisibleParticipatoryProcesses.new(@user),
PublishedParticipatoryProcesses.new
).query
).query.order(weight: :asc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add tests for this, please?

PublishedAssemblies.new,
VisibleAssemblies.new(@user)
).query
).query.order(weight: :asc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add tests for this, please?

Test for assemblies and participatory process
in order to check order by weight in public
and admin views.
@laurajaime
Copy link
Copy Markdown
Contributor

Hi @mrcasals, I have added the tests that you have suggested.

I have also added order the processes and assemblies in the admin view with their tests.

can you check it? thank you!

@mrcasals mrcasals closed this Feb 17, 2021
@mrcasals mrcasals reopened this Feb 17, 2021
@mrcasals
Copy link
Copy Markdown
Contributor

Sorry, clicked the wrong button!

@tramuntanal tramuntanal deleted the feature/assembly_and_process_ordering branch October 5, 2021 13:22
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