SpringAll icon indicating copy to clipboard operation
SpringAll copied to clipboard

Add a more detailed modal when reporting a post or a comment

Open Flaburgan opened this issue 5 years ago • 25 comments

As a moderator, I want to receive report only for posts and comments which violate the terms of use To easily focus on the important ones

Many reports received on pods I moderate are a people whining about others "look how bad they talk to me". As a consequence of that flow, important reports are sometimes lost in the middle of this. As an attempt to reduce "not real report", I implemented a real modal (instead of the previous javascript alert) which tell to the users to report only content which violates the terms of use, and remind them that they can block the other user if they want to. Also, the reason is required but not filled, which force them to fill something.

Here is how it currently looks like:

report

Flaburgan avatar Jun 23 '19 00:06 Flaburgan

Many reports received on pods I moderate are a people whining about others "look how bad they talk to me".

If your intention of this PR is to address this issue, then it won't help. Mainly because those who file those reports also would not read the modal. If you want to get people to report only valid things, then you have to go the Facebook/Twitter route and have them select from a list of predefined reason, some of which end in a dialog explaining how to block people, while others actually do submit a report.

denschub avatar Jun 23 '19 11:06 denschub

That's a good idea, but rise the question about how to make that generic for all pods... It means we could suggest a list the podmin would be able to edit, I guess.

Flaburgan avatar Jun 23 '19 11:06 Flaburgan

I actually have the same question, but for your PR. Some pods, for example Geraspora, do not just refer to the ToS, but also to the project's community guidelines for content policing. Makes me wonder if we should expose that text in the config, but that would kill all chance of localizing that. Hm.

denschub avatar Jun 23 '19 11:06 denschub

Bump on conflicting file

weex avatar Aug 24 '21 17:08 weex

I rebased this PR, but I also marked it as Draft because of https://github.com/diaspora/diaspora/pull/8035#discussion_r296461071 if someone can explain this to me (@jhass maybe?)

Flaburgan avatar Aug 24 '21 20:08 Flaburgan

@Flaburgan Can you check how this will show in mobile view? The Issue "Reporting in mobile" is yelled several times and I also think a mobile 'reporting' is very useful.

tclaus avatar Aug 25 '21 07:08 tclaus

Un-requesting my own review here. I won't have the time to properly investigate this anytime soon, and I don't want to give the impression. <3

denschub avatar Aug 25 '21 15:08 denschub

@Flaburgan Can you check how this will show in mobile view? The Issue "Reporting in mobile" is yelled several times and I also think a mobile 'reporting' is very useful.

The "report" feature doesn't exist at all in the mobile version, it would need to be added from scratch. I would say this work is out of scope of that PR and will be tracked in https://github.com/diaspora/diaspora/issues/8281

Un-requesting my own review here. I won't have the time to properly investigate this anytime soon, and I don't want to give the impression. <3

Sure no problem. Take care 😉

Flaburgan avatar Aug 26 '21 12:08 Flaburgan

Okay I finally fixed my problem with the tests and I completed them, so this is ready for review again. @tclaus you probably want to rebase https://github.com/diaspora/diaspora/pull/8239 on it so you will have the report.feature file and will be able to complete it.

Flaburgan avatar Aug 26 '21 21:08 Flaburgan

  • The text-field is too high.

It was an <input> until now but Dennis made me change this to a <textarea>, that's why it is higher. It could actually be even higher than that to clearly show that several lines are okay, even if I feel that most reporters aren't going to use that. So I think it's good like it is now.

  • When reporting another Item, the old reporting text appears. textfield should be cleared.

Yeah indeed. I saw that but I was wondering if that was a good point for people reporting several posts in a row, but I agree this is going the other way that what I am trying to achieve here, and can be disturbing. I'm going to fix that.

  • Is there a default / placeholder text?

There is no default as we want to force the user to fill something. It could have a placeholder though, I'm going to add one.

  • Can you set the focus on the input-field after opening the dialog?

Ok.

Flaburgan avatar Aug 27 '21 07:08 Flaburgan

Okay I think I fixed everything please tell me if this is now fine.

Flaburgan avatar Aug 28 '21 07:08 Flaburgan

@SuperTux88 would you be able to tell me why the Jasmine tests are not running?

Flaburgan avatar Aug 29 '21 08:08 Flaburgan

@SuperTux88 if you know why jasmine is not running I think this is the only problem here

Flaburgan avatar Sep 18 '21 16:09 Flaburgan

@Flaburgan I have no idea why it's failing, it works perfectly locally. I rebased again on develop to remove the commits not belonging to this PR (so you want to "force pull" your local branch using git reset before you do any development again), and also added a commit to try to increase the timeout, however I have no idea if that helps. It would still be strange since it's usually finishing in under a minute, and if it suddenly takes more than two minutes, still something feels "broken" ... but lets see if it helps at all first, or if it's still timeouting. I think we added the timeout in the first place because when switching to GitHub actions we had problems with jasmine randomly getting stuck, but it's also strange that it now gets stuck with this PR consistently :man_shrugging:

SuperTux88 avatar Oct 01 '21 00:10 SuperTux88

Ok, it didn't help, I'm out of ideas then ... I removed my commit again :man_shrugging:

SuperTux88 avatar Oct 01 '21 01:10 SuperTux88

@Flaburgan If you change the chrome_cli_options you need to make sure that running it in docker still works (which needs the option currently on develop), so if GitHub-Actions need something special, then we need to set them conditionally (using an env-var for example). But I think the chrome_cli_options aren't the problem here, the options on develop work both in docker and on GitHub with the current develop code, so it's something in the code which breaks it, probably a change in app/assets/javascripts/app/views.js?

SuperTux88 avatar Oct 01 '21 09:10 SuperTux88

When looking at the log in github, the only one we have is [1001/011425.700187:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is. When you search for it on stackoverflow everyone is saying that Chrome Driver crashes after that error, so I think something is misconfigured...

Flaburgan avatar Oct 01 '21 09:10 Flaburgan

The same error also is logged in develop where jasmine works fine, so I don't think that error is a problem (also if it would crash then it would just exit and not hang and timeout). I think it's more than one of the changes makes one of the tests run in an endless loop or something (no idea, just guessing), but it's strange that this only happens on GitHub. Maybe there is a way to give jasmine a more verbose output, to find where it's hanging?

SuperTux88 avatar Oct 01 '21 10:10 SuperTux88

Ok I'm not available this week-end so this will have to wait for next week.

Flaburgan avatar Oct 01 '21 13:10 Flaburgan

@SuperTux88 looks like --trace isn't helpful on github. However, launching tests locally with jasmine:ci does hang on my computer. How could I know what's going on? Any way to display chrome logs in the console, or are they somewhere on my computer?

Flaburgan avatar Oct 05 '21 22:10 Flaburgan

Actually it fails even when accessing locahost:8888 saying /getting_started/ isn't found 404

Flaburgan avatar Oct 06 '21 06:10 Flaburgan

looks like --trace isn't helpful on github.

--trace is a parameter for rake, not for jasmine, so it doesn't really affect jasmine.

However, launching tests locally with jasmine:ci does hang on my computer.

Then you are further than me, it works just normally on my computer and I can't reproduce these problems at all. If it also hangs locally then you should be able to test what helps locally much faster than pushing to github every time.

How could I know what's going on? Any way to display chrome logs in the console, or are they somewhere on my computer?

I just pushed another debug commit to print one line for each test (instead of printing just one long line with dots), to see if it at least executes a few of the tests or, if it just hangs from the beginning and doesn't even start

And re "Use JQuery instead of vanilla JS":

Vanilla JS should work as good (if not better) than jquery, and since this commit also cucumber fails, so I would just revert that again.

SuperTux88 avatar Oct 21 '21 00:10 SuperTux88

So yes, it looks like it's at least running a few tests, but then hangs. So probably not related to chrome errors at the beginning, since they are also printed when it's running and it also still runs a few tests now.

The last test which successfully runs is app.Router _initializeStreamView sets app.publisher, the next test that would run (when I run it locally it works) would be app.Router _initializeStreamView doesn't set app.publisher if already defined, so maybe that's the test which causes the hang? Maybe that helps you to debug that more.

SuperTux88 avatar Oct 21 '21 00:10 SuperTux88

@SuperTux88 I tried things but nothing work, if you want I'm available this evening to check together

Flaburgan avatar Dec 19 '21 19:12 Flaburgan

Unfortunately the CI is still failing.

Flaburgan avatar Jun 21 '22 09:06 Flaburgan

@SuperTux88 ok so code wise we should be good to go. Jasmine is still hanging sometimes, I think @denschub investigated this and his suggestion was to remove the problematic test? I don't remember and I don't know where his commit is.

Flaburgan avatar Oct 26 '22 10:10 Flaburgan

@Flaburgan I have some days off, so I can make a fresh rebase of #8239 to this one- (But no bigger code improvements)

tclaus avatar Oct 26 '22 11:10 tclaus

I think @denschub investigated this and his suggestion was to remove the problematic test? I don't remember and I don't know where his commit is.

Yes, see #8360. The broken test is

https://github.com/diaspora/diaspora/blob/03796e8fe2421ddfbc5380b8194ee68afbe3b88b/spec/javascripts/app/views/bookmarklet_view_spec.js#L46

and it's re-enabled because you force-pushed my commit away. :D You can re-disable the test, simply by replacing the it( with a xit(. As I said in the linked bug, I think it's fine disabling this test for now - it's not critical, and we have a tracking bug open to eventually fix it.

denschub avatar Oct 26 '22 21:10 denschub

t's re-enabled because you force-pushed my commit away. :D

Aaaaah sorry, indeed. I found back your commit https://github.com/diaspora/diaspora/commit/840478b2d2e5bd2162929b033426a18201c27b4b but even after fetching your fork I was not able to cherry-pick it. That's fine I just rewrote it. So, CI should be green soon, fingers crossed.

Do we want to disable the display of Jasmine output that we are introducing here or do we want to keep it?

Flaburgan avatar Oct 26 '22 21:10 Flaburgan

Do we want to disable the display of Jasmine output that we are introducing here or do we want to keep it?

That commit was only for debugging and should be removed, same for the increase of the timeout (Both were already removed, but you brought them back when you removed the commit that disabled the test).

SuperTux88 avatar Oct 26 '22 21:10 SuperTux88