diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 84457cec0..fc2569dd2 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -20361,6 +20361,15 @@ exports[`Storyshots Message Colored attachments 1`] = ` } } > + + + `; +exports[`Storyshots Message Show a button as attachment 1`] = ` + + + + + + + + + + + + + + + + + + diego.mello + + + + 10:00 AM + + + + + Test Button + + + + Text button + + + + + + + + + +`; + exports[`Storyshots Message Static avatar 1`] = ` `; +exports[`Storyshots Message Thumbnail from server 1`] = ` + + + + + + + + + + + + + + + + + + diego.mello + + + + 10:00 AM + + + + + + this is a thumbnail + + + + + + + + Title + + + + + + + + Image text + + + + + + + + + + + +`; + exports[`Storyshots Message Time format 1`] = ` + + + + + Short Text + + + + + + + + Long Text + + + + + + +`; + exports[`Storyshots Thread Messages.Item badge 1`] = ` diff --git a/android/build.gradle b/android/build.gradle index b0bc7a666..8c987ef86 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -18,7 +18,7 @@ buildscript { supportLibVersion = "28.0.0" libre_build = !(isPlay.toBoolean()) jitsi_url = isPlay ? "https://github.com/RocketChat/jitsi-maven-repository/raw/master/releases" : "https://github.com/RocketChat/jitsi-maven-repository/raw/libre/releases" - jitsi_version = isPlay ? "2.10.2" : "2.10.0-libre" + jitsi_version = isPlay ? "3.6.0" : "3.6.0-libre" } repositories { diff --git a/app/containers/TextInput.js b/app/containers/TextInput.js index eb119218f..9bb62de33 100644 --- a/app/containers/TextInput.js +++ b/app/containers/TextInput.js @@ -26,7 +26,7 @@ const styles = StyleSheet.create({ ...sharedStyles.textRegular, height: 48, fontSize: 16, - paddingHorizontal: 14, + padding: 14, borderWidth: StyleSheet.hairlineWidth, borderRadius: 2 }, diff --git a/app/containers/TextInput.stories.js b/app/containers/TextInput.stories.js new file mode 100644 index 000000000..6c802cc30 --- /dev/null +++ b/app/containers/TextInput.stories.js @@ -0,0 +1,43 @@ +/* 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 { View, StyleSheet } from 'react-native'; +import TextInput from './TextInput'; + +const styles = StyleSheet.create({ + paddingHorizontal: { + paddingHorizontal: 14 + } +}); + +const stories = storiesOf('Text Input', module); + +const item = { + name: 'Rocket.Chat', + longText: 'https://open.rocket.chat/images/logo/android-chrome-512x512.png' +}; + +const theme = 'light'; + + +stories.add('Short and Long Text', () => ( + <> + + + + + + +)); + diff --git a/app/containers/message/Attachments.js b/app/containers/message/Attachments.js index 0d068e9fd..0600e6d69 100644 --- a/app/containers/message/Attachments.js +++ b/app/containers/message/Attachments.js @@ -1,11 +1,35 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { dequal } from 'dequal'; import PropTypes from 'prop-types'; +import { Text } from 'react-native'; import Image from './Image'; import Audio from './Audio'; import Video from './Video'; import Reply from './Reply'; +import Button from '../Button'; +import styles from './styles'; +import MessageContext from './Context'; + +const AttachedActions = ({ + attachment, theme +}) => { + const { onAnswerButtonPress } = useContext(MessageContext); + + const attachedButtons = attachment.actions.map((element) => { + if (element.type === 'button') { + return