Skip to content

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Aug 23, 2024

This button is a mailto:[email protected] link with a prefilled subject and body, that should make it easier for users to report crates which are violating our usage policies or are otherwise worth reporting to us.

Related:

Button

Bildschirmfoto 2024-08-23 um 10 44 17

Email template

Bildschirmfoto 2024-08-23 um 10 44 36

This button is a `mailto:[email protected]` link with a prefilled subject and body, that should make it easier for users to report crates which are violating our usage policies or are otherwise worth reporting to us.
@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-frontend 🐹 labels Aug 23, 2024
@Turbo87 Turbo87 requested a review from a team August 23, 2024 08:46
{{/if}}

<a
href="mailto:[email protected]?subject=The%20%22{{@crate.name}}%22%20crate&body=I'm%20reporting%20the%20%22{{@crate.name}}%22%20crate%20because%3A%0A%0A-%20%5B%20%5D%20it%20contains%20spam%0A-%20%5B%20%5D%20it%20is%20name-squatting%20(reserving%20a%20crate%20name%20without%20content)%0A-%20%5B%20%5D%20it%20is%20abusive%20or%20otherwise%20harmful%0A-%20%5B%20%5D%20it%20contains%20a%20vulnerability%20(please%20try%20to%20contact%20the%20crate%20author%20first)%0A-%20%5B%20%5D%20it%20is%20violating%20the%20usage%20policy%20in%20some%20other%20way%20(please%20specify%20below)%0A%0AAdditional%20details%3A%0A%0A%3Cplease%20add%20more%20information%20if%20you%20can%3E"
Copy link
Contributor

@paolobarbolini paolobarbolini Aug 23, 2024

Choose a reason for hiding this comment

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

Drive-by review: this would probably work better with something along the lines of (however that's done in Ember):

`mailto:[email protected]?${new URLSearchParams({
    subject: 'blabla',
    body: 'blablabla'
}).toString()}`

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I had it roughly like that at first, but since the allowed characters in crate names are fairly restricted and the message is unlikely to change that often I figured it would probably be sufficient to have it in the encoded form directly and save a couple of payload bytes :)

@Turbo87 Turbo87 merged commit d567dd9 into rust-lang:main Aug 23, 2024
9 checks passed
@Turbo87 Turbo87 deleted the report-button branch August 23, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants