From b42966ac6ae05bb47097c1ef1253d357b4a97ce1 Mon Sep 17 00:00:00 2001 From: seotts Date: Fri, 22 Jan 2021 12:13:40 -0500 Subject: [PATCH] Revert "Add feedback step using a Formsy textarea" This reverts commit 5e4fc154c6983059dbfaf011d0d404e5bdc4e0db. --- src/components/modal/mute/modal.jsx | 166 ++++-------------- src/components/modal/mute/modal.scss | 42 +---- src/l10n.json | 10 +- static/svgs/commenting/thank_you_envelope.svg | 83 --------- 4 files changed, 37 insertions(+), 264 deletions(-) delete mode 100644 static/svgs/commenting/thank_you_envelope.svg diff --git a/src/components/modal/mute/modal.jsx b/src/components/modal/mute/modal.jsx index d1af75cd5..b846db502 100644 --- a/src/components/modal/mute/modal.jsx +++ b/src/components/modal/mute/modal.jsx @@ -10,38 +10,22 @@ const Button = require('../../forms/button.jsx'); const Progression = require('../../progression/progression.jsx'); const FlexRow = require('../../flex-row/flex-row.jsx'); const MuteStep = require('./mute-step.jsx'); -const Formsy = require('formsy-react').default; -const InplaceInput = require('../../../components/forms/inplace-input.jsx'); const classNames = require('classnames'); require('./modal.scss'); -const steps = { - COMMENT_ISSUE: 0, - MUTE_INFO: 1, - BAN_WARNING: 2, - USER_FEEDBACK: 3, - FEEDBACK_SENT: 4 -}; - -const onUpdate = update => update; - class MuteModal extends React.Component { constructor (props) { super(props); bindAll(this, [ 'handleNext', - 'handlePrevious', - 'handleGoToFeedback', - 'handleFeedbackInput', - 'handleFeedbackSubmit' + 'handlePrevious' ]); this.numSteps = 2; if (this.props.showWarning) { this.numSteps++; } this.state = { - step: 0, - feedback: '' + step: 0 }; } handleNext () { @@ -56,28 +40,7 @@ class MuteModal extends React.Component { step: Math.max(0, this.state.step - 1) }); } - handleGoToFeedback () { - this.setState({ - step: steps.USER_FEEDBACK - }); - } - - handleFeedbackSubmit () { - console.log(this.state.feedback); - this.setState({ - step: steps.FEEDBACK_SENT - }); - } - - handleFeedbackInput (event) { - this.setState({ - feedback: event.target.value, - }); - } - render () { - const finalStep = this.showWarning ? steps.BAN_WARNING : steps.MUTE_INFO; - return (

-

- - - - )}} - /> -

- - -

- - - - )}} - /> -

-
- -

- -

- - 0 ? - 'compose-valid' : 'compose-invalid')} - handleUpdate={onUpdate} - name="compose-feedback" - rows="5" - type="textarea" - value={this.state.feedback} - onInput={this.handleFeedbackInput} - /> - -
- -
-
- -

- -

+ {this.props.showWarning ? ( + +

+ + + + )}} + /> +

+
) : null} - - {this.state.step >= finalStep ? ( + + {this.state.step > 0 ? ( + + ) : null } + {this.state.step >= this.numSteps - 1 ? ( ) : ( @@ -211,30 +137,6 @@ class MuteModal extends React.Component { )} - {this.state.step > 0 && this.state.step < steps.USER_FEEDBACK ? ( - - ) : this.state.step === steps.USER_FEEDBACK ? ( - - ) : null} -
diff --git a/src/components/modal/mute/modal.scss b/src/components/modal/mute/modal.scss index 60c2d080d..16c0f4fa6 100644 --- a/src/components/modal/mute/modal.scss +++ b/src/components/modal/mute/modal.scss @@ -46,55 +46,17 @@ border-top: 1px solid $ui-blue-25percent; } .mute-nav { - display: flex; + display:flex; justify-content: space-between; padding: 20px 0; - flex-direction: row-reverse; } - - .feedback-nav { - width: 100%; - display: flex; - justify-content: center; - flex-direction: row-reverse; - padding: 24px; - - button { - // min-width: 100px; - margin: 0 4px; - } - - // .action-button-text { - // span { - // text-align: center; - // } - // } - - .close-button { - background-color: $ui-dark-gray; - } - } - .back-button { margin-top: 0; margin-bottom: 0; } .next-button, .close-button { - // margin-left: auto; + margin-left: auto; margin-top: 0; margin-bottom: 0; } - - .feedback-text { - text-align: center; - } - - .full-width-form { - height: 180px; - width: 100%; - } - - .character-limit { - font-size: .75rem; - } } diff --git a/src/l10n.json b/src/l10n.json index 7ab0494bb..3e6689df7 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -7,7 +7,6 @@ "general.birthMonth": "Birth Month", "general.birthYear": "Birth Year", "general.donate": "Donate", - "general.cancel": "Cancel", "general.close": "Close", "general.collaborators": "Collaborators", "general.community": "Community", @@ -83,7 +82,6 @@ "general.scratchStore": "Scratch Store", "general.search": "Search", "general.searchEmpty": "Nothing found", - "general.send": "Send", "general.signIn": "Sign in", "general.startOver": "Start over", "general.statistics": "Statistics", @@ -358,13 +356,7 @@ "comments.muted.clickHereLinkText": "click here", "comments.muted.warningBlocked": "If you continue to post comments like this, it will cause you to be blocked from using Scratch", "comments.muted.warningCareful": "We don't want that to happen, so please be careful and make sure you have read and understand the {CommunityGuidelinesLink} before you try to post again!", - "comments.muted.mistake": "Think this was a mistake? {feedbackLink}.", - "comments.muted.feedbackLinkText": "Let us know", - "comments.muted.mistakeHeader": "Think this was a mistake?", - "comments.muted.mistakeInstructions": "Sometimes the filter catches things by accident. Your feedback will help prevent this from happening in the future.", - "comments.muted.thanksFeedback": "Thanks for letting us know!", - "comments.muted.thanksInfo": "Your feedback will help us make Scratch better.", - "comments.muted.characterLimit": "500 characters max", + "social.embedLabel": "Embed", "social.copyEmbedLinkText": "Copy embed", diff --git a/static/svgs/commenting/thank_you_envelope.svg b/static/svgs/commenting/thank_you_envelope.svg deleted file mode 100644 index 8ab8d6d26..000000000 --- a/static/svgs/commenting/thank_you_envelope.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -