[CORL-399] Hide Non-Visible Comments (#2344)

* feat: added support for hiding non-visible comments

* fix: updated copy

* feat: refined style
This commit is contained in:
Wyatt Johnson
2019-06-06 22:24:02 +00:00
committed by GitHub
parent 2cff4572cf
commit ed4e5fa2a8
6 changed files with 72 additions and 18 deletions
@@ -4,6 +4,7 @@ import React, { FunctionComponent, MouseEvent } from "react";
import { PropTypesOf } from "coral-framework/types";
import {
Button,
CallOut,
Flex,
HorizontalGutter,
Typography,
@@ -69,9 +70,13 @@ const PermalinkView: FunctionComponent<PermalinkViewProps> = ({
)}
</Flex>
{!comment && (
<Localized id="comments-permalinkView-commentNotFound">
<Typography>Comment not found</Typography>
</Localized>
<CallOut fullWidth>
<Localized id="comments-permalinkView-commentRemovedOrDoesNotExist">
<Typography>
This comment has been removed or does not exist.
</Typography>
</Localized>
</CallOut>
)}
{comment && (
<HorizontalGutter>
@@ -47,13 +47,17 @@ exports[`renders comment not found 1`] = `
</ForwardRef(forwardRef)>
</Localized>
</ForwardRef(forwardRef)>
<Localized
id="comments-permalinkView-commentNotFound"
<withPropsOnChange(CallOut)
fullWidth={true}
>
<ForwardRef(forwardRef)>
Comment not found
</ForwardRef(forwardRef)>
</Localized>
<Localized
id="comments-permalinkView-commentRemovedOrDoesNotExist"
>
<ForwardRef(forwardRef)>
This comment has been removed or does not exist.
</ForwardRef(forwardRef)>
</Localized>
</withPropsOnChange(CallOut)>
</ForwardRef(forwardRef)>
`;
@@ -67,11 +67,15 @@ exports[`renders permalink view with unknown comment 1`] = `
View Full Discussion
</a>
</div>
<p
className="Typography-root Typography-bodyCopy Typography-colorTextPrimary"
<div
className="CallOut-root CallOut-colorRegular CallOut-fullWidth"
>
Comment not found
</p>
<p
className="Typography-root Typography-bodyCopy Typography-colorTextPrimary"
>
This comment has been removed or does not exist.
</p>
</div>
</div>
</section>
`;