mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
[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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
@@ -215,6 +215,9 @@ export const commentWithDeepestReplies = denormalizeComment({
|
||||
});
|
||||
|
||||
export const baseStory = {
|
||||
metadata: {
|
||||
title: "title",
|
||||
},
|
||||
isClosed: false,
|
||||
comments: {
|
||||
edges: [],
|
||||
|
||||
Reference in New Issue
Block a user