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

Display of an SVG at various places to show if user is banned or active #3338

Closed
grvsachdeva opened this issue Sep 16, 2018 · 28 comments
Closed
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature gci-candidate help wanted requires help by anyone willing to contribute HTML Ruby

Comments

@grvsachdeva
Copy link
Member

grvsachdeva commented Sep 16, 2018

Display if someone's been banned or is still active in moderator emails (https://github.com/publiclab/plots2/blob/master/app/views/admin_mailer/notify_node_moderators.html.erb) using the SVG at the above URL so moderators can tell if something's already been moderated without opening a link

SVG preferred: https://gist.github.com/jywarren/ea0523a09f6f8660486b14eeea15de95

@grvsachdeva
Copy link
Member Author

@jywarren, could you mention the flow how it can be useful like with an example. thanks!

@jywarren
Copy link
Member

Yes, we could display this in outgoing spam moderation emails, so that even before opening the link to see the page, you could tell if the person had already been banned or spammed; this is often difficult to tell when someone has posted multiple things before being banned for spamming. Thanks!

@jonxuxu
Copy link
Member

jonxuxu commented Dec 2, 2018

That's a cool idea! On my localhosted project there's no emails to moderate:
image
If any of you have a moderator view of this page, a screenshot for design purposes would be appreciated. Alternatively, if there's a way to generate some on local host that would be nice to know too.

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Dec 2, 2018 via email

@jonxuxu
Copy link
Member

jonxuxu commented Dec 2, 2018

Oh I see, thanks. I've made a test post and can view it as a moderator on the dashboard as seen below:
image
However even after changing the moderator email to my own I still don't receive any moderator emails when a post is made.

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Dec 2, 2018 via email

@jonxuxu
Copy link
Member

jonxuxu commented Dec 2, 2018

Oh okay. How can I open the email tab?

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Dec 2, 2018 via email

@jonxuxu
Copy link
Member

jonxuxu commented Dec 3, 2018

I've created a new account in a separate browser, and I still have no new tab opening up on my browser with the moderator logged in.

@oorjitchowdhary
Copy link
Member

@SidharthBansal @gauravano, As @JonathanXu1 is focusing on other important issues.. I'm taking this up.. Hope you don't have a problem @JonathanXu1

@jonxuxu
Copy link
Member

jonxuxu commented Dec 10, 2018

Go ahead :)

@oorjitchowdhary
Copy link
Member

Thanks a lot Jonathan.. onto it

@oorjitchowdhary
Copy link
Member

@publiclab/reviewers Can someone help me with it's conditional..
It should be if node.status == 4 ? or something else

@oorjitchowdhary
Copy link
Member

@SidharthBansal I've some doubts for this.. I implemented the conditonal.. Now the email displays the active svg but I wonder how will we ever see the banned svg .. bcoz unless we mark a note spam, we will always see the active banner.. and once we spam a note, we also ban the user so he won't be able to publish any new notes and therefore we won't receive any email with the banned svg..
Please guide me here, if I'm going wrong

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018 via email

@oorjitchowdhary
Copy link
Member

@gauravano Please guide me here

@grvsachdeva
Copy link
Member Author

Where's your PR?

@oorjitchowdhary
Copy link
Member

I can send a PR.. Wanted to clarify this first.. But I'll submit the PR first then

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018 via email

@oorjitchowdhary
Copy link
Member

Okay.. but I can claim my last task on gci which can be worked upon till Dec 12th .. right?

@grvsachdeva
Copy link
Member Author

I gone through the problem statement again, we want to show svg on email so that moderator could know if it's moderated or not. This would need details from @jywarren to clarify that what change to be brought?

@grvsachdeva
Copy link
Member Author

We send a new email to same thread when the post is moderated. I guess @jywarren is saying we could do some changes in that new email to convey change. That change could be addition of Banned svg with author name. Am I right @jywarren?

@oorjitchowdhary
Copy link
Member

So what should I submit for my task.. @gauravano ?
@jywarren Help us here

@grvsachdeva
Copy link
Member Author

For now, in second email add svg according to user status.

@oorjitchowdhary
Copy link
Member

So if user.status == 1, ACTIVE svg
else BANNED svg
Am I right?

@grvsachdeva
Copy link
Member Author

yes!

@oorjitchowdhary
Copy link
Member

Okay.. PR coming up

@grvsachdeva grvsachdeva added enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature labels Dec 16, 2018
@grvsachdeva grvsachdeva added help wanted requires help by anyone willing to contribute Ruby HTML labels Mar 13, 2019
@jywarren
Copy link
Member

I'm going to close this one, sorry - it ended up not working because GMail caches images... but also, we are modifying the moderation emails in #6246 and this will be less necessary. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature gci-candidate help wanted requires help by anyone willing to contribute HTML Ruby
Projects
None yet
Development

No branches or pull requests

5 participants