Skip to content

Accountability bulk actions#13730

Merged
alecslupu merged 10 commits intodevelopfrom
feat/accountability-bulk-actions
Jan 8, 2025
Merged

Accountability bulk actions#13730
alecslupu merged 10 commits intodevelopfrom
feat/accountability-bulk-actions

Conversation

@mllocs
Copy link
Copy Markdown
Contributor

@mllocs mllocs commented Dec 9, 2024

🎩 What? Why?

Add bulk actions in the Accountability component to:

  • Update Taxonomies
  • Update Status
  • Update Dates (Start date and End date)

📌 Related Issues

Testing

📷 Screenshots

CleanShot 2024-12-09 at 12 02 42@2x

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['type: feature', 'type: change', 'type: fix', 'type: removal', 'target: developer-experience', 'type: internal']

@github-actions github-actions bot added module: accountability dependencies Pull requests that update a dependency file or issues that talk about updating dependencies labels Dec 9, 2024
@mllocs mllocs added type: feature project: 2024-developments Barcelona City Council contract labels Dec 9, 2024
@mllocs mllocs self-assigned this Dec 9, 2024
@mllocs mllocs force-pushed the feat/accountability-bulk-actions branch from ae44b66 to e36bd9f Compare December 11, 2024 11:03
@mllocs mllocs marked this pull request as ready for review December 11, 2024 11:16
@mllocs mllocs removed the dependencies Pull requests that update a dependency file or issues that talk about updating dependencies label Dec 11, 2024
github-actions[bot]
github-actions bot previously approved these changes Dec 11, 2024
github-actions[bot]
github-actions bot previously approved these changes Dec 13, 2024
github-actions[bot]
github-actions bot previously approved these changes Dec 13, 2024
@furilo furilo requested a review from NilHomedes December 16, 2024 09:38
furilo
furilo previously approved these changes Dec 16, 2024
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.

Hello, @mllocs wonderful job 💯

Here is my review with a couple of things:

  • When I change the status of various results using the bulk action button
    Screenshot 2024-12-17 at 13-37-30 Results - Admin - Test Site for Lot2

Then the status is changed, but the progress does not.
The expected behavior is that if a change the status, then the percentage of progress should be modified, according to what is defined in the results statuses.
See where admins defines this relation between statuses and % progress: https://decidim-lot2.populate.tools/admin/participatory_processes/branch-highway/components/1/manage/statuses

  • When I change the taxonomy using bulk actions,
    If a result has one taxonomy already defined (Category: Illiam..)
    And I just want to add a new taxonomy (City Districts: Sant Martí)
    Then, the category is removed and only prevails the city district.
    My expectation would be to respect the already defined taxonomy (Category: Illiam..) , and add the new taxonomy (City Districts: Sant Martí).

@mllocs mllocs dismissed stale reviews from furilo and github-actions[bot] via 20f8f22 December 18, 2024 09:02
github-actions[bot]
github-actions bot previously approved these changes Dec 18, 2024
@furilo
Copy link
Copy Markdown
Contributor

furilo commented Dec 18, 2024

  • When I change the taxonomy using bulk actions,
    If a result has one taxonomy already defined (Category: Illiam..)
    And I just want to add a new taxonomy (City Districts: Sant Martí)
    Then, the category is removed and only prevails the city district.
    My expectation would be to respect the already defined taxonomy (Category: Illiam..) , and add the new taxonomy (City Districts: Sant Martí).

Mmm... This is very tricky. If you select one element, you know for certain which Taxonomy A and B the item might have. In that case, we can prepopulate the corresponding select with the option, so you are aware of the result.

But, what about if you select various items with different values for any of the taxonomies? We could not select an option. Only thing we might do is to include some note in the corresponding filter such as: "Items currently have different classifications for this taxonomy. If you update it, the new value will be applied to all".

And we might think on a way to improve the predictability by the user that "choosing" the value "Please select an option" will actually remove the value:

70377

But this I think belongs to taxonomies, not this issue specifically.

@mllocs
Copy link
Copy Markdown
Contributor Author

mllocs commented Dec 18, 2024

Then the status is changed, but the progress does not.
The expected behavior is that if a change the status, then the percentage of progress should be modified, according to what is defined in the results statuses.

@NilHomedes Fixed this.

Also we had an offline conversation around the bulk actions in Taxonomies. We decided for now to leave it as it works in proposals' bulk actions.

NilHomedes
NilHomedes previously approved these changes Dec 19, 2024
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.

Working smoothly now @mllocs, great job! 🚀

@NilHomedes
Copy link
Copy Markdown
Member

Just for the record: We agreed to keep the current behavior when changing taxonomies using bulk actions. As this change is out of the scope of this issue. So now it works like this:

When I change the taxonomy using bulk actions,
If a result has one taxonomy already defined (Category: Illiam..)
And I just want to add a new taxonomy (City Districts: Sant Martí)
Then, the category is removed and only prevails the city district.
My expectation would be to respect the already defined taxonomy (Category: Illiam..) , and add the new taxonomy (City Districts: Sant Martí).

In the future, we should review this behavior and think a solution to avoid this unexpected behavior.
Possible solutions to that would be:

  • To manage changing taxonomies separately
  • Change the dropdown behavior, so if I leave without any option selected, it doesn't change the existing taxonomy.
    (This could be tricky, as we have this drop-down implemented in many places of the admin)

@alecslupu
Copy link
Copy Markdown
Contributor

@mllocs you have a failing pipeline, and please assign it to me after it passes the Contractor review state.

Copy link
Copy Markdown
Contributor

@entantoencuanto entantoencuanto left a comment

Choose a reason for hiding this comment

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

Great work!

@mllocs
Copy link
Copy Markdown
Contributor Author

mllocs commented Dec 23, 2024

@alecslupu ready! :)

@alecslupu alecslupu assigned alecslupu and unassigned mllocs Dec 23, 2024
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.

Almost perfect. The PR works as intended, yet, i do feel the need to add at least one system test.

Could you add one or more specs that would fulfill the following test scenario: "Given i have a bunch of results, when i click select all / select single, and click on actions, ... i can set the dates / status etc "

you could have a look here:

  • decidim-proposals/spec/shared/split_proposals_examples.rb
  • decidim-proposals/spec/shared/manage_proposals_taxonomies_examples.rb ( for the taxonomies specs )
    35 / 35

github-actions[bot]
github-actions bot previously approved these changes Jan 8, 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.

image

@alecslupu alecslupu merged commit 2c7da23 into develop Jan 8, 2025
@alecslupu alecslupu deleted the feat/accountability-bulk-actions branch January 8, 2025 20:49
mllocs added a commit that referenced this pull request Jan 9, 2025
entantoencuanto added a commit that referenced this pull request Jan 14, 2025
* develop: (27 commits)
  WCAG navigation submenu (#13796)
  Update gem dependencies (part 3) (#13849)
  Prevent notifications for deleted users (#13812)
  Retries NPM installation a couple times to prevent network timeouts (#13831)
  Update gem dependencies (part 2) (#13839)
  Enhance signature pdf export (#13778)
  Fix HexaPDF dependency (#13834)
  Fix flaky spec in authentication (#13827)
  Merge upload field for documents and image on proposal admin form (#13735)
  Update gem dependencies (#13835)
  Upgrade erb_lint to 0.8.0 (#13833)
  Fix flaky spec in geocoder (#13820)
  Refactor modules mounting routes (#13294)
  Upgrade check-spelling action (#13825)
  Add missing images in the custom registration emails from meetings (#13632)
  Add missing translations (#13793)
  Fix proposal map performance with hundreds of markers (#13798)
  Create multiple surveys within same Survey component (#13420)
  Accountability bulk actions (#13730)
  Improve UI for sorting options on comments (#13670)
  ...
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.

Ability to perform bulk actions on results from the admin panel

5 participants