Skip to content

Add direct action to block this participant#10111

Merged
fblupi merged 20 commits intodecidim:developfrom
i-need-another-coffee:ale/frontend-block-user
Apr 4, 2023
Merged

Add direct action to block this participant#10111
fblupi merged 20 commits intodecidim:developfrom
i-need-another-coffee:ale/frontend-block-user

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Nov 24, 2022

🎩 What? Why?

This PR is adding the ability of the admin to block the user directly from interface, as requested in : #10037

This PR depends on: #10024

📌 Related Issues

Link your PR to an issue

Testing

  1. Login as administrator
  2. Visit the public profile of an user
  3. Click Report User
  4. Observe Block and Hide Checkboxes
  5. Check Block, Hide depending on your test Scenario
  6. Go through the process
  7. Observe the user is Blocked
  8. Start the sidekiq runner on queue user_report
  9. Wait the jobs to be consumed,
  10. Observe the content of the user being hidden

📷 Screenshots

Please add screenshots of the changes you're proposing
image

♥️ Thank you!

@ferblape
Copy link
Copy Markdown
Contributor

Are you considering the redesign for these changes? I foresee some conflicts with some of our open redesign PRs (i.e the comments one). Ping me if you want to discuss

@andreslucena
Copy link
Copy Markdown
Member

@alecslupu can you add a description 🙏🏽? Is this based on #10024 (so we should review that one first)?

@ferblape thanks for the heads up!

@alecslupu
Copy link
Copy Markdown
Contributor Author

alecslupu commented Nov 25, 2022

@alecslupu can you add a description 🙏🏽? Is this based on #10024 (so we should review that one first)?
hello @andreslucena , this is the PR that adds some of the work required to close #10037. I have added a bit of context in the description box, but at the moment this is a draft PR, so it should not be taken into account, yet.
Reviewing  #10036 before is required.

@ferblape thanks for the heads up!

@alecslupu
Copy link
Copy Markdown
Contributor Author

Are you considering the redesign for these changes? I foresee some conflicts with some of our open redesign PRs (i.e the comments one). Ping me if you want to discuss
@ferblape , At the moment i am not taking into account the redesign, since i have not yet seen any PRs related to the report content forms.... I will have a look and address any redesigned related issue in a separate PR.

@alecslupu alecslupu force-pushed the ale/frontend-block-user branch 6 times, most recently from b8653bf to 3f2b361 Compare November 26, 2022 06:27
@alecslupu alecslupu marked this pull request as ready for review November 26, 2022 10:47
@alecslupu alecslupu changed the title Ale/frontend block user Add direct action to block this participant Nov 26, 2022
@andreslucena
Copy link
Copy Markdown
Member

As mentioned in #10024 (review), we'll wait until #9852 is merged before retaking this, as the change in the logic of the report button/modal is big with the redesign.

I'd also add that as this PR is based on #10024 we should also merge that first (but I understand that your thinking something similar @alecslupu, as you didn't ask for review on this PR 😄)

@alecslupu alecslupu marked this pull request as draft December 14, 2022 20:33
@alecslupu alecslupu force-pushed the ale/frontend-block-user branch 4 times, most recently from 842b469 to a211b1d Compare December 20, 2022 16:38
@alecslupu alecslupu force-pushed the ale/frontend-block-user branch from a211b1d to 3b84ebd Compare December 23, 2022 09:56
@alecslupu alecslupu marked this pull request as ready for review December 23, 2022 13:55
@alecslupu alecslupu force-pushed the ale/frontend-block-user branch from 3b84ebd to e007e0f Compare March 2, 2023 19:05
@alecslupu alecslupu requested a review from andreslucena March 20, 2023 11:05
@andreslucena
Copy link
Copy Markdown
Member

@alecslupu could you merge with develop and resolve the merge conflicts so I can review this one 🙏🏽 ? Thanks!

@alecslupu
Copy link
Copy Markdown
Contributor Author

@alecslupu could you merge with develop and resolve the merge conflicts so I can review this one 🙏🏽 ? Thanks!

@andreslucena I have merged this branch with develop. Conflicts have been merged. Waiting for the pipeline.

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.

Feature wise, I see that's working as expected. Just a couple of comments:

  1. When I block and hide a user, I see it duplicated in the "reported participants" table:

image

  1. This is working with the old/current design, but we should probably take into account the new design. As far as I see, these pages aren't working on develop yet, but to not block this PR, I propose that we create a new issue (something like "Redesign of flag modals for resource and participants"), add it the "release/0.28-stable" label, and assign it to maintainers as this feature is out of the Redesign contract.

Code wise, I have a couple suggestions and doubts, can you give them an eye? Thanks!

Copy link
Copy Markdown
Member

@fblupi fblupi left a comment

Choose a reason for hiding this comment

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

Just a small lint change

@fblupi fblupi self-requested a review April 4, 2023 12:48
Copy link
Copy Markdown
Member

@fblupi fblupi left a comment

Choose a reason for hiding this comment

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

Tested locally and everything is working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add direct action to block this participant

4 participants