From 32ab508e665cb44dd337ee0832e13ece2bc5aa23 Mon Sep 17 00:00:00 2001 From: ljankoschek Date: Tue, 27 Feb 2024 20:44:07 +0100 Subject: [PATCH 1/2] Add flexShrink: 1, to fix the error message wrapping issue --- fe1-web/src/features/social/components/TextInputChirp.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/fe1-web/src/features/social/components/TextInputChirp.tsx b/fe1-web/src/features/social/components/TextInputChirp.tsx index 9a2e8aad04..48c4387f5a 100644 --- a/fe1-web/src/features/social/components/TextInputChirp.tsx +++ b/fe1-web/src/features/social/components/TextInputChirp.tsx @@ -30,6 +30,7 @@ const styles = StyleSheet.create({ display: 'flex', flexDirection: 'column', flexGrow: 1, + flexShrink: 1, } as ViewStyle, textInput: { alignContent: 'flex-end', From e8e7e504d56a925eafbde8608315575bb30d3aad Mon Sep 17 00:00:00 2001 From: ljankoschek Date: Tue, 27 Feb 2024 20:45:38 +0100 Subject: [PATCH 2/2] Fix typo in empty chirp error message --- .../__tests__/__snapshots__/NewChirp.test.tsx.snap | 6 +++++- .../__tests__/__snapshots__/TextInputChirp.test.tsx.snap | 5 +++++ .../__tests__/__snapshots__/SocialHome.test.tsx.snap | 1 + fe1-web/src/resources/strings.ts | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fe1-web/src/features/social/components/__tests__/__snapshots__/NewChirp.test.tsx.snap b/fe1-web/src/features/social/components/__tests__/__snapshots__/NewChirp.test.tsx.snap index 205131405b..5ef3fe5074 100644 --- a/fe1-web/src/features/social/components/__tests__/__snapshots__/NewChirp.test.tsx.snap +++ b/fe1-web/src/features/social/components/__tests__/__snapshots__/NewChirp.test.tsx.snap @@ -40,6 +40,7 @@ exports[`NewChirp renders correctly 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -221,6 +222,7 @@ exports[`NewChirp shows the error message on empty trimmed message 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -278,7 +280,7 @@ exports[`NewChirp shows the error message on empty trimmed message 1`] = ` ] } > - You chirp will be cropped to an empty chirp. You cannot send an empty chirp. + Your chirp will be cropped to an empty chirp. You cannot send an empty chirp. @@ -778,6 +781,7 @@ exports[`NewChirp shows the modal on trimmed chirp and closes it 2`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > diff --git a/fe1-web/src/features/social/components/__tests__/__snapshots__/TextInputChirp.test.tsx.snap b/fe1-web/src/features/social/components/__tests__/__snapshots__/TextInputChirp.test.tsx.snap index 3c2ea1f943..8c1eb99870 100644 --- a/fe1-web/src/features/social/components/__tests__/__snapshots__/TextInputChirp.test.tsx.snap +++ b/fe1-web/src/features/social/components/__tests__/__snapshots__/TextInputChirp.test.tsx.snap @@ -33,6 +33,7 @@ exports[`TextInputChirp renders correctly when writing less than 300 chars 1`] = "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -212,6 +213,7 @@ exports[`TextInputChirp renders correctly when writing more than 300 chars 1`] = "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -391,6 +393,7 @@ exports[`TextInputChirp renders correctly with placeholder 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -550,6 +553,7 @@ exports[`TextInputChirp renders correctly with undefined public key 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > @@ -715,6 +719,7 @@ exports[`TextInputChirp renders correctly without placeholder 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > diff --git a/fe1-web/src/features/social/screens/__tests__/__snapshots__/SocialHome.test.tsx.snap b/fe1-web/src/features/social/screens/__tests__/__snapshots__/SocialHome.test.tsx.snap index 03a4ac4edb..926f6170ff 100644 --- a/fe1-web/src/features/social/screens/__tests__/__snapshots__/SocialHome.test.tsx.snap +++ b/fe1-web/src/features/social/screens/__tests__/__snapshots__/SocialHome.test.tsx.snap @@ -88,6 +88,7 @@ exports[`SocialHome renders correctly 1`] = ` "display": "flex", "flexDirection": "column", "flexGrow": 1, + "flexShrink": 1, } } > diff --git a/fe1-web/src/resources/strings.ts b/fe1-web/src/resources/strings.ts index e909844791..41bb232509 100644 --- a/fe1-web/src/resources/strings.ts +++ b/fe1-web/src/resources/strings.ts @@ -159,7 +159,7 @@ namespace STRINGS { export const social_media_create_chirp_no_pop_token = 'In order to post chirps, you first need to participate in a roll-call.'; export const social_media_empty_chirp = - 'You chirp will be cropped to an empty chirp. You cannot send an empty chirp.'; + 'Your chirp will be cropped to an empty chirp. You cannot send an empty chirp.'; export const social_media_user_list_unavailable = 'In order to see other roll call participants you yourself first need to participate in one.'; export const social_media_your_profile_unavailable =