From 9b39ed9df904590998ec31e9d59cbc5f5ffb7f17 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Thu, 23 Jul 2020 19:15:00 +0200 Subject: [PATCH] fix: various ui fixes --- src/core/client/stream/classes.ts | 7 +++++++ .../common/UserBox/UserBoxAuthenticated.css | 2 +- .../common/UserBox/UserBoxAuthenticated.tsx | 6 ++++-- .../stream/tabs/Comments/Comment/Comment.tsx | 1 + .../PermalinkButton/PermalinkButton.tsx | 2 ++ .../Comment/ReactionButton/ReactionButton.tsx | 21 +++++++++---------- .../ReplyCommentForm/ReplyCommentForm.css | 15 ------------- .../Comment/ReplyCommentForm/ReplyTo.css | 4 ++-- .../Comment/ReportFlow/ReportButton.tsx | 1 + .../Comments/Comment/ShowConversationLink.css | 6 +++--- .../Comments/Comment/ShowConversationLink.tsx | 1 + .../tabs/Comments/Comment/TopBarLeft.tsx | 2 +- .../client/stream/tabs/Comments/RTE/RTE.css | 2 -- .../client/stream/tabs/Comments/RTE/RTE.tsx | 2 +- .../Comments/ReplyList/ReplyListContainer.tsx | 2 +- .../Stream/FeaturedCommentTooltip.tsx | 2 +- .../tabs/Comments/Stream/StreamContainer.tsx | 3 +++ .../ChangeEmail/ChangeEmailContainer.css | 5 +++++ .../comments/permalink/permalinkView.spec.tsx | 1 + .../client/ui/components/v2/Button/Button.tsx | 1 + .../components/v2/Tooltip/TooltipButton.tsx | 15 +++++++------ .../client/ui/components/v3/Button/Button.tsx | 1 + 22 files changed, 56 insertions(+), 46 deletions(-) delete mode 100644 src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentForm.css diff --git a/src/core/client/stream/classes.ts b/src/core/client/stream/classes.ts index ab24d3aadf5..b11153a0537 100644 --- a/src/core/client/stream/classes.ts +++ b/src/core/client/stream/classes.ts @@ -277,6 +277,12 @@ const CLASSES = { */ $root: "coral coral-comment", + /** + * highlight is attached to the comment container if the single + * conversation view is shown for this comment. + */ + highlight: "coral coral-comment-highlight", + /** * reacted signifies the number of reactions of the comment. * The no of reactions is appended: e.g. `coral-reacted-1`. @@ -614,6 +620,7 @@ const CLASSES = { logoutButton: "coral coral-viewerBox-logoutButton", signInButton: "coral coral-viewerBox-signInButton", registerButton: "coral coral-viewerBox-registerButton", + username: "coral coral-viewerBox-username", }, /** diff --git a/src/core/client/stream/common/UserBox/UserBoxAuthenticated.css b/src/core/client/stream/common/UserBox/UserBoxAuthenticated.css index 260a3e689eb..cc8abd530a2 100644 --- a/src/core/client/stream/common/UserBox/UserBoxAuthenticated.css +++ b/src/core/client/stream/common/UserBox/UserBoxAuthenticated.css @@ -17,7 +17,7 @@ font-family: var(--font-family-secondary); font-weight: var(--font-weight-secondary-bold); font-size: var(--font-size-4); - line-height: var(--line-height-4); + line-height: var(--line-height-3); color: var(--palette-text-900); diff --git a/src/core/client/stream/common/UserBox/UserBoxAuthenticated.tsx b/src/core/client/stream/common/UserBox/UserBoxAuthenticated.tsx index f3dd4396325..4484db21346 100644 --- a/src/core/client/stream/common/UserBox/UserBoxAuthenticated.tsx +++ b/src/core/client/stream/common/UserBox/UserBoxAuthenticated.tsx @@ -18,7 +18,9 @@ const UserBoxAuthenticated: FunctionComponent = ( props ) => { const Username = () => ( -
{props.username}
+
+ {props.username} +
); return ( @@ -26,7 +28,7 @@ const UserBoxAuthenticated: FunctionComponent = (
Signed in as
- + {props.showLogoutButton && ( = (props) => { size="half" className={cn(styles.root, { [styles.highlight]: props.highlight, + [CLASSES.comment.highlight]: props.highlight, })} > = ({ fontSize="small" fontWeight="semiBold" paddingSize="extraSmall" + className={CLASSES.comment.actionBar.shareButton} > share diff --git a/src/core/client/stream/tabs/Comments/Comment/ReactionButton/ReactionButton.tsx b/src/core/client/stream/tabs/Comments/Comment/ReactionButton/ReactionButton.tsx index b772319240e..df0994c1369 100644 --- a/src/core/client/stream/tabs/Comments/Comment/ReactionButton/ReactionButton.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/ReactionButton/ReactionButton.tsx @@ -37,8 +37,13 @@ function render(props: ReactionButtonProps) { diff --git a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentForm.css b/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentForm.css deleted file mode 100644 index 1bd06c88642..00000000000 --- a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyCommentForm.css +++ /dev/null @@ -1,15 +0,0 @@ -$commentsBorder: var(--palette-grey-300); - -.rteContent { - border-top-left-radius: 0px; - border-top-right-radius: 0px; -} - -.warnIcon { - color: var(--palette-text-500); -} - -.commentFormBox { - border: 1px solid $commentsBorder; - border-radius: var(--round-corners); -} diff --git a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyTo.css b/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyTo.css index 819efbf362c..d7ed69565b1 100644 --- a/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyTo.css +++ b/src/core/client/stream/tabs/Comments/Comment/ReplyCommentForm/ReplyTo.css @@ -11,8 +11,8 @@ $commentsReplyToBorderColor: var(--palette-grey-500); background-color: $commentsReplyToBackground; color: $commentsReplyToColor; - border-top-left-radius: var(--round-corners); - border-top-right-radius: var(--round-corners); + border-top-left-radius: calc(var(--round-corners) - 1px); + border-top-right-radius: calc(var(--round-corners) - 1px); } .text { diff --git a/src/core/client/stream/tabs/Comments/Comment/ReportFlow/ReportButton.tsx b/src/core/client/stream/tabs/Comments/Comment/ReportFlow/ReportButton.tsx index 2a0cad51521..22a5ac1b2ee 100644 --- a/src/core/client/stream/tabs/Comments/Comment/ReportFlow/ReportButton.tsx +++ b/src/core/client/stream/tabs/Comments/Comment/ReportFlow/ReportButton.tsx @@ -76,6 +76,7 @@ const ReportButton: FunctionComponent = ({ ); const enhanced = withForwardRef(TooltipButton); diff --git a/src/core/client/ui/components/v3/Button/Button.tsx b/src/core/client/ui/components/v3/Button/Button.tsx index ea691cf8891..7e62ad70e74 100644 --- a/src/core/client/ui/components/v3/Button/Button.tsx +++ b/src/core/client/ui/components/v3/Button/Button.tsx @@ -113,6 +113,7 @@ export class Button extends React.Component { href={href} anchor={href ? true : false} ref={forwardRef} + aria-pressed={active} {...rest} > {children}