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

Hide moderated content from notifications #12829

Merged
merged 3 commits into from
May 27, 2024

Conversation

alecslupu
Copy link
Contributor

🎩 What? Why?

This PR attempts to hide the moderated content from the notifications block. I have noticed that the moderated content is still being available in the notifications even though the content itself has been moderated. I have noticed that a while ago in MetaDecidim.

This PR adds a simple "Content moderated" string instead of actual notification, just to preserve the pagination integrity. It does not add any "Content moderated on %{date}" as we have on comments, because we do not have a very good grasp of the resource that is being hidden. Sometimes, the hidden content can be a comment, but sometimes it could be the resource commentable.

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

  1. Have a decidim installation with some notifications (alternatively you could use Create user notifications while seeding #12828)
  2. Login as admin and visit the notifications page
  3. Moderate 1 comment
  4. Moderate 1 other resource ( Meeting / Proposal)
  5. See the content is still being displayed in notification area
  6. Apply patch
  7. Refresh the notifications page.
  8. See the content is being replaced by a "Content Moderated"

📷 Screenshots

Please add screenshots of the changes you are proposing
A comment being moderated
image

A resource being moderated ( that also have comments associated: 1 meeting + 4 comments associated )
image

♥️ Thank you!

github-actions[bot]
github-actions bot previously approved these changes May 6, 2024
github-actions[bot]
github-actions bot previously approved these changes May 6, 2024
@alecslupu alecslupu marked this pull request as ready for review May 6, 2024 08:29
@alecslupu alecslupu requested a review from a team May 6, 2024 08:29
Copy link
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.

I've just checked it out locally and it works as expected. Just a couple details to change and we're good to go

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
@andreslucena andreslucena merged commit ee7ad7c into develop May 27, 2024
110 checks passed
@andreslucena andreslucena deleted the fix/display-notifications branch May 27, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants