-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
@politics-rewired/organizing for copy review |
src/components/ScriptEditor.tsx
Outdated
.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 ")) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
src/components/ScriptEditor.tsx
Outdated
@@ -320,6 +321,34 @@ class ScriptEditor extends React.Component<Props, State> { | |||
} | |||
} | |||
|
|||
renderOptOutLanguageWarning() { | |||
const text = this.state.editorState |
There was a problem hiding this comment.
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
const text = this.state.editorState | |
const lowercaseText = this.state.editorState |
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 |
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):
Documentation Changes
Checklist: