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

feat(script editor): add opt out language warning #1436

Merged
merged 2 commits into from
Sep 28, 2022
Merged

Conversation

ajohn25
Copy link
Contributor

@ajohn25 ajohn25 commented Sep 24, 2022

Description

This adds a warning for including opt out language when users are editing initial messages.

Motivation and Context

Closes #1433

How Has This Been Tested?

This has been tested locally.

Screenshots (if appropriate):

Bad MMS attachment without good opt out language Bad MMS attachment with good opt out language

Documentation Changes

Checklist:

  • My change requires a change to the documentation.
  • I have included updates for the documentation accordingly.

@ajohn25
Copy link
Contributor Author

ajohn25 commented Sep 24, 2022

@politics-rewired/organizing for copy review

@hiemanshu hiemanshu added this to the 4.38.1 milestone Sep 26, 2022
.toLowerCase();

// 2022-09-24 - stop as a separate word is best for avoiding spam blocks
if (this.props.isRootStep && text.length > 0 && !text.includes(" stop "))
Copy link
Member

Choose a reason for hiding this comment

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

Question: should this be "stop " with only a trailing space? I'm imagining the cases of newlines or parentheses:

Hey {firstName}, do you prefer apples or oranges?

STOP to quit

or

Hey {firstName}! (STOP to quit)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@@ -320,6 +321,34 @@ class ScriptEditor extends React.Component<Props, State> {
}
}

renderOptOutLanguageWarning() {
const text = this.state.editorState
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: rename for context when scanning quickly

Suggested change
const text = this.state.editorState
const lowercaseText = this.state.editorState

@ajohn25
Copy link
Contributor Author

ajohn25 commented Sep 26, 2022

Per organizing team feedback, we're going to move this warning into a dialog to be extra sure users see it - in a PR coming soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strongly suggest "reply STOP to opt out" in script builder
3 participants