Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Big names overflow #2072

Merged
merged 12 commits into from
May 8, 2020
1 change: 1 addition & 0 deletions app/containers/message/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const User = React.memo(({
<TouchableOpacity
style={styles.titleContainer}
onPress={() => navToRoomInfo(navParam)}
style={styles.titleContainer}
disabled={author._id === user.id}
>
<Text style={[styles.username, { color: themes[theme].titleText }]} numberOfLines={1}>
Expand Down
3 changes: 2 additions & 1 deletion app/presentation/UserItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const styles = StyleSheet.create({
textContainer: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center'
justifyContent: 'center',
marginRight: 15
},
name: {
fontSize: 17,
Expand Down
4 changes: 2 additions & 2 deletions app/views/RoomActionsView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class RoomActionsView extends React.Component {
>
{t === 'd' && member._id ? <Status style={sharedStyles.status} id={member._id} /> : null }
</Avatar>
<View style={styles.roomTitleContainer}>
<View style={[styles.roomTitleContainer, item.disabled && styles.roomTitlePadding]}>
{room.t === 'd'
? <Text style={[styles.roomTitle, { color: themes[theme].titleText }]} numberOfLines={1}>{room.fname}</Text>
: (
Expand All @@ -497,7 +497,7 @@ class RoomActionsView extends React.Component {
numberOfLines={1}
theme={theme}
/>
{room.t === 'd' && <Markdown msg={member.statusText} style={[styles.roomDescription, { color: themes[theme].auxiliaryText }]} preview theme={theme} />}
{room.t === 'd' && <Markdown msg={member.statusText} style={[styles.roomDescription, { color: themes[theme].auxiliaryText }]} preview theme={theme} numberOfLines={1} />}
</View>
{!item.disabled && <DisclosureIndicator theme={theme} />}
</>
Expand Down
5 changes: 4 additions & 1 deletion app/views/RoomActionsView/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ export default StyleSheet.create({
roomTitleContainer: {
flex: 1
},
roomTitlePadding: {
paddingRight: 16
},
roomTitle: {
fontSize: 16,
paddingRight: 16,
...sharedStyles.textMedium
},
roomDescription: {
fontSize: 13,
...sharedStyles.textRegular
},
roomTitleRow: {
paddingRight: 16,
flexDirection: 'row',
alignItems: 'center'
}
Expand Down
8 changes: 6 additions & 2 deletions app/views/RoomInfoView/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,32 @@ export default StyleSheet.create({
justifyContent: 'center'
},
avatarContainer: {
height: 240,
minHeight: 240,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
marginBottom: 20
},
avatarContainerDirectRoom: {
height: 320
paddingVertical: 16,
minHeight: 320
},
avatar: {
marginHorizontal: 10
},
roomTitleContainer: {
paddingTop: 20,
marginHorizontal: 16,
alignItems: 'center'
},
roomTitle: {
fontSize: 20,
...sharedStyles.textAlignCenter,
...sharedStyles.textMedium
},
roomUsername: {
fontSize: 18,
...sharedStyles.textAlignCenter,
...sharedStyles.textRegular
},
roomTitleRow: {
Expand Down
1 change: 1 addition & 0 deletions app/views/RoomView/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const styles = StyleSheet.create({
alignItems: 'center'
},
subtitle: {
marginRight: -16,
...sharedStyles.textRegular,
fontSize: 12
},
Expand Down
5 changes: 3 additions & 2 deletions app/views/RoomsListView/Header/Header.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const styles = StyleSheet.create({
},
button: {
flexDirection: 'row',
alignItems: 'center'
alignItems: 'center',
marginRight: 64
},
server: {
fontSize: 20,
Expand Down Expand Up @@ -68,7 +69,7 @@ const Header = React.memo(({
{connecting ? <Text style={[styles.updating, titleColorStyle]}>{I18n.t('Connecting')}</Text> : null}
{isFetching ? <Text style={[styles.updating, titleColorStyle]}>{I18n.t('Updating')}</Text> : null}
<View style={styles.button}>
<Text style={[styles.server, isFetching && styles.serverSmall, titleColorStyle]}>{serverName}</Text>
<Text style={[styles.server, isFetching && styles.serverSmall, titleColorStyle]} numberOfLines={1}>{serverName}</Text>
<Image
style={[
styles.disclosure,
Expand Down
2 changes: 1 addition & 1 deletion app/views/RoomsListView/Header/Header.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Header = React.memo(({
>
<HeaderTitle connecting={connecting} isFetching={isFetching} theme={theme} />
<View style={styles.button}>
<Text style={[styles.server, { color: themes[theme].headerTintColor }]}>{serverName}</Text>
<Text style={[styles.server, { color: themes[theme].headerTintColor }]} numberOfLines={1}>{serverName}</Text>
<Image style={[styles.disclosure, showServerDropdown && styles.upsideDown]} source={{ uri: 'disclosure_indicator_server' }} />
</View>
</TouchableOpacity>
Expand Down
4 changes: 2 additions & 2 deletions app/views/RoomsListView/ServerDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ class ServerDropdown extends Component {
)
}
<View style={styles.serverTextContainer}>
<Text style={[styles.serverName, { color: themes[theme].titleText }]}>{item.name || item.id}</Text>
<Text style={[styles.serverUrl, { color: themes[theme].auxiliaryText }]}>{item.id}</Text>
<Text style={[styles.serverName, { color: themes[theme].titleText }]} numberOfLines={1}>{item.name || item.id}</Text>
<Text style={[styles.serverUrl, { color: themes[theme].auxiliaryText }]} numberOfLines={1}>{item.id}</Text>
</View>
{item.id === server ? <Check theme={theme} /> : null}
</View>
Expand Down
2 changes: 1 addition & 1 deletion app/views/SidebarView/SidebarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Item = React.memo(({
{left}
</View>
<View style={styles.itemCenter}>
<Text style={[styles.itemText, { color: themes[theme].titleText }]}>
<Text style={[styles.itemText, { color: themes[theme].titleText }]} numberOfLines={1}>
{text}
</Text>
</View>
Expand Down