[next] Story Improvements (#2054)

* feat: improved logs

* feat: improved scraper

- added scraper debug graph call

* feat: improved story closing

* fix: fixed tests
This commit is contained in:
Wyatt Johnson
2018-11-01 21:34:48 +01:00
committed by Kiwi
parent 6597658734
commit b3cfe32631
19 changed files with 377 additions and 92 deletions
@@ -15,7 +15,9 @@ it("renders correctly", () => {
createdAt: "2018-07-06T18:24:00.000Z",
replyCount: 4,
story: {
title: "Story Title",
metadata: {
title: "Story Title",
},
},
conversationURL: "http://localhost/conversation",
onGotoConversation: noop,
@@ -18,7 +18,9 @@ export interface HistoryCommentProps {
createdAt: string;
replyCount: number | null;
story: {
title: string | null;
metadata: {
title: string | null;
} | null;
};
conversationURL: string;
onGotoConversation: (e: React.MouseEvent) => void;
@@ -27,7 +29,10 @@ export interface HistoryCommentProps {
const HistoryComment: StatelessComponent<HistoryCommentProps> = props => {
return (
<HorizontalGutter>
<Localized id="profile-historyComment-story" $title={props.story.title}>
<Localized
id="profile-historyComment-story"
$title={props.story.metadata ? props.story.metadata.title : "N/A"} // FIXME: (wyattjoh) When a title for a Story isn't available, we need a fallback.
>
<Typography variant="heading4">{"Story: {$title}"}</Typography>
</Localized>
<Timestamp>{props.createdAt}</Timestamp>
@@ -55,8 +55,10 @@ const enhanced = withSetCommentIDMutation(
replyCount
story {
id
title
url
metadata {
title
}
}
}
`,
+3
View File
@@ -215,6 +215,9 @@ export const commentWithDeepestReplies = denormalizeComment({
});
export const baseStory = {
metadata: {
title: "title",
},
isClosed: false,
comments: {
edges: [],