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

Report processing improvements #2349

Merged
merged 7 commits into from Apr 23, 2017

Conversation

@ineffyble
Copy link
Collaborator

commented Apr 23, 2017

I suspect some of this will need refactoring, I'm not fully up to date with our best practices etc, but it all works.

Improvements for the report index and report view. Hopefully more to come.

ineffyble added 7 commits Apr 23, 2017
…for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report
…mat to report comment so newlines are preserved.
…tats (e.g. report history, moderation status).
@@ -11,4 +11,12 @@ class Report < ApplicationRecord
def statuses
Status.where(id: status_ids)
end

def media_attachments

This comment has been minimized.

Copy link
@mjankowski

mjankowski Apr 23, 2017

Collaborator

We might be able to turn statuses into a has_many, and then this could just be has_many :media_attachments, through: :statuses, instead of doing the looping this way.

If we can't do that, this can probably be shortened to something like statuses.collect(&:media_attachments).flatten, or similar.

This comment has been minimized.

Copy link
@ineffyble

ineffyble Apr 23, 2017

Author Collaborator

Yeah, I knew there was a better way I wasn't quite thinking of.

@@ -13,20 +13,32 @@
%table.table
%thead
%tr
%th
-# %th

This comment has been minimized.

Copy link
@mjankowski

mjankowski Apr 23, 2017

Collaborator

Was this leftover from the work?

This comment has been minimized.

Copy link
@ineffyble

ineffyble Apr 23, 2017

Author Collaborator

It was leftover from half completed work of Gargron's, and currently shows
as a checkbox with no label or use. Commenting it out for now seemed
prudent.

@Gargron Gargron merged commit 1801a36 into master Apr 23, 2017
3 checks passed
3 checks passed
codeclimate no new or fixed issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@Gargron Gargron deleted the admin/report-processing-improvements branch Apr 23, 2017
seefood added a commit to Toootim/mastodon that referenced this pull request Apr 26, 2017
* Expose media attachments on reported statuses directly

* Comment out unused bulk report checkbox. Add title to report comment for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report

* Link account name on authorize_follow card back to account

* Add localisation string for report_contents

* Show new admin accounts card partial on report view. Apply simple_format to report comment so newlines are preserved.

* Add new admin accounts card partial, for display quick useful admin stats (e.g. report history, moderation status).

* Fix localized variable
seefood added a commit to Toootim/mastodon that referenced this pull request Apr 28, 2017
* Expose media attachments on reported statuses directly

* Comment out unused bulk report checkbox. Add title to report comment for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report

* Link account name on authorize_follow card back to account

* Add localisation string for report_contents

* Show new admin accounts card partial on report view. Apply simple_format to report comment so newlines are preserved.

* Add new admin accounts card partial, for display quick useful admin stats (e.g. report history, moderation status).

* Fix localized variable
y0t4 added a commit to y0t4/mastodon that referenced this pull request Apr 29, 2017
* Expose media attachments on reported statuses directly

* Comment out unused bulk report checkbox. Add title to report comment for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report

* Link account name on authorize_follow card back to account

* Add localisation string for report_contents

* Show new admin accounts card partial on report view. Apply simple_format to report comment so newlines are preserved.

* Add new admin accounts card partial, for display quick useful admin stats (e.g. report history, moderation status).

* Fix localized variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.