mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Format prompts with multiple paragraphs and a list
This commit is contained in:
parent
035913b954
commit
2d6d746922
4 changed files with 95 additions and 7 deletions
|
@ -85,10 +85,16 @@ class ReportModal extends React.Component {
|
||||||
const category = reportOptions.find(o => o.value === this.state.categoryValue) || reportOptions[0];
|
const category = reportOptions.find(o => o.value === this.state.categoryValue) || reportOptions[0];
|
||||||
let finalCategory = category;
|
let finalCategory = category;
|
||||||
|
|
||||||
|
|
||||||
if (category.subcategories) {
|
if (category.subcategories) {
|
||||||
finalCategory = category.subcategories.find(o => o.value === this.state.subcategoryValue) || category.subcategories[0];
|
finalCategory = category.subcategories.find(o => o.value === this.state.subcategoryValue) || category.subcategories[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const promptList = finalCategory.list && finalCategory.list.map((listItem, index) =>
|
||||||
|
<li key={index}>
|
||||||
|
<FormattedMessage {...listItem} />
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
|
||||||
// Confirmation step is shown if a report has been submitted, even if state is reset by closing the modal.
|
// Confirmation step is shown if a report has been submitted, even if state is reset by closing the modal.
|
||||||
// This prevents multiple report submission within the same session because submission is stored in redux.
|
// This prevents multiple report submission within the same session because submission is stored in redux.
|
||||||
|
@ -230,7 +236,19 @@ class ReportModal extends React.Component {
|
||||||
<div className="instructions-header">
|
<div className="instructions-header">
|
||||||
<FormattedMessage {...finalCategory.label} />
|
<FormattedMessage {...finalCategory.label} />
|
||||||
</div>
|
</div>
|
||||||
|
<p>
|
||||||
<FormattedMessage {...finalCategory.prompt} />
|
<FormattedMessage {...finalCategory.prompt} />
|
||||||
|
</p>
|
||||||
|
{finalCategory.prompt2 && (
|
||||||
|
<p>
|
||||||
|
<FormattedMessage {...finalCategory.prompt2} />
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
{promptList && (
|
||||||
|
<ul>
|
||||||
|
{promptList}
|
||||||
|
</ul>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</FormStep>
|
</FormStep>
|
||||||
</Progression>
|
</Progression>
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul, p {
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ const subcategoryShape = shape({
|
||||||
value: string.isRequired,
|
value: string.isRequired,
|
||||||
label: messageShape.isRequired,
|
label: messageShape.isRequired,
|
||||||
prompt: messageShape.isRequired,
|
prompt: messageShape.isRequired,
|
||||||
|
prompt2: messageShape,
|
||||||
|
list: arrayOf(messageShape),
|
||||||
preventSubmission: bool
|
preventSubmission: bool
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -83,18 +85,64 @@ const REPORT_OPTIONS = [
|
||||||
label: {id: 'report.reasonPlaceHolder'},
|
label: {id: 'report.reasonPlaceHolder'},
|
||||||
prompt: {id: 'report.promptPlaceholder'}
|
prompt: {id: 'report.promptPlaceholder'}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'report.reasonDontLikeIt',
|
||||||
|
label: {id: 'report.reasonDontLikeIt'},
|
||||||
|
prompt: {id: 'report.promptDontLikeIt'},
|
||||||
|
prompt2: {id: 'report.promptDontLikeIt'},
|
||||||
|
list: [
|
||||||
|
{id: 'report.itemSupportive'},
|
||||||
|
{id: 'report.itemConstructive'},
|
||||||
|
{id: 'report.itemSpecific'}
|
||||||
|
],
|
||||||
|
preventSubmission: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'report.reasonDoesntWork',
|
||||||
|
label: {id: 'report.reasonDoesntWork'},
|
||||||
|
prompt: {id: 'report.promptDoesntWork'},
|
||||||
|
preventSubmission: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'report.reasonCouldImprove',
|
||||||
|
label: {id: 'report.reasonCouldImprove'},
|
||||||
|
prompt: {id: 'report.promptCouldImprove'},
|
||||||
|
preventSubmission: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'report.reasonTooHard',
|
||||||
|
label: {id: 'report.reasonTooHard'},
|
||||||
|
prompt: {id: 'report.promptTooHard'},
|
||||||
|
preventSubmission: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '9',
|
||||||
|
label: {id: 'report.reasonMisleading'},
|
||||||
|
prompt: {id: 'report.promptMisleading'}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '10',
|
||||||
|
label: {id: 'report.reasonFaceReveal'},
|
||||||
|
prompt: {id: 'report.promptFaceReveal'}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: '11',
|
value: '11',
|
||||||
label: {id: 'report.reasonCopy'},
|
label: {id: 'report.reasonNoRemixingAllowed'},
|
||||||
prompt: {id: 'report.promptCopy'}
|
prompt: {id: 'report.promptNoRemixingAllowed'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '12',
|
value: '12',
|
||||||
label: {id: 'report.reasonPersonal'},
|
label: {id: 'report.reasonCreatorsSafety'},
|
||||||
prompt: {id: 'report.promptPersonal'},
|
prompt: {id: 'report.promptCreatorsSafety'}
|
||||||
preventSubmission: true
|
},
|
||||||
|
{
|
||||||
|
value: '13',
|
||||||
|
label: {id: 'report.reasonSomethingElse'},
|
||||||
|
prompt: {id: 'report.promptSomethingElse'}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,15 @@
|
||||||
"report.reasonMissing": "Please select a reason",
|
"report.reasonMissing": "Please select a reason",
|
||||||
"report.reasonImage": "Inappropriate Images",
|
"report.reasonImage": "Inappropriate Images",
|
||||||
"report.reasonPersonal": "Sharing Personal Contact Information",
|
"report.reasonPersonal": "Sharing Personal Contact Information",
|
||||||
|
"report.reasonDontLikeIt": "I don't like this project",
|
||||||
|
"report.reasonDoesntWork": "This project does not work",
|
||||||
|
"report.reasonCouldImprove": "This project could be improved on",
|
||||||
|
"report.reasonTooHard": "This project is too hard",
|
||||||
|
"report.reasonMisleading": "The project is misleading or tricks the community",
|
||||||
|
"report.reasonFaceReveal": "It's a face reveal or is just trying to show someone's picture",
|
||||||
|
"report.reasonNoRemixingAllowed": "The project doesn't allow remixing",
|
||||||
|
"report.reasonCreatorsSafety": "I'm worried about the safety of the creator of this project",
|
||||||
|
"report.reasonSomethingElse": "Something else",
|
||||||
"report.receivedHeader": "We have received your report!",
|
"report.receivedHeader": "We have received your report!",
|
||||||
"report.receivedBody": "The Scratch Team will review the project based on the Scratch community guidelines.",
|
"report.receivedBody": "The Scratch Team will review the project based on the Scratch community guidelines.",
|
||||||
"report.promptPlaceholder": "Select a reason why above.",
|
"report.promptPlaceholder": "Select a reason why above.",
|
||||||
|
@ -269,6 +278,19 @@
|
||||||
"report.promptPersonal": "Please say where the personal contact information is shared (For example: Notes & Credits, sprite name, project text, etc.)",
|
"report.promptPersonal": "Please say where the personal contact information is shared (For example: Notes & Credits, sprite name, project text, etc.)",
|
||||||
"report.promptGuidelines": "Please be specific about why this project does not follow our Community Guidelines",
|
"report.promptGuidelines": "Please be specific about why this project does not follow our Community Guidelines",
|
||||||
"report.promptImage": "Please say the name of the sprite or the backdrop with the inappropriate image",
|
"report.promptImage": "Please say the name of the sprite or the backdrop with the inappropriate image",
|
||||||
|
"report.promptDontLikeIt": "Scratch projects are made by people of all ages and levels of experience. If you don't like this project because you feel it can be improved upon, we encourage you to share constructive feedback directly with the creator.",
|
||||||
|
"report.prompt2DontLikeIt": "Here are tips on sharing constructive feedback:",
|
||||||
|
"report.itemSupportive": "Be supportive and encouraging.",
|
||||||
|
"report.itemConstructive": "Leave a comment telling them what you like, but also what they could do to make the project better.",
|
||||||
|
"report.itemSpecific": "Try to be specific with your feedback. For instance: The controls to move the character did not work.",
|
||||||
|
"report.promptDoesntWork": "<p>A Scratch project, like any other application, may contain a few bugs. That is expected and completely okay!</p> <p>We encourage you to share any issues you discover directly with the creator of the project. It's also helpful to provide suggestions on how they may improve their project, if possible.</p>",
|
||||||
|
"report.promptCouldImprove": "Scratch projects are made by people of all ages and levels of experience. If you don't like this project because you feel it can be improved upon, we encourage you to share constructive feedback directly with the creator.<br />Here are tips on sharing constructive feedback: <ul><li>Be supportive and encouraging.</li><li>Leave a comment telling them what you like, but also what they could do to make the project better.</li><li>Try to be specific with your feedback. For instance: The controls to move the character did not work.</li>",
|
||||||
|
"report.promptTooHard": "If you feel a project could be easier, we encourage you to share that feedback directly with the creator of the project. Or remix it yourself and make it as easy or hard as you like!",
|
||||||
|
"report.promptMisleading": "Tell us more about how it's tricking or misleading people",
|
||||||
|
"report.promptFaceReveal": "Scratch allows people to use pictures of their face in creative projects like games, stories, or animations. However, projects that are just a picture of their face, or which focus entirely on their physical appearance, aren't allowed on Scratch. If this is a 'face reveal', or the project focuses on the person's appearance, please click report.",
|
||||||
|
"report.promptNoRemixingAllowed": "Please let us know where the project says it is not okay to remix — such as in the Notes & Credits, project title, etc. ",
|
||||||
|
"report.promptCreatorsSafety": "It's important that everyone on Scratch remains safe online and in real life. Please let us know why you are worried about the safety of this user.",
|
||||||
|
"report.promptSomethingElse": "We encourage you to double check if your report fits any of the other available categories. If you strongly feel it does not, please explain why this project breaks the Community Guidelines.",
|
||||||
"report.tooLongError": "That's too long! Please find a way to shorten your text.",
|
"report.tooLongError": "That's too long! Please find a way to shorten your text.",
|
||||||
"report.tooShortError": "That's too short. Please describe in detail what's inappropriate or disrespectful about the project.",
|
"report.tooShortError": "That's too short. Please describe in detail what's inappropriate or disrespectful about the project.",
|
||||||
"report.send": "Send",
|
"report.send": "Send",
|
||||||
|
|
Loading…
Reference in a new issue