Skip to content

Improve moderation panel#6677

Merged
tramuntanal merged 31 commits intodecidim:developfrom
i-need-another-coffee:feat/moderation-panel-improvements
Oct 30, 2020
Merged

Improve moderation panel#6677
tramuntanal merged 31 commits intodecidim:developfrom
i-need-another-coffee:feat/moderation-panel-improvements

Conversation

@beagleknight
Copy link
Copy Markdown
Contributor

@beagleknight beagleknight commented Oct 14, 2020

🎩 What? Why?

This add a few improvements in the moderations panel:

  • Added new columns (id, created_at) and reorganise them.
  • Sort table by some columns (report_count and created_at)
  • Add filter component with search bar
  • Paginate moderations: side effect of using the Filterable concern.

Updated (21/10/2020)

This also adds two new views to the moderation panel:

  • In the moderations list you can click the "Expand" button to see more details about the moderation (see screenshot below). In this new page you can see a table with all the reports that belongs to that moderation.
  • In the reports table there is an excerpt of the reported content in the language that the user was using at the moment. You can also click the "Expand" button to see the whole content.

Both views includes a "preview" of the reported content. Since we don't want to display the whole content I created a new cell called reported_content_cell that can be configured for each resource. This cell will be used to preview this content in the email sent to the moderators.

Related issues/prs

Testing

  1. First report a few resources (i.e. proposals, meetings, ...)
  2. Navigate to the admin dashboard and go to the moderations panel
  3. Try to sort the table by report count or creation date
  4. Filter moderations by reportable type
  5. Search moderations by reportable id or reported content.

📋 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

Before:

image

After:

image

(when hovering over "Visit URL" link)

image

image

(previous screenshot when scrolling down a bit...)

image

image

@Leusev Leusev changed the title feat: moderation panel improvements Improve moderation panel Oct 14, 2020
@mrcasals
Copy link
Copy Markdown
Contributor

Hi, @decidim/product can you review this PR? Here's the link:

https://decidim-staging-pr-201.herokuapp.com/

It implements part of https://meta.decidim.org/processes/roadmap/f/122/proposals/15627 (as explained in the description of this PR)

@andreslucena
Copy link
Copy Markdown
Member

Can you add the before screenshots also so it's easier to see the visual diff? 🙏 🙏

@beagleknight
Copy link
Copy Markdown
Contributor Author

Can you add the before screenshots also so it's easier to see the visual diff? 🙏 🙏

@andreslucena Added a before screenshot to the PR description 😄

@andreslucena
Copy link
Copy Markdown
Member

@andreslucena Added a before screenshot to the PR description smile

Awesome thanks!

Could you add title column in the moderation panel?

imatge

For better understanding, id = 5 is this:

imatge

But as an administrator / moderator I can't know.

I don't know if it's on the current sprint or in another, but a common need is to be able to see the moderated content after it was moderated. Is that going to be developed by you guys?

Also, nice to see you here again @beagleknight 😄

@beagleknight
Copy link
Copy Markdown
Contributor Author

beagleknight commented Oct 15, 2020

Could you add title column in the moderation panel?

We are currently developing a "show" view for each moderation that includes more info related to the reportable object. I'm not sure if that's enough 😄 // cc @mrcasals

Also, nice to see you here again @beagleknight 😄

👋 I am glad to work with you again @andreslucena !

@beagleknight beagleknight force-pushed the feat/moderation-panel-improvements branch from c183f99 to 459dc22 Compare October 20, 2020 13:05
@mrcasals
Copy link
Copy Markdown
Contributor

@decidim/product we've updated the PR with more additions. Check the updated description, and check the Review App:

https://decidim-staging-pr-205.herokuapp.com/

@virgile-dev
Copy link
Copy Markdown
Contributor

@mrcasals Hey Marc,
Adding the things that we commented by email.

  • Direct link to conversation with author (group conversation if multiple authors) in the moderation reports
  • Hide "Reported content" column as its redundant with content details in the "Moderation reports" view
  • Add tooltip when hovering overing on type with an abstract of the content (title for debate, proposal, meetings, body for comment (first 1sts 150 characters) --> (Still in discussion, maybe adding an abstract column is better, my main concern is that lots of the moderation work is skimming throught the table and hide the most problematic concern)

@mrcasals
Copy link
Copy Markdown
Contributor

@virgile-dev all these changes should be deployed to the staging app now:

https://decidim-staging-pr-205.herokuapp.com/admin/participatory_processes/atque-rerum/moderations

@tramuntanal tramuntanal self-assigned this Oct 27, 2020
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Hi @beagleknight ,
good job here!
I just suggest for a renaming.
Also, can you add a little bit of documentation in docs/advanced regarding how to add make a resource reportable?

@mrcasals
Copy link
Copy Markdown
Contributor

@tramuntanal can you rereview it, please? 😄

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

I think some unexpected contents got through the reportable.md documentation

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

There's still some content to be cleaned, also can you check the codecov/patch?

Comment on lines +22 to +26
To render this button, `decidim-core` offers the `decidim/reported_content` cell. It is strongly recommended to use this cell to make new resources endorsable.

```ruby
cell("decidim/endorsement_buttons", resource)
```
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.

This still don't belongs here

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.

@tramuntanal This is it's good for real 🙇

Also added a couple of test to increase coverage.

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Thanks @beagleknight !

@tramuntanal tramuntanal merged commit 0e0e369 into decidim:develop Oct 30, 2020
@mrcasals mrcasals deleted the feat/moderation-panel-improvements branch November 4, 2020 13:57
andreslucena added a commit that referenced this pull request Nov 17, 2020
andreslucena added a commit that referenced this pull request Nov 19, 2020
Leusev pushed a commit that referenced this pull request Dec 2, 2020
* Remove Markdown doc

* Add documentation with Antora (AsciiDoc format - .adoc)

Adds sections:
* configure
* customize
* develop
* install
* services

Also adds:
* a README explaining the relationship with the documentation repository
available in https://github.com/decidim/documentation
* antora metadata file so we can build these sections in the same website

* Fix Antora name for docs

* Rename advanced pages to Concerns

* Add Authorizations customize from module's README

* Move 'add_authorizable_action' to 'permissions'

* Move 'adding_fixtures_aka_dummy_content' to 'components'

* Move 'how_to_create_a_module' to 'components'

* Remove 'upgrading', now it's in 'update'

* Install guide: fix error in 'whatever' gem (it's 'whenever')

* Install guide: fix error in RAILS_ENV order in commands

* Install guide: fix command for open_data export

* Install guide: fix link to Contribution guide

* Develop guide: add example apps

* Architecture docs

Add first version of c4model diagrams with PlantUML

* https://c4model.com/
* https://plantuml.com/
* https://github.com/RicardoNiepel/C4-PlantUML

* Add some explanation of modules types (with Components link)

* Configure: ENV VARS and Initializer

This moves ENV VARS configuration docs to its own page.
We also create a new page for explaining Decidim's initializer settings
(config/initializer/decidim.rb). For the moment is mostly a copy paste with
nice formating, but the idea is to expand it.

* Sync "Make maps actually configurable" by @ahukkanen

Extracted from #6340

* Sync "Templates module" by @verarojman

Extracted from #6247

* Sync "Configure Decidim Bulletin Board" by @leio10

Extracted from #6420

* Sync "Add a task to fix locale issues" by @microstudi

Extracted from #6510

* Update versions in SECURITY.adoc

* Convert CONTRIBUTING.md to AsciiDoc

* Convert README.md to AsciiDoc

* Clarify CONTRIBUTING and links to docs site

* Remove Markdown linter CI

* Sync "Update documentation for `decidim` OAuth social provider" by @tramuntanal

Extracted from #6607

* Sync "Generate changelog entries" by @tramuntanal

Extracted from #6794

* Fix link in oauth.adoc

* Sync "Improve moderation panel" by @beagleknight

Extracted from #6677

* Removes trailing whitespaces

Co-authored-by: Oliver Valls <199462+tramuntanal@users.noreply.github.com>
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.

7 participants