diff --git a/app/containers/BackgroundContainer/index.tsx b/app/containers/BackgroundContainer/index.tsx index fc26fe0ab..a485611c0 100644 --- a/app/containers/BackgroundContainer/index.tsx +++ b/app/containers/BackgroundContainer/index.tsx @@ -35,7 +35,7 @@ const styles = StyleSheet.create({ const BackgroundContainer = ({ theme, text, loading }: IBackgroundContainer) => ( - {text ? {text} : null} + {text && !loading ? {text} : null} {loading ? : null} ); diff --git a/app/containers/SearchHeader.tsx b/app/containers/SearchHeader.tsx index 4b0a49176..f79451355 100644 --- a/app/containers/SearchHeader.tsx +++ b/app/containers/SearchHeader.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; -import { withTheme } from '../theme'; +import I18n from '../i18n'; +import { useTheme } from '../theme'; import sharedStyles from '../views/Styles'; import { themes } from '../constants/colors'; import TextInput from '../presentation/TextInput'; @@ -19,14 +20,13 @@ const styles = StyleSheet.create({ } }); -interface ISearchHeader { - theme?: string; +interface ISearchHeaderProps { onSearchChangeText?: (text: string) => void; + testID: string; } -// TODO: it might be useful to refactor this component for reusage -const SearchHeader = ({ theme, onSearchChangeText }: ISearchHeader) => { - const titleColorStyle = { color: themes[theme!].headerTitleColor }; +const SearchHeader = ({ onSearchChangeText, testID }: ISearchHeaderProps): JSX.Element => { + const { theme } = useTheme(); const isLight = theme === 'light'; const { isLandscape } = useOrientation(); const scale = isIOS && isLandscape && !isTablet ? 0.8 : 1; @@ -36,14 +36,14 @@ const SearchHeader = ({ theme, onSearchChangeText }: ISearchHeader) => { ); }; -export default withTheme(SearchHeader); +export default SearchHeader; diff --git a/app/containers/ThreadDetails.tsx b/app/containers/ThreadDetails.tsx index 8e9c36d19..5dc9fb954 100644 --- a/app/containers/ThreadDetails.tsx +++ b/app/containers/ThreadDetails.tsx @@ -5,7 +5,7 @@ import Touchable from 'react-native-platform-touchable'; import { CustomIcon } from '../lib/Icons'; import { themes } from '../constants/colors'; import sharedStyles from '../views/Styles'; -import { withTheme } from '../theme'; +import { useTheme } from '../theme'; import { TThreadModel } from '../definitions/IThread'; const styles = StyleSheet.create({ @@ -48,13 +48,12 @@ interface IThreadDetails { badgeColor?: string; toggleFollowThread: Function; style: ViewStyle; - theme?: string; } -const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style, theme }: IThreadDetails) => { - let tcount: number | string = item?.tcount ?? 0; - - if (tcount >= 1000) { +const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style }: IThreadDetails): JSX.Element => { + const { theme } = useTheme(); + let { tcount } = item; + if (tcount && tcount >= 1000) { tcount = '+999'; } @@ -82,7 +81,6 @@ const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style, them - {badgeColor ? : null} toggleFollowThread?.(isFollowing, item.id)}> @@ -97,4 +95,4 @@ const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style, them ); }; -export default withTheme(ThreadDetails); +export default ThreadDetails; diff --git a/app/containers/markdown/index.tsx b/app/containers/markdown/index.tsx index e8e2ea06b..f11ab6730 100644 --- a/app/containers/markdown/index.tsx +++ b/app/containers/markdown/index.tsx @@ -25,7 +25,7 @@ import { isValidURL } from '../../utils/url'; import NewMarkdown from './new'; interface IMarkdownProps { - msg: string; + msg?: string; md: MarkdownAST; mentions: UserMention[]; getCustomEmoji: Function; diff --git a/app/containers/message/Thread.tsx b/app/containers/message/Thread.tsx index 16ed35a4b..4ddfda3b5 100644 --- a/app/containers/message/Thread.tsx +++ b/app/containers/message/Thread.tsx @@ -24,7 +24,6 @@ const Thread = React.memo( item={{ tcount, replies, - tlm, id }} user={user} diff --git a/app/containers/message/index.tsx b/app/containers/message/index.tsx index ad86975e7..75458b470 100644 --- a/app/containers/message/index.tsx +++ b/app/containers/message/index.tsx @@ -147,6 +147,12 @@ class MessageContainer extends React.Component { if ((item.tlm || item.tmid) && !isThreadRoom) { this.onThreadPress(); } + + const { onDiscussionPress } = this.props; + + if (onDiscussionPress) { + onDiscussionPress(item); + } }, 300, true diff --git a/app/containers/message/interfaces.ts b/app/containers/message/interfaces.ts index bfe02c70d..0291a55bf 100644 --- a/app/containers/message/interfaces.ts +++ b/app/containers/message/interfaces.ts @@ -1,5 +1,7 @@ import { MarkdownAST } from '@rocket.chat/message-parser'; +export type TMessageType = 'discussion-created' | 'jitsi_call_started'; + export interface IMessageAttachments { attachments: any; timeFormat: string; @@ -140,7 +142,7 @@ export interface IMessageInner IMessageThread, IMessageAttachments, IMessageBroadcast { - type: string; + type: TMessageType; blocks: []; } diff --git a/app/definitions/IThread.ts b/app/definitions/IThread.ts index ad151283b..3edefbcad 100644 --- a/app/definitions/IThread.ts +++ b/app/definitions/IThread.ts @@ -44,9 +44,9 @@ export interface IThread { msg?: string; t?: SubscriptionType; rid: string; - _updatedAt: Date; - ts: Date; - u: IUserMessage; + _updatedAt?: Date; + ts?: Date; + u?: IUserMessage; alias?: string; parseUrls?: boolean; groupable?: boolean; @@ -61,11 +61,11 @@ export interface IThread { reactions?: IReaction[]; role?: string; drid?: string; - dcount?: number; + dcount?: number | string; dlm?: number; tmid?: string; - tcount?: number; - tlm?: Date; + tcount?: number | string; + tlm?: string; replies?: string[]; mentions?: IUserMention[]; channels?: IUserChannel[]; diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 499a50e7a..43fe78dc0 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -775,6 +775,7 @@ "creating_discussion": "creating discussion", "Canned_Responses": "Canned Responses", "No_match_found": "No match found.", + "No_discussions": "No discussions", "Check_canned_responses": "Check on canned responses.", "Searching": "Searching", "Use": "Use", diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index ac923025f..1cb627a41 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -811,6 +811,16 @@ const RocketChat = { encrypted }); }, + getDiscussions({ roomId, offset, count, text }) { + const params = { + roomId, + offset, + count, + ...(text && { text }) + }; + // RC 2.4.0 + return this.sdk.get('chat.getDiscussions', params); + }, createTeam({ name, users, type, readOnly, broadcast, encrypted }) { const params = { name, diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx index fce844a4a..ec3ae318e 100644 --- a/app/stacks/InsideStack.tsx +++ b/app/stacks/InsideStack.tsx @@ -66,6 +66,7 @@ import QueueListView from '../ee/omnichannel/views/QueueListView'; import AddChannelTeamView from '../views/AddChannelTeamView'; import AddExistingChannelView from '../views/AddExistingChannelView'; import SelectListView from '../views/SelectListView'; +import DiscussionsView from '../views/DiscussionsView'; import { AdminPanelStackParamList, ChatsStackParamList, @@ -92,7 +93,8 @@ const ChatsStackNavigator = () => { - + + { + { + const { theme } = useTheme(); + let { dcount } = item; + + if (dcount && dcount >= 1000) { + dcount = '+999'; + } + + return ( + + + + + + {dcount} + + + + + + + {date} + + + + + ); +}; + +export default DiscussionDetails; diff --git a/app/views/DiscussionsView/Item.stories.js b/app/views/DiscussionsView/Item.stories.js new file mode 100644 index 000000000..f909600db --- /dev/null +++ b/app/views/DiscussionsView/Item.stories.js @@ -0,0 +1,96 @@ +/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, react/prop-types */ +import React from 'react'; +import { storiesOf } from '@storybook/react-native'; +import { ScrollView } from 'react-native'; +import { Provider } from 'react-redux'; + +import * as List from '../../containers/List'; +import { themes } from '../../constants/colors'; +import { ThemeContext } from '../../theme'; +import { store } from '../../../storybook/stories'; +import Item from './Item'; + +const author = { + _id: 'userid', + username: 'rocket.cat', + name: 'Rocket Cat' +}; +const baseUrl = 'https://open.rocket.chat'; +const date = new Date(2020, 10, 10, 10); +const longText = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'; +const defaultItem = { + msg: 'Message content', + tcount: 1, + replies: [1], + ts: date, + tlm: date, + u: author, + attachments: [] +}; + +const BaseItem = ({ item, ...props }) => ( + alert('pressed')} + {...props} + /> +); + +const listDecorator = story => ( + + + {story()} + + +); + +const stories = storiesOf('Discussions.Item', module) + .addDecorator(listDecorator) + .addDecorator(story => {story()}); + +stories.add('content', () => ( + <> + + + + + + + + + + +)); + +const ThemeStory = ({ theme }) => ( + + + +); + +stories.add('themes', () => ( + <> + + + + +)); diff --git a/app/views/DiscussionsView/Item.tsx b/app/views/DiscussionsView/Item.tsx new file mode 100644 index 000000000..c88395823 --- /dev/null +++ b/app/views/DiscussionsView/Item.tsx @@ -0,0 +1,105 @@ +import React from 'react'; +import { StyleSheet, Text, View } from 'react-native'; +import Touchable from 'react-native-platform-touchable'; +import moment from 'moment'; + +import { useTheme } from '../../theme'; +import Avatar from '../../containers/Avatar'; +import sharedStyles from '../Styles'; +import { themes } from '../../constants/colors'; +import Markdown from '../../containers/markdown'; +import { formatDateThreads, makeThreadName } from '../../utils/room'; +import DiscussionDetails from './DiscussionDetails'; +import { TThreadModel } from '../../definitions/IThread'; + +const styles = StyleSheet.create({ + container: { + flexDirection: 'row', + padding: 16 + }, + contentContainer: { + flexDirection: 'column', + flex: 1 + }, + titleContainer: { + flexDirection: 'row', + marginBottom: 2, + justifyContent: 'space-between' + }, + title: { + flexShrink: 1, + fontSize: 18, + ...sharedStyles.textMedium + }, + time: { + fontSize: 14, + marginLeft: 4, + ...sharedStyles.textRegular + }, + avatar: { + marginRight: 8 + }, + messageContainer: { + flexDirection: 'row' + }, + markdown: { + flex: 1 + } +}); + +interface IItem { + item: TThreadModel; + baseUrl: string; + onPress: { + (...args: any[]): void; + stop(): void; + }; +} + +const Item = ({ item, baseUrl, onPress }: IItem): JSX.Element => { + const { theme } = useTheme(); + const username = item?.u?.username; + let messageTime = ''; + let messageDate = ''; + + if (item?.ts) { + messageTime = moment(item.ts).format('LT'); + messageDate = formatDateThreads(item.ts); + } + + return ( + onPress(item)} + testID={`discussions-view-${item.msg}`} + style={{ backgroundColor: themes[theme].backgroundColor }}> + + + + + + {username} + + {messageTime ? {messageTime} : null} + + + {username ? ( + /* @ts-ignore */ + + ) : null} + + {messageDate ? : null} + + + + ); +}; + +export default Item; diff --git a/app/views/DiscussionsView/__snapshots__/Item.stories.storyshot b/app/views/DiscussionsView/__snapshots__/Item.stories.storyshot new file mode 100644 index 000000000..d871ffbeb --- /dev/null +++ b/app/views/DiscussionsView/__snapshots__/Item.stories.storyshot @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Discussions.Item content 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"+999\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Attachment title\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Attachment title\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null}]}]}"`; + +exports[`Storyshots Discussions.Item themes 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9ca2a8\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9ca2a8\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#030b1b\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#f9f9f9\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9297a2\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#cbced1\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9297a2\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9297a2\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#9297a2\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#9297a2\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"discussions-view-Message content\\",\\"focusable\\":true,\\"style\\":{\\"backgroundColor\\":\\"#000000\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4},{\\"marginRight\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":36,\\"height\\":36,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=36\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"column\\",\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"marginBottom\\":2,\\"justifyContent\\":\\"space-between\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"flexShrink\\":1,\\"fontSize\\":18,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#f9f9f9\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":4,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#b2b8c6\\"}]},\\"children\\":[\\"10:00 AM\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Message content\\",\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#cbced1\\"},{\\"flex\\":1}],\\"numberOfLines\\":2},\\"children\\":[\\"Message content\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"marginTop\\":8,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#b2b8c6\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#b2b8c6\\"}],\\"numberOfLines\\":1},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#b2b8c6\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":10,\\"marginLeft\\":2,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"System\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#b2b8c6\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"November 10, 2020\\"]}]}]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":0.5},null,{\\"backgroundColor\\":\\"#cbcbcc\\"}]},\\"children\\":null}]}]}"`; diff --git a/app/views/DiscussionsView/index.tsx b/app/views/DiscussionsView/index.tsx new file mode 100644 index 000000000..01282095b --- /dev/null +++ b/app/views/DiscussionsView/index.tsx @@ -0,0 +1,208 @@ +import React, { useEffect, useLayoutEffect, useState } from 'react'; +import { FlatList, StyleSheet } from 'react-native'; +import { useSelector } from 'react-redux'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { HeaderBackButton, StackNavigationOptions, StackNavigationProp } from '@react-navigation/stack'; +import { RouteProp } from '@react-navigation/core'; + +import { IApplicationState } from '../../definitions'; +import { ChatsStackParamList } from '../../stacks/types'; +import ActivityIndicator from '../../containers/ActivityIndicator'; +import I18n from '../../i18n'; +import StatusBar from '../../containers/StatusBar'; +import log from '../../utils/log'; +import debounce from '../../utils/debounce'; +import { themes } from '../../constants/colors'; +import SafeAreaView from '../../containers/SafeAreaView'; +import * as HeaderButton from '../../containers/HeaderButton'; +import * as List from '../../containers/List'; +import BackgroundContainer from '../../containers/BackgroundContainer'; +import { isIOS } from '../../utils/deviceInfo'; +import { getHeaderTitlePosition } from '../../containers/Header'; +import { useTheme } from '../../theme'; +import RocketChat from '../../lib/rocketchat'; +import SearchHeader from '../../containers/SearchHeader'; +import { TThreadModel } from '../../definitions/IThread'; +import Item from './Item'; + +const API_FETCH_COUNT = 50; + +const styles = StyleSheet.create({ + contentContainer: { + marginBottom: 30 + } +}); + +interface IDiscussionsViewProps { + navigation: StackNavigationProp; + route: RouteProp; + item: TThreadModel; +} + +const DiscussionsView = ({ navigation, route }: IDiscussionsViewProps): JSX.Element => { + const rid = route.params?.rid; + const t = route.params?.t; + + const baseUrl = useSelector((state: IApplicationState) => state.server?.server); + const isMasterDetail = useSelector((state: IApplicationState) => state.app?.isMasterDetail); + + const [loading, setLoading] = useState(false); + const [discussions, setDiscussions] = useState([]); + const [search, setSearch] = useState([]); + const [isSearching, setIsSearching] = useState(false); + const [total, setTotal] = useState(0); + const [searchTotal, setSearchTotal] = useState(0); + + const { theme } = useTheme(); + const insets = useSafeAreaInsets(); + + const load = async (text = '') => { + if (loading) { + return; + } + + setLoading(true); + try { + const result = await RocketChat.getDiscussions({ + roomId: rid, + offset: isSearching ? search.length : discussions.length, + count: API_FETCH_COUNT, + text + }); + + if (result.success) { + if (isSearching) { + setSearch(result.messages); + setSearchTotal(result.total); + } else { + setDiscussions(result.messages); + setTotal(result.total); + } + } + setLoading(false); + } catch (e) { + log(e); + setLoading(false); + } + }; + + const onSearchChangeText = debounce(async (text: string) => { + setIsSearching(true); + await load(text); + }, 300); + + const onCancelSearchPress = () => { + setIsSearching(false); + setSearch([]); + setSearchTotal(0); + }; + + const onSearchPress = () => { + setIsSearching(true); + }; + + const setHeader = () => { + let options: Partial; + if (isSearching) { + const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 1 }); + options = { + headerTitleAlign: 'left', + headerLeft: () => ( + + + + ), + headerTitle: () => ( + + ), + headerTitleContainerStyle: { + left: headerTitlePosition.left, + right: headerTitlePosition.right + }, + headerRight: () => null + }; + return options; + } + + options = { + headerLeft: () => ( + navigation.pop()} tintColor={themes[theme].headerTintColor} /> + ), + headerTitleAlign: 'center', + headerTitle: I18n.t('Discussions'), + headerTitleContainerStyle: { + left: null, + right: null + }, + headerRight: () => ( + + + + ) + }; + + if (isMasterDetail) { + options.headerLeft = () => ; + } + return options; + }; + + useEffect(() => { + load(); + }, []); + + useLayoutEffect(() => { + const options = setHeader(); + navigation.setOptions(options); + }, [navigation, isSearching]); + + const onDiscussionPress = debounce( + (item: TThreadModel) => { + if (item.drid && item.t) { + navigation.push('RoomView', { + rid: item.drid, + prid: item.rid, + name: item.msg, + t + }); + } + }, + 1000, + true + ); + + const renderItem = ({ item }: { item: TThreadModel }) => ( + + ); + + if (!discussions?.length) { + return ; + } + + return ( + + + item.msg} + style={{ backgroundColor: themes[theme].backgroundColor }} + contentContainerStyle={styles.contentContainer} + onEndReachedThreshold={0.5} + removeClippedSubviews={isIOS} + onEndReached={() => (isSearching ? searchTotal : total) > API_FETCH_COUNT ?? load()} + ItemSeparatorComponent={List.Separator} + ListFooterComponent={loading ? : null} + scrollIndicatorInsets={{ right: 1 }} + /> + + ); +}; + +export default DiscussionsView; diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index e56f84040..7721936a6 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -941,7 +941,7 @@ class RoomActionsView extends React.Component { canReturnQueue, canViewCannedResponse } = this.state; - const { rid, t } = room; + const { rid, t, prid } = room; const isGroupChat = RocketChat.isGroupChat(room); return ( @@ -1009,6 +1009,27 @@ class RoomActionsView extends React.Component { ) : null} + {['c', 'p', 'd'].includes(t) && !prid ? ( + <> + + this.onPressTouchable({ + route: 'DiscussionsView', + params: { + rid, + t + } + }) + } + testID='room-actions-discussions' + left={() => } + showActionIndicator + /> + + + ) : null} + {['c', 'p', 'd'].includes(t) ? ( <> ), - headerTitle: () => , + headerTitle: () => ( + + ), headerTitleContainerStyle: { left: headerTitlePosition.left, right: headerTitlePosition.right diff --git a/app/views/ThreadMessagesView/Item.stories.js b/app/views/ThreadMessagesView/Item.stories.js index d829d92d0..b213f4d7c 100644 --- a/app/views/ThreadMessagesView/Item.stories.js +++ b/app/views/ThreadMessagesView/Item.stories.js @@ -2,12 +2,12 @@ import React from 'react'; import { storiesOf } from '@storybook/react-native'; import { ScrollView } from 'react-native'; -import { combineReducers, createStore } from 'redux'; import { Provider } from 'react-redux'; import * as List from '../../containers/List'; import { themes } from '../../constants/colors'; import { ThemeContext } from '../../theme'; +import { store } from '../../../storybook/stories'; import Item from './Item'; const author = { @@ -49,28 +49,6 @@ const listDecorator = story => ( ); -const reducers = combineReducers({ - login: () => ({ - user: { - id: 'abc', - username: 'rocket.cat', - name: 'Rocket Cat' - } - }), - server: () => ({ - server: 'https://open.rocket.chat', - version: '3.7.0' - }), - share: () => ({ - server: 'https://open.rocket.chat', - version: '3.7.0' - }), - settings: () => ({ - blockUnauthenticatedAccess: false - }) -}); -const store = createStore(reducers); - const stories = storiesOf('Thread Messages.Item', module) .addDecorator(listDecorator) .addDecorator(story => {story()}); diff --git a/app/views/ThreadMessagesView/Item.tsx b/app/views/ThreadMessagesView/Item.tsx index 688e95229..3cd556ed1 100644 --- a/app/views/ThreadMessagesView/Item.tsx +++ b/app/views/ThreadMessagesView/Item.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import Touchable from 'react-native-platform-touchable'; -import { withTheme } from '../../theme'; +import { useTheme } from '../../theme'; import Avatar from '../../containers/Avatar'; import sharedStyles from '../Styles'; import { themes } from '../../constants/colors'; @@ -59,7 +59,6 @@ const styles = StyleSheet.create({ interface IItem { item: TThreadModel; baseUrl: string; - theme?: string; useRealName: boolean; user: any; badgeColor?: string; @@ -67,7 +66,8 @@ interface IItem { toggleFollowThread: (isFollowing: boolean, id: string) => void; } -const Item = ({ item, baseUrl, theme, useRealName, user, badgeColor, onPress, toggleFollowThread }: IItem) => { +const Item = ({ item, baseUrl, useRealName, user, badgeColor, onPress, toggleFollowThread }: IItem) => { + const { theme } = useTheme(); const username = (useRealName && item?.u?.name) || item?.u?.username; let time; if (item?.ts) { @@ -89,16 +89,18 @@ const Item = ({ item, baseUrl, theme, useRealName, user, badgeColor, onPress, to {time} - + {makeThreadName(item) && username ? ( + /* @ts-ignore */ + + ) : null} {badgeColor ? : null} @@ -108,4 +110,4 @@ const Item = ({ item, baseUrl, theme, useRealName, user, badgeColor, onPress, to ); }; -export default withTheme(Item); +export default Item; diff --git a/app/views/ThreadMessagesView/index.tsx b/app/views/ThreadMessagesView/index.tsx index bed452f28..adda3e803 100644 --- a/app/views/ThreadMessagesView/index.tsx +++ b/app/views/ThreadMessagesView/index.tsx @@ -143,7 +143,9 @@ class ThreadMessagesView extends React.Component ), - headerTitle: () => , + headerTitle: () => ( + + ), headerTitleContainerStyle: { left: headerTitlePosition.left, right: headerTitlePosition.right diff --git a/e2e/tests/room/04-discussion.spec.js b/e2e/tests/room/04-discussion.spec.js index 80fbdb4d2..74956e8d1 100644 --- a/e2e/tests/room/04-discussion.spec.js +++ b/e2e/tests/room/04-discussion.spec.js @@ -107,7 +107,7 @@ describe('Discussion', () => { }); describe('Check RoomActionsView render', () => { - it('should navigete to RoomActionsView', async () => { + it('should navigate to RoomActionsView', async () => { await waitFor(element(by.id('room-header'))) .toBeVisible() .withTimeout(5000); @@ -173,4 +173,51 @@ describe('Discussion', () => { await expect(element(by.id('room-info-view-edit-button'))).toBeVisible(); }); }); + + describe('Open Discussion from DiscussionsView', () => { + const discussionName = `${data.random}message`; + it('should go back to main room', async () => { + await tapBack(); + await waitFor(element(by.id('room-actions-view'))) + .toBeVisible() + .withTimeout(5000); + await tapBack(); + await waitFor(element(by.id(`room-view-title-${discussionName}`))) + .toExist() + .withTimeout(5000); + await tapBack(); + await navigateToRoom(); + }); + + it('should navigate to DiscussionsView', async () => { + await waitFor(element(by.id(`room-view-title-${channel}`))) + .toExist() + .withTimeout(5000); + await waitFor(element(by.id('room-header'))) + .toBeVisible() + .withTimeout(5000); + await element(by.id('room-header')).tap(); + await waitFor(element(by.id('room-actions-discussions'))) + .toBeVisible() + .withTimeout(5000); + await element(by.id('room-actions-discussions')).tap(); + await waitFor(element(by.id('discussions-view'))) + .toBeVisible() + .withTimeout(5000); + }); + + it('should navigate to discussion', async () => { + const discussionName = `${data.random} Discussion NewMessageView`; + await waitFor(element(by.label(discussionName)).atIndex(0)) + .toExist() + .withTimeout(5000); + await element(by.label(discussionName)).atIndex(0).tap(); + await waitFor(element(by.id(`room-view-title-${discussionName}`))) + .toExist() + .withTimeout(5000); + await waitFor(element(by.id('messagebox'))) + .toBeVisible() + .withTimeout(60000); + }); + }); }); diff --git a/storybook/stories/index.js b/storybook/stories/index.js index c8209d6f6..da4d1c7dd 100644 --- a/storybook/stories/index.js +++ b/storybook/stories/index.js @@ -11,6 +11,7 @@ import './Markdown'; import './HeaderButtons'; import './UnreadBadge'; import '../../app/views/ThreadMessagesView/Item.stories.js'; +import '../../app/views/DiscussionsView/Item.stories.js'; import './Avatar'; import './NewMarkdown'; import '../../app/containers/BackgroundContainer/index.stories.js';