Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0168833
[FIX] Wrong styling on E2E encryption banner
gerzonc Jan 6, 2021
93da561
[FIX] Wrong styling on E2E encryption banner
gerzonc Jan 7, 2021
fb5c1e0
[FIX] Wrong styling on E2E encryption banner
gerzonc Jan 7, 2021
46ffac2
[FIX] Wrong styling on E2E encryption banner (#2767)
gerzonc Jan 7, 2021
b6e9ef1
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 7, 2021
e05a0e9
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 13, 2021
45e96dc
Updated SortDropdown, ListHeader, ListItem and added stories for List…
gerzonc Jan 13, 2021
ab689d4
Merge branch 'fix.wrong-styling-e2e-encryption-banner' of https://git…
gerzonc Jan 13, 2021
894684d
Updated SortDropdown
gerzonc Jan 13, 2021
8b870b5
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 13, 2021
9fd7050
Removed unused component
gerzonc Jan 14, 2021
6f6de40
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 14, 2021
3268674
Updated List.Item and stories
gerzonc Jan 18, 2021
da2bde9
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 18, 2021
5312c66
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
diegolmello Jan 20, 2021
976d89c
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
diegolmello Jan 20, 2021
0403ff7
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
gerzonc Jan 21, 2021
a41f883
Reverted unnecessary changes and updated ListItem stories
gerzonc Jan 21, 2021
2d49578
Merge branch 'fix.wrong-styling-e2e-encryption-banner' of https://git…
gerzonc Jan 21, 2021
f307ba3
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
diegolmello Jan 21, 2021
eb63b54
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
diegolmello Jan 21, 2021
1ea2580
Fix minor indentation
diegolmello Jan 21, 2021
f96f4ed
Stop breaking Touch's default underlay color
diegolmello Jan 21, 2021
995d069
Fix indentation
diegolmello Jan 21, 2021
02a9877
Remove falsy comparison from render
diegolmello Jan 21, 2021
21b6f76
Fix left icon
diegolmello Jan 21, 2021
28a3c8e
Merge branch 'develop' into fix.wrong-styling-e2e-encryption-banner
diegolmello Jan 21, 2021
0f0305f
Use List.Item on OmnichannelStatus
diegolmello Jan 21, 2021
1763c91
Add missing separator
diegolmello Jan 21, 2021
2877ab6
Lint
diegolmello Jan 21, 2021
a959514
Fix sort dropdown
diegolmello Jan 21, 2021
9f4a792
Remove unnecessary styles
diegolmello Jan 21, 2021
d851e56
Fix detox
diegolmello Jan 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6796,7 +6796,7 @@ exports[`Storyshots List with black theme 1`] = `
</RNCSafeAreaView>
`;

exports[`Storyshots List with custom color 1`] = `
exports[`Storyshots List with custom colors 1`] = `
<RCTScrollView
contentContainerStyle={
Object {
Expand Down Expand Up @@ -6893,6 +6893,65 @@ exports[`Storyshots List with custom color 1`] = `
]
}
/>
<View
style={
Array [
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"justifyContent": "center",
"paddingHorizontal": 12,
},
false,
Object {
"height": 92,
},
]
}
>
<View
style={
Object {
"flex": 1,
"justifyContent": "center",
}
}
>
<Text
numberOfLines={1}
style={
Array [
Object {
"backgroundColor": "transparent",
"fontFamily": "System",
"fontSize": 16,
"fontWeight": "400",
"textAlign": "left",
},
Object {
"color": "white",
},
]
}
>
Press me!
</Text>
</View>
</View>
<View
style={
Array [
Object {
"height": 0.5,
},
undefined,
Object {
"backgroundColor": "#cbcbcc",
},
]
}
/>
</View>
</RCTScrollView>
`;
Expand Down
3 changes: 3 additions & 0 deletions app/constants/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const themes = {
auxiliaryText: '#9ca2a8',
infoText: '#6d6d72',
tintColor: '#1d74f5',
tintActive: '#549df9',
auxiliaryTintColor: '#6C727A',
actionTintColor: '#1d74f5',
separatorColor: '#cbcbcc',
Expand Down Expand Up @@ -80,6 +81,7 @@ export const themes = {
auxiliaryText: '#9297a2',
infoText: '#6D6D72',
tintColor: '#1d74f5',
tintActive: '#549df9',
auxiliaryTintColor: '#f9f9f9',
actionTintColor: '#1d74f5',
separatorColor: '#2b2b2d',
Expand Down Expand Up @@ -125,6 +127,7 @@ export const themes = {
auxiliaryText: '#b2b8c6',
infoText: '#6d6d72',
tintColor: '#1e9bfe',
tintActive: '#76b7fc',
auxiliaryTintColor: '#f9f9f9',
actionTintColor: '#1e9bfe',
separatorColor: '#272728',
Expand Down
19 changes: 10 additions & 9 deletions app/containers/List/ListItem.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React from 'react';
import {
View,
Text,
StyleSheet,
I18nManager
View, Text, StyleSheet, I18nManager
} from 'react-native';
import PropTypes from 'prop-types';

Expand Down Expand Up @@ -82,11 +79,12 @@ const Content = React.memo(({
));

const Button = React.memo(({
onPress, ...props
onPress, backgroundColor, underlayColor, ...props
}) => (
<Touch
onPress={() => onPress(props.title)}
style={{ backgroundColor: themes[props.theme].backgroundColor }}
style={{ backgroundColor: backgroundColor || themes[props.theme].backgroundColor }}
underlayColor={underlayColor}
enabled={!props.disabled}
theme={props.theme}
>
Expand All @@ -99,15 +97,16 @@ const ListItem = React.memo(({ ...props }) => {
return <Button {...props} />;
}
return (
<View style={{ backgroundColor: themes[props.theme].backgroundColor }}>
<View style={{ backgroundColor: props.backgroundColor || themes[props.theme].backgroundColor }}>
<Content {...props} />
</View>
);
});

ListItem.propTypes = {
onPress: PropTypes.func,
theme: PropTypes.string
theme: PropTypes.string,
backgroundColor: PropTypes.string
};

ListItem.displayName = 'List.Item';
Expand Down Expand Up @@ -137,7 +136,9 @@ Button.propTypes = {
title: PropTypes.string,
onPress: PropTypes.func,
disabled: PropTypes.bool,
theme: PropTypes.string
theme: PropTypes.string,
backgroundColor: PropTypes.string,
underlayColor: PropTypes.string
};

Button.defaultProps = {
Expand Down
61 changes: 27 additions & 34 deletions app/ee/omnichannel/containers/OmnichannelStatus.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import React, { memo, useState, useEffect } from 'react';
import {
View, Text, StyleSheet, Switch
} from 'react-native';
import { View, Switch } from 'react-native';
import PropTypes from 'prop-types';

import Touch from '../../../utils/touch';
import { CustomIcon } from '../../../lib/Icons';
import I18n from '../../../i18n';
import * as List from '../../../containers/List';
import styles from '../../../views/RoomsListView/styles';
import { themes, SWITCH_TRACK_COLOR } from '../../../constants/colors';
import { withTheme } from '../../../theme';
Expand Down Expand Up @@ -36,35 +32,32 @@ const OmnichannelStatus = memo(({
};

return (
<Touch
onPress={goQueue}
theme={theme}
style={{ backgroundColor: themes[theme].headerSecondaryBackground }}
>
<View
style={[
styles.dropdownContainerHeader,
{ borderBottomWidth: StyleSheet.hairlineWidth, borderColor: themes[theme].separatorColor }
]}
>
<CustomIcon style={[styles.queueIcon, { color: themes[theme].auxiliaryText }]} size={22} name='omnichannel' />
<Text style={[styles.queueToggleText, { color: themes[theme].auxiliaryText }]}>{I18n.t('Omnichannel')}</Text>
{inquiryEnabled
? (
<UnreadBadge
style={styles.queueIcon}
unread={queueSize}
<>
<List.Item
title='Omnichannel'
left={() => <List.Icon name='omnichannel' />}
color={themes[theme].auxiliaryText}
onPress={goQueue}
right={() => (
<View style={styles.omnichannelRightContainer}>
{inquiryEnabled
? (
<UnreadBadge
style={styles.queueIcon}
unread={queueSize}
/>
)
: null}
<Switch
value={status}
trackColor={SWITCH_TRACK_COLOR}
onValueChange={toggleLivechat}
/>
)
: null}
<Switch
style={styles.omnichannelToggle}
value={status}
trackColor={SWITCH_TRACK_COLOR}
onValueChange={toggleLivechat}
/>
</View>
</Touch>
</View>
)}
/>
<List.Separator />
</>
);
});

Expand Down
7 changes: 4 additions & 3 deletions app/utils/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class Touch extends React.Component {

render() {
const {
children, onPress, theme, ...props
children, onPress, theme, underlayColor, ...props
} = this.props;

return (
<RectButton
ref={this.getRef}
onPress={onPress}
activeOpacity={1}
underlayColor={themes[theme].bannerBackground}
underlayColor={underlayColor || themes[theme].bannerBackground}
rippleColor={themes[theme].bannerBackground}
{...props}
>
Expand All @@ -36,7 +36,8 @@ class Touch extends React.Component {
Touch.propTypes = {
children: PropTypes.node,
onPress: PropTypes.func,
theme: PropTypes.string
theme: PropTypes.string,
underlayColor: PropTypes.string
};

export default Touch;
49 changes: 0 additions & 49 deletions app/views/RoomsListView/ListHeader/Encryption.js

This file was deleted.

45 changes: 0 additions & 45 deletions app/views/RoomsListView/ListHeader/Sort.js

This file was deleted.

Loading