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

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

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

Flaburgan
Copy link
Member

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

app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/views/layouts/application.html.haml Outdated Show resolved Hide resolved
app/views/report/_report_modal.erb Show resolved Hide resolved
features/desktop/report.feature Show resolved Hide resolved
@denschub
Copy link
Member

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.

@Flaburgan
Copy link
Member Author

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.

@denschub
Copy link
Member

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.

@Flaburgan Flaburgan force-pushed the improve-report-form branch 2 times, most recently from a2db434 to 301d342 Compare June 23, 2019 12:30
Copy link
Member

@denschub denschub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reconsidered my opinion here. I think referring to the terms is fine, as podmins can adjust their ToS templates to include links to additional documents like the Community Guidelines.

Some comments. I'm not really a fan of the current wording, and will propose an alternative once I had a bit more time to consider that. :)

app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/assets/stylesheets/interactions.scss Outdated Show resolved Hide resolved
app/views/report/_report_modal.erb Outdated Show resolved Hide resolved
@weex
Copy link

weex commented Aug 24, 2021

Bump on conflicting file

@Flaburgan Flaburgan marked this pull request as draft August 24, 2021 20:26
@Flaburgan
Copy link
Member Author

I rebased this PR, but I also marked it as Draft because of #8035 (comment) if someone can explain this to me (@jhass maybe?)

@Flaburgan Flaburgan changed the title Add a more detailled modal when reporting a post or a comment Add a more detailed modal when reporting a post or a comment Aug 24, 2021
@tclaus
Copy link
Member

tclaus commented Aug 25, 2021

@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.

@denschub
Copy link
Member

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 denschub removed their request for review August 25, 2021 15:46
@Flaburgan
Copy link
Member Author

@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 #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 😉

features/step_definitions/report_steps.rb Outdated Show resolved Hide resolved
features/step_definitions/report_steps.rb Outdated Show resolved Hide resolved
features/step_definitions/report_steps.rb Outdated Show resolved Hide resolved
@Flaburgan Flaburgan marked this pull request as ready for review August 26, 2021 21:12
@Flaburgan
Copy link
Member Author

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 #8239 on it so you will have the report.feature file and will be able to complete it.

Copy link
Member

@tclaus tclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bildschirmfoto 2021-08-27 um 07 43 43

Some points I found:

  • The text-field is too high.
  • When reporting another Item, the old reporting text appears. textfield should be cleared.
  • Is there a default / placeholder text?
  • Can you set the focus on the input-field after opening the dialog?

config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
@Flaburgan
Copy link
Member Author

  • 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.

config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
@Flaburgan
Copy link
Member Author

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

@Flaburgan
Copy link
Member Author

@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.

features/desktop/report.feature Show resolved Hide resolved
app/assets/javascripts/app/app.js Outdated Show resolved Hide resolved
app/assets/javascripts/app/app.js Outdated Show resolved Hide resolved
app/views/report/_report_modal.erb Outdated Show resolved Hide resolved
<p><%= t("report.modal.you_can_block") %></p>
<form id="report-content-form" accept-charset="UTF-8">
<p><label for="report-reason-field"><%= t("report.modal.reason_label") %></label></p>
<p><textarea id="report-reason-field" class="form-control" placeholder="<%= t('report.modal.placeholder') %>" autofocus required></textarea></p>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it really is important actually.

<p><%= t("report.modal.you_can_block") %></p>
<form id="report-content-form" accept-charset="UTF-8">
<p><label for="report-reason-field"><%= t("report.modal.reason_label") %></label></p>
<p><textarea id="report-reason-field" class="form-control" placeholder="<%= t('report.modal.placeholder') %>" autofocus required></textarea></p>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole interface can be improved, but because the work on this already started in #8239 I don't think I should change it in this MR, it will create conflicts. I think it's fine to merge it even if everything is displayed on one line, it doesn't break the UI:
image
If you disagree then I would suggest to have only one merge request for this and #8239 so that we work on the same branch and are not overlapping the work.

@tclaus
Copy link
Member

tclaus commented Oct 26, 2022

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

@denschub
Copy link
Member

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

it("keeps the publisher disabled after successful post creation", function() {

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.

@Flaburgan
Copy link
Member Author

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

Aaaaah sorry, indeed. I found back your commit 840478b 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?

@SuperTux88
Copy link
Member

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).

@Flaburgan
Copy link
Member Author

Ok I will remove them. And d63e3b9 ? Not sure how useful it is in the end...

@denschub
Copy link
Member

If it works without, it's not useful. :) Our test suite doesn't do a .. god job at maintaining a consistent state for each test, so it might be possible that that's needed, but I'd try without first.

And if it's needed, please file a new bug to fix the tests that do weird things.

@SuperTux88
Copy link
Member

And d63e3b9 ?

Oh yeah, that was already removed again too. So if it works without it, it can be removed too.

@Flaburgan
Copy link
Member Author

ok, everything should be fine now. Only question is, do you agree with #8035 (comment) ?

Copy link
Member

@SuperTux88 SuperTux88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things

config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
config/locales/diaspora/en.yml Outdated Show resolved Hide resolved
<p><%= t("report.modal.you_can_block") %></p>
<form id="report-content-form" accept-charset="UTF-8">
<p><label for="report-reason-field"><%= t("report.modal.reason_label") %></label></p>
<p><textarea id="report-reason-field" class="form-control" placeholder="<%= t('report.modal.placeholder') %>" autofocus required></textarea></p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it needs to be fixed somewhere, and I would have thought it fits better to this PR, because as soon as this is merged people are probably starting to send multi-line reports which then aren't rendered correctly. But if you rather want to fix it in the other PR, that's fine for me too, as long as both are in the same release (so 1.0 probably). But the current state is pretty "broken".

<p><%= t("report.modal.you_can_block") %></p>
<form id="report-content-form" accept-charset="UTF-8">
<p><label for="report-reason-field"><%= t("report.modal.reason_label") %></label></p>
<p><textarea id="report-reason-field" class="form-control" placeholder="<%= t('report.modal.placeholder') %>" autofocus required></textarea></p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if it's not working, it can also be removed again?

And it might not be super important, but it's still nice to have, and I think it shouldn't be hard to set focus with javascript when opening the modal?

app/views/layouts/application.html.haml Outdated Show resolved Hide resolved
app/views/people/index.html.haml Outdated Show resolved Hide resolved
app/views/people/show.html.haml Outdated Show resolved Hide resolved
app/views/shared/_stream.haml Outdated Show resolved Hide resolved
@Flaburgan Flaburgan force-pushed the improve-report-form branch 2 times, most recently from aa5289f to 50f3674 Compare June 3, 2023 23:11
app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/assets/javascripts/app/views.js Outdated Show resolved Hide resolved
app/views/people/show.html.haml Outdated Show resolved Hide resolved
features/support/paths.rb Show resolved Hide resolved
@Flaburgan
Copy link
Member Author

Everything is rebased and tests are green. @SuperTux88 if you can review it again, and once it's merged I can switch on #8239

Copy link
Member

@SuperTux88 SuperTux88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed some extra newlines myself, otherwise looks good. Assuming you'll fix #8035 (comment) in #8239

@SuperTux88 SuperTux88 merged commit 686f67d into diaspora:develop Nov 13, 2023
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants