feat(native): Last mobile release UI fixes (#12603)

* feat(base/modal): order props alphabetically

* feat(base/ui): added ripple color for tertiary button

* feat(prejoin): removed autoFocus from input and adjusted content

* feat(conference): adjusted RaisedHandCountLabel and added extra code spaces

* feat(prejoin): fixed content to fit tablets

* feat(conference): moved header button styles to navigation styles

* feat(mobile/navigation): updated header navigation button styles

* feat(prejoin): updated elements width, removed left inset
This commit is contained in:
Calinteodor 2022-11-22 18:13:36 +02:00 committed by GitHub
parent a7c653bc30
commit 93566e313e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 75 additions and 65 deletions

View File

@ -53,9 +53,9 @@ const JitsiKeyboardAvoidingView = (
addBottomPadding = true, addBottomPadding = true,
children, children,
contentContainerStyle, contentContainerStyle,
disableForcedKeyboardDismiss,
hasTabNavigator, hasTabNavigator,
hasBottomTextInput, hasBottomTextInput,
disableForcedKeyboardDismiss,
style style
}: Props) => { }: Props) => {
const headerHeight = useHeaderHeight(); const headerHeight = useHeaderHeight();

View File

@ -60,10 +60,10 @@ const JitsiScreen = ({
addBottomPadding, addBottomPadding,
contentContainerStyle, contentContainerStyle,
children, children,
disableForcedKeyboardDismiss = false,
footerComponent, footerComponent,
hasTabNavigator = false, hasTabNavigator = false,
hasBottomTextInput = false, hasBottomTextInput = false,
disableForcedKeyboardDismiss = false,
safeAreaInsets = [ 'left', 'right' ], safeAreaInsets = [ 'left', 'right' ],
style style
}: Props) => { }: Props) => {

View File

@ -74,7 +74,7 @@ const Button: React.FC<IProps> = ({
accessibilityLabel = { accessibilityLabel } accessibilityLabel = { accessibilityLabel }
disabled = { disabled } disabled = { disabled }
onPress = { onPress } onPress = { onPress }
rippleColor = 'transparent' rippleColor = { BaseTheme.palette.action03Active }
style = { [ style = { [
buttonStyles, buttonStyles,
style style

View File

@ -1,11 +1,9 @@
// @flow
import React from 'react'; import React from 'react';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { IconRaiseHand } from '../../../base/icons'; import { IconRaiseHand } from '../../../base/icons';
import { Label } from '../../../base/label'; import { Label } from '../../../base/label';
import BaseTheme from '../../../base/ui/components/BaseTheme'; import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import styles from './styles'; import styles from './styles';

View File

@ -4,7 +4,6 @@ import BaseTheme from '../../../base/ui/components/BaseTheme.native';
export const INSECURE_ROOM_NAME_LABEL_COLOR = BaseTheme.palette.actionDanger; export const INSECURE_ROOM_NAME_LABEL_COLOR = BaseTheme.palette.actionDanger;
const TITLE_BAR_BUTTON_SIZE = 24; const TITLE_BAR_BUTTON_SIZE = 24;
const HEADER_ACTION_BUTTON_SIZE = 17;
/** /**
@ -35,29 +34,6 @@ export default {
margin: 10 margin: 10
}, },
headerNavigationButton: {
height: BaseTheme.spacing[6],
marginTop: 20,
width: BaseTheme.spacing[6]
},
headerNavigationIcon: {
marginLeft: 12
},
headerNavigationText: {
color: BaseTheme.palette.text01,
marginLeft: BaseTheme.spacing[3],
fontSize: HEADER_ACTION_BUTTON_SIZE
},
headerNavigationTextBold: {
...BaseTheme.typography.labelButton,
color: BaseTheme.palette.text01,
marginRight: BaseTheme.spacing[3],
fontSize: HEADER_ACTION_BUTTON_SIZE
},
/** /**
* View that contains the indicators. * View that contains the indicators.
*/ */
@ -212,12 +188,11 @@ export default {
}, },
raisedHandsCountLabel: { raisedHandsCountLabel: {
alignItems: 'center',
backgroundColor: BaseTheme.palette.warning02, backgroundColor: BaseTheme.palette.warning02,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center',
marginLeft: BaseTheme.spacing[0], marginLeft: BaseTheme.spacing[0],
marginBottom: BaseTheme.spacing[0], marginBottom: BaseTheme.spacing[0]
marginRight: BaseTheme.spacing[1]
}, },
raisedHandsCountLabelText: { raisedHandsCountLabelText: {

View File

@ -1,5 +1,3 @@
// @flow
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { Image, View } from 'react-native'; import { Image, View } from 'react-native';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
@ -226,11 +224,11 @@ class Thumbnail extends PureComponent<Props> {
] }> ] }>
{ !_isVirtualScreenshare && <ConnectionIndicator participantId = { participantId } /> } { !_isVirtualScreenshare && <ConnectionIndicator participantId = { participantId } /> }
{ !_isVirtualScreenshare && <RaisedHandIndicator participantId = { participantId } /> } { !_isVirtualScreenshare && <RaisedHandIndicator participantId = { participantId } /> }
{tileView && isScreenShare && ( { tileView && isScreenShare && (
<View style = { styles.indicatorContainer }> <View style = { styles.indicatorContainer }>
<ScreenShareIndicator /> <ScreenShareIndicator />
</View> </View>
)} ) }
</View>); </View>);
indicators.push(<Container indicators.push(<Container
key = 'bottom-indicators' key = 'bottom-indicators'
@ -369,7 +367,7 @@ class Thumbnail extends PureComponent<Props> {
_renderDominantSpeakerIndicator && !_isVirtualScreenshare ? styles.thumbnailDominantSpeaker : null _renderDominantSpeakerIndicator && !_isVirtualScreenshare ? styles.thumbnailDominantSpeaker : null
] } ] }
touchFeedback = { false }> touchFeedback = { false }>
{_gifSrc ? <Image { _gifSrc ? <Image
source = {{ uri: _gifSrc }} source = {{ uri: _gifSrc }}
style = { styles.thumbnailGif } /> style = { styles.thumbnailGif } />
: <> : <>

View File

@ -1,11 +1,11 @@
// @flow
import React from 'react'; import React from 'react';
import { Text, TouchableRipple } from 'react-native-paper'; import { Text, TouchableRipple } from 'react-native-paper';
import { Icon } from '../../../base/icons'; import { Icon } from '../../../base/icons';
import type { StyleType } from '../../../base/styles'; import type { StyleType } from '../../../base/styles';
import styles from '../../../conference/components/native/styles'; import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import { navigationStyles } from './styles';
type Props = { type Props = {
@ -55,25 +55,25 @@ const HeaderNavigationButton
src ? ( src ? (
<TouchableRipple <TouchableRipple
onPress = { onPress } onPress = { onPress }
rippleColor = { 'transparent' }
style = { [ style = { [
buttonStyle, buttonStyle,
styles.headerNavigationButton ] } > navigationStyles.headerNavigationButtonIcon ] } >
<Icon <Icon
color = { BaseTheme.palette.link01Active }
size = { 24 } size = { 24 }
src = { src } src = { src }
style = { styles.headerNavigationIcon } /> style = { navigationStyles.headerNavigationIcon } />
</TouchableRipple> </TouchableRipple>
) : ( ) : (
<TouchableRipple <TouchableRipple
disabled = { disabled } disabled = { disabled }
onPress = { onPress } onPress = { onPress }
rippleColor = { 'transparent' }> style = { navigationStyles.headerNavigationButtonText } >
<Text <Text
style = { style = {
twoActions twoActions
? styles.headerNavigationTextBold ? navigationStyles.headerNavigationTextBold
: styles.headerNavigationText : navigationStyles.headerNavigationText
}> }>
{ label } { label }
</Text> </Text>

View File

@ -4,6 +4,19 @@ import BaseTheme from '../../../base/ui/components/BaseTheme.native';
export const TEXT_COLOR = BaseTheme.palette.text01; export const TEXT_COLOR = BaseTheme.palette.text01;
const HEADER_ACTION_BUTTON_SIZE = 17;
const headerNavigationButton = {
alignContent: 'center',
height: '100%',
justifyItems: 'center'
};
const headerNavigationText = {
color: BaseTheme.palette.link01,
fontSize: HEADER_ACTION_BUTTON_SIZE
};
const unreadCounterDescription = { const unreadCounterDescription = {
...BaseTheme.typography.bodyShortBoldLarge, ...BaseTheme.typography.bodyShortBoldLarge,
color: BaseTheme.palette.text03 color: BaseTheme.palette.text03
@ -34,6 +47,33 @@ export const navigationStyles = {
color: TEXT_COLOR color: TEXT_COLOR
}, },
headerNavigationButtonIcon: {
...headerNavigationButton,
paddingTop: 18,
width: BaseTheme.spacing[7]
},
headerNavigationButtonText: {
...headerNavigationButton,
paddingTop: 10,
width: BaseTheme.spacing[10]
},
headerNavigationIcon: {
marginLeft: 12
},
headerNavigationText: {
...headerNavigationText,
marginLeft: BaseTheme.spacing[3]
},
headerNavigationTextBold: {
...headerNavigationText,
...BaseTheme.typography.labelButton,
marginRight: BaseTheme.spacing[3]
},
unreadCounterContainer: { unreadCounterContainer: {
alignItems: 'center', alignItems: 'center',
display: 'flex', display: 'flex',

View File

@ -1,5 +1,3 @@
// @flow
import React from 'react'; import React from 'react';
import type { Node } from 'react'; import type { Node } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -121,7 +119,7 @@ function ParticipantItem({
{ {
!isKnockingParticipant !isKnockingParticipant
&& <> && <>
{raisedHand && <RaisedHandIndicator />} { raisedHand && <RaisedHandIndicator /> }
<View style = { styles.participantStatesContainer }> <View style = { styles.participantStatesContainer }>
<View style = { styles.participantStateVideo }>{VideoStateIcons[videoMediaState]}</View> <View style = { styles.participantStateVideo }>{VideoStateIcons[videoMediaState]}</View>
<View>{AudioStateIcons[audioMediaState]}</View> <View>{AudioStateIcons[audioMediaState]}</View>

View File

@ -143,7 +143,7 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
return ( return (
<JitsiScreen <JitsiScreen
addBottomPadding = { false } addBottomPadding = { false }
safeAreaInsets = { [ 'left', 'right' ] } safeAreaInsets = { [ 'right' ] }
style = { contentWrapperStyles }> style = { contentWrapperStyles }>
<BrandingImageBackground /> <BrandingImageBackground />
{ {
@ -172,7 +172,6 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
<View style = { styles.formWrapper as StyleProp<ViewStyle> }> <View style = { styles.formWrapper as StyleProp<ViewStyle> }>
<Input <Input
// @ts-ignore // @ts-ignore
autoFocus = { true }
customStyles = {{ input: styles.customInput }} customStyles = {{ input: styles.customInput }}
onChange = { onChangeDisplayName } onChange = { onChangeDisplayName }
placeholder = { t('dialog.enterDisplayName') } placeholder = { t('dialog.enterDisplayName') }
@ -190,6 +189,7 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
disabled = { joinButtonDisabled } disabled = { joinButtonDisabled }
labelKey = 'prejoin.joinMeetingInLowBandwidthMode' labelKey = 'prejoin.joinMeetingInLowBandwidthMode'
onClick = { onJoinLowBandwidth } onClick = { onJoinLowBandwidth }
style = { styles.joinButton }
type = { TERTIARY } /> type = { TERTIARY } />
</View> </View>
</View> </View>

View File

@ -3,7 +3,8 @@ import BaseTheme from '../../base/ui/components/BaseTheme.native';
export default { export default {
joinButton: { joinButton: {
marginVertical: BaseTheme.spacing[3] marginTop: BaseTheme.spacing[3],
width: 352
}, },
buttonStylesBorderless: { buttonStylesBorderless: {
@ -38,33 +39,33 @@ export default {
height: '100%', height: '100%',
marginRight: 'auto', marginRight: 'auto',
position: 'absolute', position: 'absolute',
width: '60%' width: '50%'
}, },
contentContainer: { contentContainer: {
alignSelf: 'center', alignItems: 'center',
backgroundColor: BaseTheme.palette.uiBackground, backgroundColor: BaseTheme.palette.uiBackground,
bottom: 0, bottom: 0,
display: 'flex', display: 'flex',
height: 284, height: 316,
justifyContent: 'center', justifyContent: 'center',
position: 'absolute', position: 'absolute',
width: 390, width: '100%',
zIndex: 1 zIndex: 1
}, },
contentContainerWide: { contentContainerWide: {
alignSelf: 'center', alignItems: 'center',
height: '100%', height: '100%',
justifyContent: 'center', justifyContent: 'center',
left: '60%', left: '50%',
padding: BaseTheme.spacing[3], padding: BaseTheme.spacing[3],
position: 'absolute', position: 'absolute',
width: '40%' width: '50%'
}, },
toolboxContainer: { toolboxContainer: {
alignSelf: 'center', alignItems: 'center',
backgroundColor: BaseTheme.palette.ui01, backgroundColor: BaseTheme.palette.ui01,
borderRadius: BaseTheme.shape.borderRadius, borderRadius: BaseTheme.shape.borderRadius,
display: 'flex', display: 'flex',
@ -82,13 +83,13 @@ export default {
}, },
formWrapper: { formWrapper: {
alignSelf: 'stretch', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center'
marginHorizontal: BaseTheme.spacing[3]
}, },
customInput: { customInput: {
textAlign: 'center' textAlign: 'center',
width: 352
}, },
preJoinRoomName: { preJoinRoomName: {