diff --git a/src/core/client/account/test/__snapshots__/confirmEmail.spec.tsx.snap b/src/core/client/account/test/__snapshots__/confirmEmail.spec.tsx.snap index 22686e806..e917f7090 100644 --- a/src/core/client/account/test/__snapshots__/confirmEmail.spec.tsx.snap +++ b/src/core/client/account/test/__snapshots__/confirmEmail.spec.tsx.snap @@ -42,6 +42,8 @@ exports[`renders form 1`] = ` > @@ -161,6 +164,7 @@ const EditCommentForm: FunctionComponent = props => { disabled={submitting} onClick={props.onCancel} fullWidth={matches} + className={CLASSES.editComment.cancel} > Cancel @@ -174,6 +178,7 @@ const EditCommentForm: FunctionComponent = props => { } type="submit" fullWidth={matches} + className={CLASSES.editComment.submit} > Save Changes diff --git a/src/core/client/stream/tabs/Comments/Comment/EditCommentForm/EditCommentFormContainer.tsx b/src/core/client/stream/tabs/Comments/Comment/EditCommentForm/EditCommentFormContainer.tsx index 40b351a45..111a77132 100644 --- a/src/core/client/stream/tabs/Comments/Comment/EditCommentForm/EditCommentFormContainer.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/EditCommentForm/EditCommentFormContainer.tsx @@ -10,11 +10,11 @@ import { withFetch, withFragmentContainer, } from "coral-framework/lib/relay"; -import { PropTypesOf } from "coral-framework/types"; import { EditCommentFormContainer_comment as CommentData } from "coral-stream/__generated__/EditCommentFormContainer_comment.graphql"; import { EditCommentFormContainer_settings as SettingsData } from "coral-stream/__generated__/EditCommentFormContainer_settings.graphql"; import { EditCommentFormContainer_story as StoryData } from "coral-stream/__generated__/EditCommentFormContainer_story.graphql"; +import CLASSES from "coral-stream/classes"; import { getSubmitStatus, @@ -123,6 +123,7 @@ export class EditCommentFormContainer extends Component { ); } @@ -190,5 +191,4 @@ const enhanced = withContext(({ sessionStorage, browserInfo }) => ({ ) ) ); -export type PostCommentFormContainerProps = PropTypesOf; export default enhanced; diff --git a/src/core/client/stream/tabs/Comments/Comment/InReplyTo.tsx b/src/core/client/stream/tabs/Comments/Comment/InReplyTo.tsx index 8ab921eed..88a36e351 100644 --- a/src/core/client/stream/tabs/Comments/Comment/InReplyTo.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/InReplyTo.tsx @@ -1,6 +1,7 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; +import CLASSES from "coral-stream/classes"; import { Flex, Icon, Typography } from "coral-ui/components"; import styles from "./InReplyTo.css"; @@ -17,7 +18,7 @@ const InReplyTo: FunctionComponent = ({ username }) => { ); return ( - + reply{" "} }> = props => { {({ input, meta }) => ( <> -
+
Write a reply @@ -133,6 +133,7 @@ const ReplyCommentForm: FunctionComponent = props => { variant="outlined" disabled={submitting} onClick={props.onCancel} + className={CLASSES.createReplyComment.cancel} fullWidth={matches} > Cancel diff --git a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentFormContainer.tsx b/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentFormContainer.tsx index 4abc0ab36..885d3c629 100644 --- a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentFormContainer.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentFormContainer.tsx @@ -14,10 +14,10 @@ import { withFragmentContainer, } from "coral-framework/lib/relay"; import { PromisifiedStorage } from "coral-framework/lib/storage"; -import { PropTypesOf } from "coral-framework/types"; import { ReplyCommentFormContainer_comment as CommentData } from "coral-stream/__generated__/ReplyCommentFormContainer_comment.graphql"; import { ReplyCommentFormContainer_settings as SettingsData } from "coral-stream/__generated__/ReplyCommentFormContainer_settings.graphql"; import { ReplyCommentFormContainer_story as StoryData } from "coral-stream/__generated__/ReplyCommentFormContainer_story.graphql"; +import CLASSES from "coral-stream/classes"; import { getSubmitStatus, @@ -164,6 +164,7 @@ export class ReplyCommentFormContainer extends Component { ); } @@ -246,5 +247,4 @@ const enhanced = withContext(({ sessionStorage, browserInfo }) => ({ ) ) ); -export type PostCommentFormContainerProps = PropTypesOf; export default enhanced; diff --git a/src/core/client/stream/tabs/Comments/Comment/ReplyEditSubmitStatus.tsx b/src/core/client/stream/tabs/Comments/Comment/ReplyEditSubmitStatus.tsx index c96d4380f..d025249c5 100644 --- a/src/core/client/stream/tabs/Comments/Comment/ReplyEditSubmitStatus.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/ReplyEditSubmitStatus.tsx @@ -9,6 +9,7 @@ import styles from "./ReplyEditSubmitStatus.css"; interface Props { status: SubmitStatus; + buttonClassName?: string; onDismiss: () => void; } @@ -40,7 +41,11 @@ export default function ReplyEditSubmitStatus(props: Props) { {getMessage(props.status)} - diff --git a/src/core/client/stream/tabs/Comments/Comment/__snapshots__/InReplyTo.spec.tsx.snap b/src/core/client/stream/tabs/Comments/Comment/__snapshots__/InReplyTo.spec.tsx.snap index 84c90af86..c0a7ffaa5 100644 --- a/src/core/client/stream/tabs/Comments/Comment/__snapshots__/InReplyTo.spec.tsx.snap +++ b/src/core/client/stream/tabs/Comments/Comment/__snapshots__/InReplyTo.spec.tsx.snap @@ -3,6 +3,7 @@ exports[`renders correctly 1`] = ` = props => { disabled, defaultValue, forwardRef, + contentClassName, + placeholderClassName, + toolbarClassName, ...rest } = props; return (
= props => { return ( - + {props.children} ); diff --git a/src/core/client/stream/tabs/Comments/Stream/CommunityGuidelines/__snapshots__/CommunityGuidelines.spec.tsx.snap b/src/core/client/stream/tabs/Comments/Stream/CommunityGuidelines/__snapshots__/CommunityGuidelines.spec.tsx.snap index 9495685ec..4c5a6fa92 100644 --- a/src/core/client/stream/tabs/Comments/Stream/CommunityGuidelines/__snapshots__/CommunityGuidelines.spec.tsx.snap +++ b/src/core/client/stream/tabs/Comments/Stream/CommunityGuidelines/__snapshots__/CommunityGuidelines.spec.tsx.snap @@ -2,6 +2,7 @@ exports[`renders correctly 1`] = ` diff --git a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentForm.tsx b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentForm.tsx index f64557a28..1c159aad0 100644 --- a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentForm.tsx +++ b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentForm.tsx @@ -1,3 +1,4 @@ +import cn from "classnames"; import { PropTypesOf } from "coral-framework/types"; import { FormApi, FormState } from "final-form"; import { Localized } from "fluent-react/compat"; @@ -40,14 +41,16 @@ interface Props { } const PostCommentForm: FunctionComponent = props => ( -
+
{props.showMessageBox && ( - + )} {({ handleSubmit, submitting, submitError, form }) => ( = props => ( onChange={({ html }) => input.onChange(cleanupRTEEmptyHTML(html)) } - className={CLASSES.createComment.box} value={input.value} placeholder="Post a comment" disabled={submitting || props.disabled} diff --git a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosed.tsx b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosed.tsx index 74cf4a28c..268b7c969 100644 --- a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosed.tsx +++ b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosed.tsx @@ -1,7 +1,9 @@ +import cn from "classnames"; import React, { FunctionComponent } from "react"; import { Markdown } from "coral-framework/components"; import { PropTypesOf } from "coral-framework/types"; +import CLASSES from "coral-stream/classes"; import { CallOut } from "coral-ui/components"; import MessageBoxContainer from "../MessageBoxContainer"; @@ -14,11 +16,14 @@ interface Props { story: PropTypesOf["story"]; } const PostCommentFormClosed: FunctionComponent = props => ( -
+
{props.showMessageBox && ( - + )} - + {props.message}
diff --git a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosedSitewide.tsx b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosedSitewide.tsx index 2875eb51c..0b7a84162 100644 --- a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosedSitewide.tsx +++ b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormClosedSitewide.tsx @@ -1,7 +1,9 @@ +import cn from "classnames"; import React, { FunctionComponent } from "react"; import { Markdown } from "coral-framework/components"; import { PropTypesOf } from "coral-framework/types"; +import CLASSES from "coral-stream/classes"; import { CallOut, HorizontalGutter } from "coral-ui/components"; import MessageBoxContainer from "../MessageBoxContainer"; @@ -15,10 +17,17 @@ interface Props { } const PostCommentFormClosedSitewide: FunctionComponent = props => ( - + {props.message} - {props.showMessageBox && } + {props.showMessageBox && ( +
+ +
+ )}
); diff --git a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormFake.tsx b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormFake.tsx index 0bef07811..3294eb2ea 100644 --- a/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormFake.tsx +++ b/src/core/client/stream/tabs/Comments/Stream/PostCommentForm/PostCommentFormFake.tsx @@ -1,3 +1,4 @@ +import cn from "classnames"; import { Localized } from "fluent-react/compat"; import React, { FunctionComponent, useCallback } from "react"; @@ -28,11 +29,11 @@ const PostCommentFormFake: FunctionComponent = props => { {props.showMessageBox && ( )} -