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

[online safety] Add safety categories to report abuse form #8635

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

drewgillies
Copy link
Contributor

@drewgillies drewgillies commented Jun 15, 2021

Addresses #8590
Spec: https://github.com/NuGet/Home/blob/dev/proposed/2021/NuGetOrgReportForm-SafetyChanges.md

  • Adds online safety categories and associated text to form
  • Adds tab indexes for a11y to other text (more a11y work is needed for this form, but this was a quick win for now)
  • Removed contacted owner checkbox for safety categories - we don't want customers to feel they should do this
  • All under a feature flag for now

[note that the gif below shows inconsistent "the" and "this" in dropdown. Since fixed.]

reportabuseform

@drewgillies drewgillies requested a review from a team as a code owner June 15, 2021 02:28
@drewgillies drewgillies force-pushed the dg-reportabuse-safetyadditions branch from 70453ba to 74cc83f Compare June 15, 2021 02:29
@drewgillies drewgillies changed the title Add safety categories to report abuse form [online safety] Add safety categories to report abuse form Jun 15, 2021
@drewgillies drewgillies force-pushed the dg-reportabuse-safetyadditions branch from 74cc83f to cd41935 Compare June 15, 2021 02:59
@jcjiang
Copy link

jcjiang commented Jun 15, 2021

I think these are great changes, especially conditionally rendering the description that contains details that complainants should include. Once we replace the security/DMCA forms with associated portals, we should have far less support requests sent in with insufficient information.

@anangaur
Copy link
Member

Should some of these be sub-topics i.e. another dropdown for specific selections? Seems a bit dense and overload in the single dropdown

@@ -112,6 +145,42 @@
$('#report-abuse-form').show();
}

// We don't suggest the customer contact the owner in the case of safety violations
if (val === 'ChildSexualExploitationOrAbuse'
Copy link
Contributor

Choose a reason for hiding this comment

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

If you move this logic to the Controller it can be unit tested.

Copy link
Contributor Author

@drewgillies drewgillies Jun 15, 2021

Choose a reason for hiding this comment

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

I'm not sure what we'd be testing. This is simply getting the value of the dropdown and turning messages, and in this case a control, on/off (and duplicates logic we're already using).

@drewgillies
Copy link
Contributor Author

drewgillies commented Jun 15, 2021

Should some of these be sub-topics i.e. another dropdown for specific selections? Seems a bit dense and overload in the single dropdown

@anangaur I ran this idea by legal some time back, but our policy requires a more prominent position for the safety categories.

/cc @zhhyu

@zhhyu
Copy link
Contributor

zhhyu commented Jun 16, 2021

How about a grouping of options:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup

@drewgillies
Copy link
Contributor Author

drewgillies commented Jun 16, 2021

How about a grouping of options:

@zhhyu That may be redundant as we have some other changes potentially coming down the pike, which may remove some of the pre-existing options (i.e. route customers to other locations for them and remove them from the dropdown). If this happens, most of what remains will be safety options. So, we could consider grouping options if these future changes determine that leaving the original ones untouched is better. For now I'd suggest leaving it as a simple list. This function (https://github.com/NuGet/NuGetGallery/pull/8635/files#diff-aad522d53d7c37d2d65abfa950169d203d7eff0393d17330cda261623c1f9ee7R46) doesn't support grouping (see

public static MvcHtmlString EnumDropDownListFor<TModel, TEnum>(this HtmlHelper<TModel> self, Expression<Func<TModel, TEnum?>> expression, IEnumerable<TEnum> values, string emptyItemText, Dictionary<string, object> htmlAttributes)
), so it may not be a trivial change.

/cc @jcjiang

@drewgillies
Copy link
Contributor Author

@zhhyu @skofman1 I'm blocked on merging this--if my explanations above satisfy you, would you please approve?

@zhhyu
Copy link
Contributor

zhhyu commented Jun 18, 2021

I suggest to get another approval from @jcjiang , but I see that this change is behind the feature flag, so it's fine to check in because it will not be alive until we are ready.

@drewgillies
Copy link
Contributor Author

@zhhyu I'm talking with @jcjiang about some tweaks, and I can float them as a new (and more trivial) PR. Thanks. Will merge this one.

@drewgillies drewgillies merged commit 908da7f into main Jun 18, 2021
@drewgillies drewgillies deleted the dg-reportabuse-safetyadditions branch September 20, 2022 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants