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

Change report modal to include category selection in web UI #17565

Merged
merged 4 commits into from
Feb 23, 2022

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Feb 16, 2022

A redesign of the report dialog in the web UI which integrates the report category functionality. You select the reason for reporting at the start, and are led through multiple screens depending on your choices. The violation category leads to an additional screen where you can check off which server rules you think were violated. As before, there is a screen for attaching statuses and a screen for writing additional comments. The report dialog now displays a thank you message at the end instead of automatically closing. The "I don't like it" choice at the beginning leads right to the "thank you" screen, which presents options such as muting and blocking the account.

Step 1 Step 2 Step 3 Step 4 Step 5
image image image image image

Funded through the BMBF (BMBF Förderkennzeichen: 01IS21S29)

@Gargron Gargron added the ui Front-end, design label Feb 16, 2022
@Gargron Gargron force-pushed the feature-multi-step-report branch 2 times, most recently from 04e48c5 to 6ad517e Compare February 19, 2022 00:12
@Gargron Gargron force-pushed the feature-multi-step-report branch from 6ad517e to ff02832 Compare February 19, 2022 00:15
@Gargron Gargron marked this pull request as ready for review February 19, 2022 00:31
@ClearlyClaire
Copy link
Contributor

Overall it looks nice and welcoming, and the addition of a last screen is useful, however:

  • it's a lot more clicks to report a single user, which may be a problem when facing e.g. harassment from multiple accounts
  • what's the difference between “I don't like it” and “It's something else”?
  • the thanks screen should probably check whether the person is already blocked or muted, in which case it would alter the message/suggestions; otherwise I'm afraid it would only be slightly confusing “uh? didn't I block this user already?”

@ClearlyClaire
Copy link
Contributor

Reading the code (which I haven't fully reviewed yet), my understanding is that “I don't like it” skips to the last screen without actually submitting a report. If that's true, then that last screen's text for this case is seriously misleading.

@ClearlyClaire
Copy link
Contributor

If the screen does not have enough vertical space (such as when using some phones in landscape mode), the modal is unusable:
Screen Shot 2022-02-19 at 14 40 26
Screen Shot 2022-02-19 at 14 41 12
Screen Shot 2022-02-19 at 14 41 25

@ClearlyClaire
Copy link
Contributor

Also, the forwarded report won't include the category and rules, so if the report relies on that, it may be of lesser quality. Not much that can be done about that (I mean, we could add a property or two for that, but ultimately, local rules may not mean much to a remote user's admin), but maybe adding a bit to the “The account is from another server. Send anonymized copy of the report there as well?” text may help. For instance “The forwarded report will include statuses and additional comments, but not the selected category”.

@Gargron
Copy link
Member Author

Gargron commented Feb 20, 2022

Addressed points (except federation of category, though I feel like it could actually be fairly easily added)

- Change thank you text to be different based on category
- Change starting headline to be different for account and status reports
- Change toggle components to have a checkmark when checked
- Fix report dialog being cut off on small screens
- Fix thank you screen offering mute or block if already muted or blocked
- Refactor toggle components in report dialog into one component
@Gargron Gargron force-pushed the feature-multi-step-report branch from 05ea007 to 19e96ef Compare February 20, 2022 23:44
app/javascript/mastodon/features/report/thanks.js Outdated Show resolved Hide resolved
Comment on lines 39 to 42
<input type={multiple ? 'checkbox' : 'radio'} name={name} value={value} checked={checked} onChange={this.handleChange} />

<span
className={classNames('poll__input', { active: checked })}
Copy link
Contributor

Choose a reason for hiding this comment

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

the classNames call should probably read like { active: checked, checkbox: multiple }

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 understand that for consistency with polls and system input designs, multiple choice boxes should be square, but in the iOS design we used circles for both types and I wanted to give it a go. I do not believe there should be actual confusion over whether or not you can select multiple, since the text says "Select all that apply" and it's otherwise pretty obvious from context.

Copy link
Contributor

Choose a reason for hiding this comment

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

but in the iOS design we used circles for both types and I wanted to give it a go

but… why… circles are pretty much universally for radio buttons and squares for checkboxes…

app/javascript/mastodon/features/report/thanks.js Outdated Show resolved Hide resolved
@Gargron
Copy link
Member Author

Gargron commented Feb 22, 2022

Changed wording on the thank you screen when "I don't like this" was selected:

image

Added option to unfollow when the reported account is followed. Made it so the mute/block buttons say "Muted" and "Blocked" when the account is already muted or blocked. Made all actions close the modal. Chose to skip the mute dialog because I think opening another dialog right after this one is not good.

@Gargron Gargron force-pushed the feature-multi-step-report branch from 9e41bbf to e8b6fa2 Compare February 22, 2022 23:03
@ClearlyClaire
Copy link
Contributor

That the “Muted” and “Blocked” buttons are clickable is slightly weird but is not a big deal. Same with the buttons closing the modal without any kind of feedback. I think those things can be improved upon later.

I still don't understand why you would use round buttons for checkboxes, in opposition to design conventions used everywhere in Mastodon and outside. Since you're bringing up the iOS app, let me quote Apple's human interface guidelines (for MacOS, as for iOS it doesn't seem to recommend checkboxes or radio buttons at all, but switch buttons and pickers or table views):

Use a set of checkboxes when the user needs the ability to select multiple options at the same time. Except in a rare case where a mixed state is needed, radio buttons should be mutually exclusive.

https://developer.apple.com/design/human-interface-guidelines/macos/buttons/radio-buttons

@Gargron
Copy link
Member Author

Gargron commented Feb 23, 2022

Changed because I don't want border-radius to block an important feature, but personally I liked the round ones more

@Gargron Gargron merged commit a9a43de into main Feb 23, 2022
@Gargron Gargron deleted the feature-multi-step-report branch February 23, 2022 19:03
@shleeable
Copy link
Contributor

Excellent PR. Thanks 👍

@tribela
Copy link
Contributor

tribela commented Feb 24, 2022

image
Publish button got bigger text.
was it intended?

@Gargron
Copy link
Member Author

Gargron commented Feb 24, 2022

Yes, I adjusted button styles. I might make the text slightly smaller again though, it doesn't look quite right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Front-end, design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants