mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
feat: uepr-12: Address comments
This commit is contained in:
parent
731ca7a7b2
commit
a8114679a1
6 changed files with 61 additions and 33 deletions
|
@ -1,10 +1,12 @@
|
||||||
import React, {useCallback, useState, useEffect} from 'react';
|
import React, {useCallback, useState, useEffect} from 'react';
|
||||||
import {CommunityGuidelines, communityGuidelines} from './community-guidelines.jsx';
|
import {CommunityGuidelines, communityGuidelines} from './community-guidelines.jsx';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import {FormattedMessage, injectIntl} from 'react-intl';
|
import {FormattedMessage, useIntl} from 'react-intl';
|
||||||
const ReactModal = require('react-modal');
|
const ReactModal = require('react-modal');
|
||||||
|
|
||||||
const CommunityGuidelinesModal = props => {
|
export const CommunityGuidelinesModal = props => {
|
||||||
|
useIntl();
|
||||||
|
|
||||||
const [currentPage, setCurrentPage] = useState(0);
|
const [currentPage, setCurrentPage] = useState(0);
|
||||||
const onNextPage = useCallback(() => setCurrentPage(currentPage + 1), [currentPage]);
|
const onNextPage = useCallback(() => setCurrentPage(currentPage + 1), [currentPage]);
|
||||||
const onBackPage = useCallback(() => setCurrentPage(currentPage - 1), [currentPage]);
|
const onBackPage = useCallback(() => setCurrentPage(currentPage - 1), [currentPage]);
|
||||||
|
@ -48,5 +50,3 @@ CommunityGuidelinesModal.propTypes = {
|
||||||
onComplete: PropTypes.func,
|
onComplete: PropTypes.func,
|
||||||
isOpen: PropTypes.bool
|
isOpen: PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IntlCommunityGuidelinesModal = injectIntl(CommunityGuidelinesModal);
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class WelcomeStep extends React.Component {
|
||||||
innerClassName="join-flow-inner-welcome-step"
|
innerClassName="join-flow-inner-welcome-step"
|
||||||
nextButton={this.props.createProjectOnComplete ? (
|
nextButton={this.props.createProjectOnComplete ? (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FormattedMessage id="general.getStarted" />
|
<FormattedMessage id="registration.reviewGuidelines" />
|
||||||
<img
|
<img
|
||||||
className="join-flow-next-button-arrow"
|
className="join-flow-next-button-arrow"
|
||||||
src="/svgs/project/r-arrow.svg"
|
src="/svgs/project/r-arrow.svg"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, {useEffect} from 'react';
|
import React, {useEffect, useMemo} from 'react';
|
||||||
import Button from '../forms/button.jsx';
|
import Button from '../forms/button.jsx';
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
@ -13,21 +13,23 @@ const OnboardingNavigation = ({
|
||||||
onBackPage,
|
onBackPage,
|
||||||
nextButtonText
|
nextButtonText
|
||||||
}) => {
|
}) => {
|
||||||
const dots = [];
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
new Image().src = '/images/onboarding/right-arrow.svg';
|
new Image().src = '/images/onboarding/right-arrow.svg';
|
||||||
new Image().src = '/images/onboarding/left-arrow.svg';
|
new Image().src = '/images/onboarding/left-arrow.svg';
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const dots = useMemo(() => {
|
||||||
|
const dotsComponents = [];
|
||||||
if (currentPage >= 0 && totalDots){
|
if (currentPage >= 0 && totalDots){
|
||||||
for (let i = 0; i < totalDots; i++){
|
for (let i = 0; i < totalDots; i++){
|
||||||
dots.push(<div
|
dotsComponents.push(<div
|
||||||
key={`dot page-${currentPage} ${i}`}
|
key={`dot page-${currentPage} ${i}`}
|
||||||
className={`dot ${currentPage === i && 'active'}`}
|
className={`dot ${currentPage === i && 'active'}`}
|
||||||
/>);
|
/>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return dotsComponents;
|
||||||
|
}, [currentPage, totalDots]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="navigation">
|
<div className="navigation">
|
||||||
|
|
|
@ -225,6 +225,7 @@
|
||||||
"registration.personalStepDescription": "Your individual responses will not be displayed publicly, and will be kept confidential and secure",
|
"registration.personalStepDescription": "Your individual responses will not be displayed publicly, and will be kept confidential and secure",
|
||||||
"registration.private": "We will keep this information private.",
|
"registration.private": "We will keep this information private.",
|
||||||
"registration.problemsAre": "The problems are:",
|
"registration.problemsAre": "The problems are:",
|
||||||
|
"registration.reviewGuidelines": "Review Community Guidelines",
|
||||||
"registration.selectCountry": "Select country",
|
"registration.selectCountry": "Select country",
|
||||||
"registration.startOverInstruction": "Click \"Start over.\"",
|
"registration.startOverInstruction": "Click \"Start over.\"",
|
||||||
"registration.studentPersonalStepDescription": "This information will not appear on the Scratch website.",
|
"registration.studentPersonalStepDescription": "This information will not appear on the Scratch website.",
|
||||||
|
@ -483,29 +484,29 @@
|
||||||
|
|
||||||
"communityGuidelines.buttons.back": "Back",
|
"communityGuidelines.buttons.back": "Back",
|
||||||
"communityGuidelines.buttons.next": "Next",
|
"communityGuidelines.buttons.next": "Next",
|
||||||
"communityGuidelines.buttons.finish": "I Understand",
|
"communityGuidelines.buttons.finish": "I Agree",
|
||||||
"communityGuidelines.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect",
|
"communityGuidelines.guidelines.respectSection": "Become a New Scratcher - Treat everyone with respect",
|
||||||
"communityGuidelines.guidelines.respectHeader": "Scratchers treat everyone with respect.",
|
"communityGuidelines.guidelines.respectHeader": "New Scratchers treat everyone with respect.",
|
||||||
"communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
"communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
||||||
"communityGuidelines.guidelines.safeSection": "Become a Scratcher - Be safe",
|
"communityGuidelines.guidelines.safeSection": "Become a New Scratcher - Be safe",
|
||||||
"communityGuidelines.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.",
|
"communityGuidelines.guidelines.safeHeader": "New Scratchers are safe: we keep personal and contact information private.",
|
||||||
"communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
"communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
||||||
"communityGuidelines.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback",
|
"communityGuidelines.guidelines.feedbackSection": "Become a New Scratcher - Give helpful feedback",
|
||||||
"communityGuidelines.guidelines.feedbackHeader": "Scratchers give helpful feedback.",
|
"communityGuidelines.guidelines.feedbackHeader": "New Scratchers give helpful feedback.",
|
||||||
"communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
"communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
||||||
"communityGuidelines.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture",
|
"communityGuidelines.guidelines.remix1Section": "Become a New Scratcher - Embrace remix culture",
|
||||||
"communityGuidelines.guidelines.remix1Header": "Scratchers embrace remix culture.",
|
"communityGuidelines.guidelines.remix1Header": "New Scratchers embrace remix culture.",
|
||||||
"communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
"communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
||||||
"communityGuidelines.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture",
|
"communityGuidelines.guidelines.remix2Section": "Become a New Scratcher - Embrace remix culture",
|
||||||
"communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
"communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
||||||
"communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
"communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
||||||
"communityGuidelines.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture",
|
"communityGuidelines.guidelines.remix3Section": "Become a New Scratcher - Embrace remix culture",
|
||||||
"communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.",
|
"communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.",
|
||||||
"communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
"communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
||||||
"communityGuidelines.guidelines.honestSection": "Become a Scratcher - Be honest",
|
"communityGuidelines.guidelines.honestSection": "Become a New Scratcher - Be honest",
|
||||||
"communityGuidelines.guidelines.honestHeader": "Scratchers are honest.",
|
"communityGuidelines.guidelines.honestHeader": "New Scratchers are honest.",
|
||||||
"communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
"communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
||||||
"communityGuidelines.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly",
|
"communityGuidelines.guidelines.friendlySection": "Become a New Scratcher - Keep the site friendly",
|
||||||
"communityGuidelines.guidelines.friendlyHeader": "Scratchers help keep the site friendly.",
|
"communityGuidelines.guidelines.friendlyHeader": "New Scratchers help keep the site friendly.",
|
||||||
"communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it."
|
"communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it."
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,31 @@
|
||||||
"becomeAScratcher.noInvitation.body": "To become a Scratcher, you must be active on Scratch for a while, share several projects, and comment constructively in the community. After a few weeks, you will receive a notification inviting you to become a Scratcher. Scratch on!",
|
"becomeAScratcher.noInvitation.body": "To become a Scratcher, you must be active on Scratch for a while, share several projects, and comment constructively in the community. After a few weeks, you will receive a notification inviting you to become a Scratcher. Scratch on!",
|
||||||
"becomeAScratcher.finishLater.header": "No worries, take your time!",
|
"becomeAScratcher.finishLater.header": "No worries, take your time!",
|
||||||
"becomeAScratcher.finishLater.body": "By leaving this page, you will not finish the process to become a Scratcher and will stay as a New Scratcher. If you change your mind later, you can always come back via your profile page.",
|
"becomeAScratcher.finishLater.body": "By leaving this page, you will not finish the process to become a Scratcher and will stay as a New Scratcher. If you change your mind later, you can always come back via your profile page.",
|
||||||
"becomeAScratcher.finishLater.clickBecomeAScratcher": "Just click on “★ Become a Scratcher!” below your username."
|
"becomeAScratcher.finishLater.clickBecomeAScratcher": "Just click on “★ Become a Scratcher!” below your username.",
|
||||||
|
|
||||||
|
"communityGuidelines.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect",
|
||||||
|
"communityGuidelines.guidelines.respectHeader": "Scratchers treat everyone with respect.",
|
||||||
|
"communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
||||||
|
"communityGuidelines.guidelines.safeSection": "Become a Scratcher - Be safe",
|
||||||
|
"communityGuidelines.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.",
|
||||||
|
"communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
||||||
|
"communityGuidelines.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback",
|
||||||
|
"communityGuidelines.guidelines.feedbackHeader": "Scratchers give helpful feedback.",
|
||||||
|
"communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
||||||
|
"communityGuidelines.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture",
|
||||||
|
"communityGuidelines.guidelines.remix1Header": "Scratchers embrace remix culture.",
|
||||||
|
"communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
||||||
|
"communityGuidelines.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture",
|
||||||
|
"communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
||||||
|
"communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
||||||
|
"communityGuidelines.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture",
|
||||||
|
"communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.",
|
||||||
|
"communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
||||||
|
"communityGuidelines.guidelines.honestSection": "Become a Scratcher - Be honest",
|
||||||
|
"communityGuidelines.guidelines.honestHeader": "Scratchers are honest.",
|
||||||
|
"communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
||||||
|
"communityGuidelines.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly",
|
||||||
|
"communityGuidelines.guidelines.friendlyHeader": "Scratchers help keep the site friendly.",
|
||||||
|
"communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it."
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ const Page = require('../../components/page/www/page.jsx');
|
||||||
const SplashPresentation = require('./presentation.jsx');
|
const SplashPresentation = require('./presentation.jsx');
|
||||||
const {injectIntl} = require('react-intl');
|
const {injectIntl} = require('react-intl');
|
||||||
const {
|
const {
|
||||||
IntlCommunityGuidelinesModal
|
CommunityGuidelinesModal
|
||||||
} = require('../../components/community-guidelines/community-guidelines-modal.jsx');
|
} = require('../../components/community-guidelines/community-guidelines-modal.jsx');
|
||||||
|
|
||||||
const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end time for now
|
const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end time for now
|
||||||
|
@ -203,7 +203,7 @@ class Splash extends React.Component {
|
||||||
const shouldReviewCommunityGuidelines = this.props.shouldReviewCommunityGuidelines;
|
const shouldReviewCommunityGuidelines = this.props.shouldReviewCommunityGuidelines;
|
||||||
|
|
||||||
return (<>
|
return (<>
|
||||||
<IntlCommunityGuidelinesModal
|
<CommunityGuidelinesModal
|
||||||
isOpen={shouldReviewCommunityGuidelines && this.props.user.id}
|
isOpen={shouldReviewCommunityGuidelines && this.props.user.id}
|
||||||
userId={`${this.props.user.id}`}
|
userId={`${this.props.user.id}`}
|
||||||
onComplete={this.handleCommunityGuidelinesReview}
|
onComplete={this.handleCommunityGuidelinesReview}
|
||||||
|
|
Loading…
Reference in a new issue