reddit-moderator-toolbox-legacy icon indicating copy to clipboard operation
reddit-moderator-toolbox-legacy copied to clipboard

Modlog filtering

Open amici-ursi opened this issue 9 years ago • 6 comments

Can we have filtering in the modlog?

Native modlog supports showing only this action, or only this user. However, there is no way to show everything except this action, or except this user.

amici-ursi avatar Dec 10 '15 01:12 amici-ursi

Might be possible, but depending on the filters it might not work that well considering that unless there are some hidden api calls we would need to just filter out on the page. So you might end up with pages of empty stuff before you finally hit something.

replacing modlog with out api based version is also tricky since the modlog json is missing a lot of information.

So yeah, I am totally open for the idea but the approach will needs some proper brainstorming.

creesch avatar Dec 10 '15 09:12 creesch

Could easily collapse columns and rows. That way we could generate the parent classes using the same info we use to generate the table, pulling from the existing dropdown.

It collapses perfectly as if they weren't there for both rows and columns.

.hide-creesch .moderator-creesch.mod-row {
    display: none;
}
.hide-approvelink .action-approvelink {
    display: none;
}

It doesn't require sending a new request to hide or unhide, and we could hide/show as many as we wish. And it will persist across new table generation requests.

LiterallyWTH avatar Dec 10 '15 15:12 LiterallyWTH

That isn't really the issue, doing it like that means you'll often end up with empty pages and only sort of works with RES NER enabled and even then poorly.

creesch avatar Dec 10 '15 16:12 creesch

Doh, I was thinking mod matrix.

It looks like we only have to manually hide action filter:

We could build an array of strings '.'+action's for actions

$( actions.join(',')).closest('tr.modactions').hide();

for mods: https://www.reddit.com/r/mod/about/log/?mod=WorseThanHipster+creesch

and for subreddits:

https://www.reddit.com/r/toolbox+tb_beta+agentlamefacts/about/log/

For empty pages, we can grab the last row's data-fullname and append an '&after='+fullname and do another request if empty or say less than 10 items not hidden.

I'm not sure what to do about NER if we can't reliably make it fire on NER like we do with comments.

LiterallyWTH avatar Dec 10 '15 17:12 LiterallyWTH

Hrm. that works for half of the request. Actions are still tricky to get right.

creesch avatar Dec 10 '15 20:12 creesch

We should be able to populate it just like we do in modmatrix, from the dropdown, but I know that's not the whole issue here.

LiterallyWTH avatar Dec 10 '15 20:12 LiterallyWTH