I'm trying to create a comment section in React Native, but I have problems with text overflow and ellipsis.
The structure is simple and looks as follows: 
Ideally, when the username is long enough, it should be truncated, and the action name should be pressed all the way until it reaches the timestamp:

The closest I got using this code:
const styles = StyleSheet.create({ commentRow: { padding: 10 }, commentTopRow: { flexDirection: 'row', alignItems: 'center' }, commentTitle: { flex: 1 }, author: { fontWeight: '500' }, commentBody: { paddingTop: 5, paddingBottom: 5 } }); <View style={styles.commentRow}> <View style={styles.commentTopRow}> <Text style={styles.commentTitle} numberOfLines={1}> <Text style={styles.author}>User Name</Text> <Text style={styles.action}> commented</Text> </Text> <Text style={styles.timestamp}>8h</Text> </View> <Text style={styles.commentBody}>comment body</Text> </View>
which gives the following results:

Any help is appreciated in defining a unique structure and a set of styles that will handle both cases.
Thanks!
fmoga source share