From 9852c4e62f2eb3f2ae724f8c22742574bb75259c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Tue, 25 Sep 2018 11:20:57 -0300 Subject: [PATCH] Channges --- .../profile/components/CommentsHistory.tsx | 20 ++++++++++++---- .../profile/components/HistoryComment.css | 9 ++----- .../profile/components/HistoryComment.tsx | 24 +++++++++---------- .../containers/CommentsHistoryContainer.tsx | 4 ++-- src/locales/en-US/stream.ftl | 6 ++--- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx b/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx index edd51678c..cc8bae18e 100644 --- a/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx +++ b/src/core/client/stream/tabs/profile/components/CommentsHistory.tsx @@ -1,20 +1,32 @@ import { Localized } from "fluent-react/compat"; import * as React from "react"; import { StatelessComponent } from "react"; -import { CommentsHistoryContainer_me as MeData } from "talk-stream/__generated__/CommentsHistoryContainer_me.graphql"; import { HorizontalGutter, Typography } from "talk-ui/components"; import HistoryComment from "./HistoryComment"; -export interface CommentsHistoryProps { +interface Me { + comments: { + edges: Array<{ + node: { + id: string; + body: string | null; + createdAt: any; + replyCount: number | null; + }; + }>; + }; +} + +interface CommentsHistoryProps { goToConversation: () => void; - me: MeData; + me: Me; } const CommentsHistory: StatelessComponent = props => { const comments = props.me.comments.edges.map(edge => edge.node); return ( - + Comment History {comments.map(comment => ( diff --git a/src/core/client/stream/tabs/profile/components/HistoryComment.css b/src/core/client/stream/tabs/profile/components/HistoryComment.css index 2ab426a8a..1c7b924fc 100644 --- a/src/core/client/stream/tabs/profile/components/HistoryComment.css +++ b/src/core/client/stream/tabs/profile/components/HistoryComment.css @@ -3,13 +3,8 @@ } .button, -.text { - color: var(--palette-text-secondary); - font-family: var(--font-family-sans-serif); - font-weight: var(--font-weight-medium); - font-size: calc(14rem / var(--rem-base)); - line-height: calc(18em / 14); - letter-spacing: 0; +.replies { + composes: button from "talk-ui/shared/typography.css"; } .sideBar { diff --git a/src/core/client/stream/tabs/profile/components/HistoryComment.tsx b/src/core/client/stream/tabs/profile/components/HistoryComment.tsx index b9471c373..2bfc6c096 100644 --- a/src/core/client/stream/tabs/profile/components/HistoryComment.tsx +++ b/src/core/client/stream/tabs/profile/components/HistoryComment.tsx @@ -4,39 +4,39 @@ import { StatelessComponent } from "react"; import Timestamp from "talk-stream/components/Timestamp"; import { BaseButton, + ButtonIcon, Flex, HorizontalGutter, - Icon, Typography, } from "talk-ui/components"; import HTMLContent from "../../../components/HTMLContent"; import * as styles from "./HistoryComment.css"; -export interface CommentHistoryProps { +export interface HistoryCommentProps { comment: { body: string | null; createdAt: string; replyCount: number | null; }; - goToConversation: () => void; + onGoToConversation: () => void; } -const HistoryComment: StatelessComponent = props => { +const HistoryComment: StatelessComponent = props => { return ( - + {props.comment.body && ( {props.comment.body} )} - launch - + launch + View Conversation @@ -44,7 +44,7 @@ const HistoryComment: StatelessComponent = props => { - schedule + schedule {props.comment.createdAt} @@ -54,10 +54,10 @@ const HistoryComment: StatelessComponent = props => { direction="row" alignItems="center" itemGutter="half" - className={styles.text} + className={styles.replies} > - reply - + reply + Replies {props.comment.replyCount} diff --git a/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx b/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx index fb6ba6344..96e829a25 100644 --- a/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx +++ b/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx @@ -16,7 +16,7 @@ interface CommentsHistoryContainerProps { export class CommentsHistoryContainer extends React.Component< CommentsHistoryContainerProps > { - private goToConversation = () => { + private onGoToConversation = () => { if (this.props.local.assetURL) { window.open(this.props.local.assetURL, "_blank"); } @@ -25,7 +25,7 @@ export class CommentsHistoryContainer extends React.Component< return ( ); } diff --git a/src/locales/en-US/stream.ftl b/src/locales/en-US/stream.ftl index 101dfccc7..9875ee86c 100644 --- a/src/locales/en-US/stream.ftl +++ b/src/locales/en-US/stream.ftl @@ -70,6 +70,6 @@ comments-editCommentForm-editTimeExpired = Edit time has expired. You can no lon comments-editedMarker-edited = Edited ## Profile Tab -profile-viewConversation = View Conversation -profile-replies= Replies -profile-commentHistory= Comment History +profile-historyComment-viewConversation = View Conversation +profile-historyComment-replies = Replies +profile-historyComment-commentHistory = Comment History