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

Proposal: Flagging #61

Open
jacquescrocker opened this issue Dec 20, 2015 · 5 comments
Open

Proposal: Flagging #61

jacquescrocker opened this issue Dec 20, 2015 · 5 comments

Comments

@jacquescrocker
Copy link

allow anyone logged in to flag a project (not just moderators)

moderators would be able to hide a flagged product (with a reason)

@nblackburn
Copy link
Contributor

If a flag was rejected it could affect the flaggers karma #9

@rmcfadzean
Copy link
Contributor

Working on this. I'll push some code and start a PR after I've had some sleep.

Current implementation will allow both projects and users to be reported using the same method. (has_many :reports, as: :reportable). Reports will be attached to a user/reporter.

The report box. Plan is to also add a link to the project guidelines once it's up. Thoughts on perhaps not including the radio buttons?
2015-12-23-083213_299x269_scrot

The report button
2015-12-23-083206_396x104_scrot

Thinking I'll add a '/reports' page and a button in the details panel if that project has been reported and a button on the user's page if they've been reported.

@jacquescrocker
Copy link
Author

@Wonderbread awesome, thanks!

let's just do a single "Reason" text field, then have it posted as an AuditLog record, with item_type as 'Flagged'

we could even reuse the audit log form (AuditLogsController#edit) and redirect the user to it after flaggin

@jacquescrocker
Copy link
Author

basically the simple flow would be:

  1. click flag btn -> (maybe with a js confirm)
  2. Post to controller -> AuditLog record gets created (with item_type as 'flagged'
  3. redirect to /audit/:id/edit

we can then update the audit log controller auth to allow the owner of that audit log to be able to edit it (instead of just checking for "moderator")

@rmcfadzean
Copy link
Contributor

Should all reports go in the audit logs? I feel like that could weigh them down a lot and important things could 'get lost' in the mess.

They way I'm going about it right now is as follows:

  • Flag button is clicked
  • Report modal/form pops up
  • User fills in reason for flagging
  • Form POSTs to reports#create
  • Report is validated
    • If successful: User is redirected to the report
    • If unsuccessful: Either redirected to reports#edit or just shown errors on the existing form via AJAX (unsure which way yet)
  • Reporter & Moderators can view the report details
  • Moderator has options to
    • accept report/hide project. the hiding will show up in the audit log as normal
    • reject report.
  • report is closed (status => accepted|rejected), 'handled_by' is set and it's all reflected on the report page

It's less complicated than the long list makes it seem :)

WIP reports#show
2015-12-23-205528_1190x302_scrot

WIP (unstyled) reports#index
2015-12-23-210311_1203x233_scrot

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

No branches or pull requests

3 participants