* Tighten up post draft UI
* Revert "MM-15307 Updated to use InteractionManager (#3666)"
This reverts commit e08155c81b.
* Address PR review comments
* Update snapshot test
* Don't return null if no files
* Fix progress text and padding issues
* Fixes per Matt's review
* Make linter happy
342 lines
11 KiB
Text
342 lines
11 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`PostTextBox should match, full snapshot 1`] = `
|
|
<React.Fragment>
|
|
<Connect(Typing) />
|
|
<View
|
|
onLayout={[Function]}
|
|
style={
|
|
Array [
|
|
Object {
|
|
"alignItems": "flex-end",
|
|
"backgroundColor": "#ffffff",
|
|
"borderTopColor": "rgba(61,60,64,0.2)",
|
|
"borderTopWidth": 1,
|
|
"flexDirection": "row",
|
|
"justifyContent": "center",
|
|
"paddingBottom": 2,
|
|
},
|
|
null,
|
|
]
|
|
}
|
|
>
|
|
<ScrollView
|
|
contentContainerStyle={
|
|
Object {
|
|
"alignItems": "stretch",
|
|
"paddingTop": 7,
|
|
}
|
|
}
|
|
disableScrollViewPanResponder={true}
|
|
keyboardShouldPersistTaps="always"
|
|
overScrollMode="never"
|
|
pinchGestureEnabled={false}
|
|
scrollEnabled={false}
|
|
showsHorizontalScrollIndicator={false}
|
|
showsVerticalScrollIndicator={false}
|
|
style={
|
|
Array [
|
|
Object {
|
|
"flex": 1,
|
|
"flexDirection": "column",
|
|
},
|
|
]
|
|
}
|
|
>
|
|
<ForwardRef(WrappedPasteableTextInput)
|
|
blurOnSubmit={false}
|
|
disableFullscreenUI={true}
|
|
editable={true}
|
|
keyboardAppearance="light"
|
|
keyboardType="default"
|
|
multiline={true}
|
|
onChangeText={[Function]}
|
|
onContentSizeChange={null}
|
|
onEndEditing={[Function]}
|
|
onPaste={[Function]}
|
|
onSelectionChange={[Function]}
|
|
placeholder="Write to Test Channel"
|
|
placeholderTextColor="rgba(61,60,64,0.5)"
|
|
style={
|
|
Object {
|
|
"color": "#3d3c40",
|
|
"fontSize": 15,
|
|
"lineHeight": 20,
|
|
"maxHeight": 150,
|
|
"minHeight": 30,
|
|
"paddingBottom": 6,
|
|
"paddingHorizontal": 12,
|
|
"paddingTop": 6,
|
|
}
|
|
}
|
|
underlineColorAndroid="transparent"
|
|
value=""
|
|
/>
|
|
<React.Fragment>
|
|
<Connect(FileUploadPreview)
|
|
files={Array []}
|
|
rootId=""
|
|
/>
|
|
<View
|
|
style={
|
|
Object {
|
|
"alignItems": "center",
|
|
"display": "flex",
|
|
"flexDirection": "row",
|
|
"justifyContent": "space-between",
|
|
"paddingBottom": 1,
|
|
}
|
|
}
|
|
>
|
|
<View
|
|
style={
|
|
Object {
|
|
"display": "flex",
|
|
"flexDirection": "row",
|
|
"height": 44,
|
|
}
|
|
}
|
|
>
|
|
<TouchableOpacity
|
|
activeOpacity={0.2}
|
|
disabled={false}
|
|
onPress={[Function]}
|
|
style={
|
|
Object {
|
|
"alignItems": "center",
|
|
"justifyContent": "center",
|
|
"padding": 10,
|
|
}
|
|
}
|
|
>
|
|
<Icon
|
|
allowFontScaling={false}
|
|
color="rgba(61,60,64,0.64)"
|
|
name="at"
|
|
size={24}
|
|
/>
|
|
</TouchableOpacity>
|
|
<TouchableOpacity
|
|
activeOpacity={0.2}
|
|
disabled={false}
|
|
onPress={[Function]}
|
|
style={
|
|
Object {
|
|
"alignItems": "center",
|
|
"justifyContent": "center",
|
|
"padding": 10,
|
|
}
|
|
}
|
|
>
|
|
<Image
|
|
source={
|
|
Object {
|
|
"testUri": "../../../dist/assets/images/icons/slash-forward-box.png",
|
|
}
|
|
}
|
|
style={
|
|
Array [
|
|
Object {
|
|
"height": 24,
|
|
"opacity": 1,
|
|
"tintColor": "rgba(61,60,64,0.64)",
|
|
"width": 24,
|
|
},
|
|
]
|
|
}
|
|
/>
|
|
</TouchableOpacity>
|
|
<FileUploadButton
|
|
blurTextBox={[Function]}
|
|
browseFileTypes="public.item"
|
|
buttonContainerStyle={
|
|
Object {
|
|
"alignItems": "center",
|
|
"justifyContent": "center",
|
|
"padding": 10,
|
|
}
|
|
}
|
|
canBrowseFiles={true}
|
|
canBrowsePhotoLibrary={true}
|
|
canBrowseVideoLibrary={true}
|
|
canTakePhoto={true}
|
|
canTakeVideo={true}
|
|
extraOptions={null}
|
|
fileCount={0}
|
|
maxFileCount={5}
|
|
maxFileSize={1024}
|
|
onShowFileMaxWarning={[Function]}
|
|
onShowFileSizeWarning={[Function]}
|
|
theme={
|
|
Object {
|
|
"awayIndicator": "#ffbc42",
|
|
"buttonBg": "#166de0",
|
|
"buttonColor": "#ffffff",
|
|
"centerChannelBg": "#ffffff",
|
|
"centerChannelColor": "#3d3c40",
|
|
"codeTheme": "github",
|
|
"dndIndicator": "#f74343",
|
|
"errorTextColor": "#fd5960",
|
|
"linkColor": "#2389d7",
|
|
"mentionBg": "#ffffff",
|
|
"mentionBj": "#ffffff",
|
|
"mentionColor": "#145dbf",
|
|
"mentionHighlightBg": "#ffe577",
|
|
"mentionHighlightLink": "#166de0",
|
|
"newMessageSeparator": "#ff8800",
|
|
"onlineIndicator": "#06d6a0",
|
|
"sidebarBg": "#145dbf",
|
|
"sidebarHeaderBg": "#1153ab",
|
|
"sidebarHeaderTextColor": "#ffffff",
|
|
"sidebarText": "#ffffff",
|
|
"sidebarTextActiveBorder": "#579eff",
|
|
"sidebarTextActiveColor": "#ffffff",
|
|
"sidebarTextHoverBg": "#4578bf",
|
|
"sidebarUnreadText": "#ffffff",
|
|
"type": "Mattermost",
|
|
}
|
|
}
|
|
uploadFiles={[Function]}
|
|
validMimeTypes={Array []}
|
|
/>
|
|
<ImageUploadButton
|
|
blurTextBox={[Function]}
|
|
browseFileTypes="public.item"
|
|
buttonContainerStyle={
|
|
Object {
|
|
"alignItems": "center",
|
|
"justifyContent": "center",
|
|
"padding": 10,
|
|
}
|
|
}
|
|
canBrowseFiles={true}
|
|
canBrowsePhotoLibrary={true}
|
|
canBrowseVideoLibrary={true}
|
|
canTakePhoto={true}
|
|
canTakeVideo={true}
|
|
extraOptions={null}
|
|
fileCount={0}
|
|
maxFileCount={5}
|
|
maxFileSize={1024}
|
|
onShowFileMaxWarning={[Function]}
|
|
onShowFileSizeWarning={[Function]}
|
|
theme={
|
|
Object {
|
|
"awayIndicator": "#ffbc42",
|
|
"buttonBg": "#166de0",
|
|
"buttonColor": "#ffffff",
|
|
"centerChannelBg": "#ffffff",
|
|
"centerChannelColor": "#3d3c40",
|
|
"codeTheme": "github",
|
|
"dndIndicator": "#f74343",
|
|
"errorTextColor": "#fd5960",
|
|
"linkColor": "#2389d7",
|
|
"mentionBg": "#ffffff",
|
|
"mentionBj": "#ffffff",
|
|
"mentionColor": "#145dbf",
|
|
"mentionHighlightBg": "#ffe577",
|
|
"mentionHighlightLink": "#166de0",
|
|
"newMessageSeparator": "#ff8800",
|
|
"onlineIndicator": "#06d6a0",
|
|
"sidebarBg": "#145dbf",
|
|
"sidebarHeaderBg": "#1153ab",
|
|
"sidebarHeaderTextColor": "#ffffff",
|
|
"sidebarText": "#ffffff",
|
|
"sidebarTextActiveBorder": "#579eff",
|
|
"sidebarTextActiveColor": "#ffffff",
|
|
"sidebarTextHoverBg": "#4578bf",
|
|
"sidebarUnreadText": "#ffffff",
|
|
"type": "Mattermost",
|
|
}
|
|
}
|
|
uploadFiles={[Function]}
|
|
validMimeTypes={Array []}
|
|
/>
|
|
<AttachmentButton
|
|
blurTextBox={[Function]}
|
|
buttonContainerStyle={
|
|
Object {
|
|
"alignItems": "center",
|
|
"justifyContent": "center",
|
|
"padding": 10,
|
|
}
|
|
}
|
|
canTakePhoto={true}
|
|
canTakeVideo={true}
|
|
fileCount={0}
|
|
maxFileCount={5}
|
|
maxFileSize={1024}
|
|
onShowFileMaxWarning={[Function]}
|
|
onShowFileSizeWarning={[Function]}
|
|
theme={
|
|
Object {
|
|
"awayIndicator": "#ffbc42",
|
|
"buttonBg": "#166de0",
|
|
"buttonColor": "#ffffff",
|
|
"centerChannelBg": "#ffffff",
|
|
"centerChannelColor": "#3d3c40",
|
|
"codeTheme": "github",
|
|
"dndIndicator": "#f74343",
|
|
"errorTextColor": "#fd5960",
|
|
"linkColor": "#2389d7",
|
|
"mentionBg": "#ffffff",
|
|
"mentionBj": "#ffffff",
|
|
"mentionColor": "#145dbf",
|
|
"mentionHighlightBg": "#ffe577",
|
|
"mentionHighlightLink": "#166de0",
|
|
"newMessageSeparator": "#ff8800",
|
|
"onlineIndicator": "#06d6a0",
|
|
"sidebarBg": "#145dbf",
|
|
"sidebarHeaderBg": "#1153ab",
|
|
"sidebarHeaderTextColor": "#ffffff",
|
|
"sidebarText": "#ffffff",
|
|
"sidebarTextActiveBorder": "#579eff",
|
|
"sidebarTextActiveColor": "#ffffff",
|
|
"sidebarTextHoverBg": "#4578bf",
|
|
"sidebarUnreadText": "#ffffff",
|
|
"type": "Mattermost",
|
|
}
|
|
}
|
|
uploadFiles={[Function]}
|
|
validMimeTypes={Array []}
|
|
/>
|
|
</View>
|
|
<SendButton
|
|
disabled={true}
|
|
handleSendMessage={[Function]}
|
|
theme={
|
|
Object {
|
|
"awayIndicator": "#ffbc42",
|
|
"buttonBg": "#166de0",
|
|
"buttonColor": "#ffffff",
|
|
"centerChannelBg": "#ffffff",
|
|
"centerChannelColor": "#3d3c40",
|
|
"codeTheme": "github",
|
|
"dndIndicator": "#f74343",
|
|
"errorTextColor": "#fd5960",
|
|
"linkColor": "#2389d7",
|
|
"mentionBg": "#ffffff",
|
|
"mentionBj": "#ffffff",
|
|
"mentionColor": "#145dbf",
|
|
"mentionHighlightBg": "#ffe577",
|
|
"mentionHighlightLink": "#166de0",
|
|
"newMessageSeparator": "#ff8800",
|
|
"onlineIndicator": "#06d6a0",
|
|
"sidebarBg": "#145dbf",
|
|
"sidebarHeaderBg": "#1153ab",
|
|
"sidebarHeaderTextColor": "#ffffff",
|
|
"sidebarText": "#ffffff",
|
|
"sidebarTextActiveBorder": "#579eff",
|
|
"sidebarTextActiveColor": "#ffffff",
|
|
"sidebarTextHoverBg": "#4578bf",
|
|
"sidebarUnreadText": "#ffffff",
|
|
"type": "Mattermost",
|
|
}
|
|
}
|
|
/>
|
|
</View>
|
|
</React.Fragment>
|
|
</ScrollView>
|
|
</View>
|
|
</React.Fragment>
|
|
`;
|