Skip to content

Commit 72011d4

Browse files
Merge pull request #168 from GAchuzia/fix/ui-feature-fixes
Fix/UI feature fixes
2 parents 35ea3d0 + b116814 commit 72011d4

13 files changed

Lines changed: 110 additions & 62 deletions

File tree

frontend/cu-bytes/app/_styles/screenChrome.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const viewChrome = StyleSheet.create({
2626
justifyContent: 'space-between',
2727
paddingBottom: 8,
2828
paddingHorizontal: padH,
29-
paddingTop: 0,
29+
paddingTop: 8,
3030
} as ViewStyle,
3131

3232
headerButton: {
@@ -306,6 +306,23 @@ const textChrome = StyleSheet.create({
306306
paddingVertical: 10,
307307
textAlign: 'center',
308308
} as TextStyle,
309+
310+
infoBanner: {
311+
alignSelf: 'stretch',
312+
backgroundColor: colors.surfaceMuted,
313+
borderColor: colors.border,
314+
borderRadius: radii.sm,
315+
borderWidth: StyleSheet.hairlineWidth,
316+
color: colors.textSecondary,
317+
fontFamily: fontSans,
318+
fontSize: font(93),
319+
fontWeight: '600',
320+
marginBottom: 12,
321+
overflow: 'hidden',
322+
paddingHorizontal: 12,
323+
paddingVertical: 10,
324+
textAlign: 'center',
325+
} as TextStyle,
309326
});
310327

311328
/** Single export for existing `sc.*` call sites. */

frontend/cu-bytes/app/_styles/theme.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ import { Platform, StyleSheet } from 'react-native';
44
export const colors = {
55
bg: '#FFFFFF',
66
surface: '#FFFFFF',
7-
surfaceMuted: '#F5F6F8',
8-
border: '#E1E4EA',
9-
borderStrong: '#C5CAD3',
7+
surfaceMuted: '#FCF6F6',
8+
border: '#EBD9DA',
9+
borderStrong: '#D8AEB0',
1010
text: '#1A1D21',
1111
textSecondary: '#5C6370',
1212
textMuted: '#8E95A1',
1313
primary: '#C5151A',
1414
primaryPressed: '#9E1116',
15-
primaryMuted: '#F0D6D7',
15+
primaryMuted: '#F7E5E6',
1616
/** Filled CTA buttons (outline buttons use border + this for label) */
17-
buttonFill: '#111111',
18-
buttonFillPressed: '#333333',
19-
buttonOutlineLabel: '#111111',
17+
buttonFill: '#C5151A',
18+
buttonFillPressed: '#9E1116',
19+
buttonOutlineLabel: '#C5151A',
2020
success: '#2D6A4F',
2121
successBg: '#D8F3DC',
2222
danger: '#C1121F',
23-
headerBar: '#FFFFFF',
24-
headerBtn: '#EDEFF3',
25-
headerBtnPressed: '#DDE0E7',
23+
headerBar: '#FFF7F7',
24+
headerBtn: '#F6E9EA',
25+
headerBtnPressed: '#EDD3D5',
2626
bodyBtnDisabled: '#B8BCC4',
2727
overlayScrim: 'rgba(0,0,0,0.4)',
2828
scanAction: '#1B6B5C',

frontend/cu-bytes/app/dining.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ export default function DiningScreen() {
636636
activeOpacity={0.9}>
637637

638638
<Text id="loginLogoutButtonText" style={sc.headerButtonText} numberOfLines={1}>
639-
{usernameGlobal != '' ? 'Log out' : 'Log in'}
639+
{usernameGlobal != '' ? 'Log Out' : 'Log In'}
640640
</Text>
641641
</TouchableOpacity>
642642
</View>
@@ -647,7 +647,7 @@ export default function DiningScreen() {
647647
keyboardShouldPersistTaps="handled">
648648

649649
<Text id="browseDiningLocationsTitle" style={sc.pageTitle}>
650-
Dining locations
650+
Dining Locations
651651
</Text>
652652
<Text id="browseDiningLocationsInfoText" style={sc.pageSubtitle}>
653653
Find a spot, browse its menu, then review item details.
@@ -756,7 +756,7 @@ export default function DiningScreen() {
756756
activeOpacity={0.92}>
757757

758758
<Text id="saveFoodItemButtonText" style={sc.bodyButtonText}>
759-
Save food item
759+
Save Food Item
760760
</Text>
761761
</TouchableOpacity>
762762
)}
@@ -770,7 +770,7 @@ export default function DiningScreen() {
770770
<View id="savedFoodItemOuterView" style={styles.savedFoodItemMessageContainer}>
771771
<View id="savedFoodItemInnerView" style={styles.savedFoodItemInner}>
772772
<Text id="savedFoodItemText" style={styles.savedFoodItemText}>
773-
Food item saved
773+
Food Item Saved
774774
</Text>
775775
</View>
776776
</View>

frontend/cu-bytes/app/enter.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ export default function EnterScreen() {
575575
activeOpacity={0.9}>
576576

577577
<Text id="loginLogoutButtonText" style={sc.headerButtonText} numberOfLines={1}>
578-
{usernameGlobal != '' ? 'Log out' : 'Log in'}
578+
{usernameGlobal != '' ? 'Log Out' : 'Log In'}
579579
</Text>
580580
</TouchableOpacity>
581581
</View>
@@ -586,7 +586,7 @@ export default function EnterScreen() {
586586
keyboardShouldPersistTaps="handled">
587587

588588
<Text id="browseFoodItemsTitle" style={sc.pageTitle}>
589-
Browse food
589+
Browse Food
590590
</Text>
591591
<Text id="browseFoodItemsInfoText" style={sc.pageSubtitle}>
592592
Search by name, then tap a result for nutrition details.
@@ -678,7 +678,7 @@ export default function EnterScreen() {
678678
activeOpacity={0.92}>
679679

680680
<Text id="saveFoodItemButtonText" style={sc.bodyButtonText}>
681-
Save food item
681+
Save Food Item
682682
</Text>
683683
</TouchableOpacity>
684684
)}
@@ -692,7 +692,7 @@ export default function EnterScreen() {
692692
<View id="savedFoodItemOuterView" style={styles.savedFoodItemMessageContainer}>
693693
<View id="savedFoodItemInnerView" style={styles.savedFoodItemInner}>
694694
<Text id="savedFoodItemText" style={styles.savedFoodItemText}>
695-
Food item saved
695+
Food Item Saved
696696
</Text>
697697
</View>
698698
</View>

frontend/cu-bytes/app/entries.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export default function EntriesScreen() {
250250
activeOpacity={0.9}>
251251

252252
<Text id="loginLogoutButtonText" style={sc.headerButtonText} numberOfLines={1}>
253-
{usernameGlobal != '' ? 'Log out' : 'Log in'}
253+
{usernameGlobal != '' ? 'Log Out' : 'Log In'}
254254
</Text>
255255
</TouchableOpacity>
256256
</View>

frontend/cu-bytes/app/home.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default function HomeScreen() {
142142
style={sc.headerButtonText}
143143
numberOfLines={1}
144144
>
145-
{usernameGlobal !== '' ? 'Log out' : 'Log in'}
145+
{usernameGlobal !== '' ? 'Log Out' : 'Log In'}
146146
</Text>
147147
</TouchableOpacity>
148148
</View>
@@ -205,24 +205,24 @@ export default function HomeScreen() {
205205
activeOpacity={0.92}
206206
>
207207
<Text id="scanFoodItemButtonText" style={sc.bodyButtonText}>
208-
Scan food
208+
Scan Food
209209
</Text>
210210
</TouchableOpacity>
211211

212212
<TouchableOpacity
213213
id="browseButton"
214214
style={[
215-
sc.bodyButtonOutline,
215+
sc.bodyButton,
216216
guest && sc.bodyButtonDisabled,
217-
!guest && isBrowsePressed && { opacity: 0.85 },
217+
!guest && isBrowsePressed && sc.bodyButtonPressed,
218218
]}
219219
onPressIn={() => setIsBrowsePressed(true)}
220220
onPressOut={() => setIsBrowsePressed(false)}
221221
onPress={() => setBrowseButtons(true)}
222222
disabled={guest}
223223
activeOpacity={0.92}
224224
>
225-
<Text id="browseButtonText" style={sc.bodyButtonOutlineText}>
225+
<Text id="browseButtonText" style={sc.bodyButtonText}>
226226
Browse
227227
</Text>
228228
</TouchableOpacity>
@@ -289,7 +289,7 @@ export default function HomeScreen() {
289289
id="recommendationsButtonText"
290290
style={sc.bodyButtonText}
291291
>
292-
Food & Dining Recommendations
292+
Recommendations
293293
</Text>
294294
</TouchableOpacity>
295295
</View>
@@ -316,7 +316,7 @@ export default function HomeScreen() {
316316
id="browseFoodItemsButtonText"
317317
style={sc.bodyButtonText}
318318
>
319-
Browse food
319+
Browse Food
320320
</Text>
321321
</TouchableOpacity>
322322

@@ -339,7 +339,7 @@ export default function HomeScreen() {
339339
id="browseDiningLocationsButtonText"
340340
style={sc.bodyButtonText}
341341
>
342-
Dining locations
342+
Dining Locations
343343
</Text>
344344
</TouchableOpacity>
345345

frontend/cu-bytes/app/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ export default function IndexScreen() {
7777
<TouchableOpacity
7878
id="browseButton"
7979
style={[
80-
sc.bodyButtonOutline,
81-
isBrowsePressed && { opacity: 0.88 },
80+
sc.bodyButton,
81+
isBrowsePressed && sc.bodyButtonPressed,
8282
]}
8383
onPressIn={() => setIsBrowsePressed(true)}
8484
onPressOut={() => setIsBrowsePressed(false)}
8585
onPress={() => setBrowseButtons(true)}
8686
activeOpacity={0.92}
8787
>
88-
<Text id="browseButtonText" style={sc.bodyButtonOutlineText}>
89-
Browse Menu &amp; Locations
88+
<Text id="browseButtonText" style={sc.bodyButtonText}>
89+
Browse
9090
</Text>
9191
</TouchableOpacity>
9292
</View>
@@ -106,7 +106,7 @@ export default function IndexScreen() {
106106
activeOpacity={0.92}
107107
>
108108
<Text id="browseFoodButtonText" style={sc.bodyButtonText}>
109-
Browse food
109+
Browse Food
110110
</Text>
111111
</TouchableOpacity>
112112

@@ -122,7 +122,7 @@ export default function IndexScreen() {
122122
activeOpacity={0.92}
123123
>
124124
<Text id="browseDiningButtonText" style={sc.bodyButtonText}>
125-
Dining locations
125+
Dining Locations
126126
</Text>
127127
</TouchableOpacity>
128128

frontend/cu-bytes/app/login.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export default function LoginScreen() {
187187
style={sc.headerButtonText}
188188
numberOfLines={1}
189189
>
190-
{usernameGlobal !== '' ? 'Log out' : 'Log in'}
190+
{usernameGlobal !== '' ? 'Log Out' : 'Log In'}
191191
</Text>
192192
</TouchableOpacity>
193193
</View>
@@ -207,8 +207,13 @@ export default function LoginScreen() {
207207
</Text>
208208

209209
<View style={sc.formCard}>
210-
<Text id="loginErrorMessage" style={sc.errorBanner}>
211-
{visible ? error.message : 'Enter your username and password'}
210+
<Text
211+
id="loginErrorMessage"
212+
style={visible && error.status === 'error' ? sc.errorBanner : sc.infoBanner}
213+
>
214+
{visible && error.status === 'error'
215+
? error.message
216+
: 'Enter your username and password'}
212217
</Text>
213218

214219
<TextInput

frontend/cu-bytes/app/recommendations.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export default function RecommendationsScreen() {
484484
activeOpacity={0.9}>
485485

486486
<Text id="loginLogoutButtonText" style={sc.headerButtonText} numberOfLines={1}>
487-
{usernameGlobal != '' ? 'Log out' : 'Log in'}
487+
{usernameGlobal != '' ? 'Log Out' : 'Log In'}
488488
</Text>
489489
</TouchableOpacity>
490490
</View>
@@ -580,7 +580,7 @@ export default function RecommendationsScreen() {
580580
activeOpacity={0.92}>
581581

582582
<Text id="nutrientRecsButtonText" style={sc.bodyButtonText}>
583-
Fill Nutrient Gaps
583+
Deficient Nutrient
584584
</Text>
585585
</TouchableOpacity>
586586
)}
@@ -710,7 +710,7 @@ export default function RecommendationsScreen() {
710710
activeOpacity={0.92}>
711711

712712
<Text id="viewOtherRecsButtonText" style={sc.bodyButtonOutlineText}>
713-
Choose another type
713+
Choose Another Type
714714
</Text>
715715
</TouchableOpacity>
716716

@@ -908,7 +908,7 @@ export default function RecommendationsScreen() {
908908
activeOpacity={0.92}>
909909

910910
<Text id="viewOtherRecsAgainButtonText" style={sc.bodyButtonOutlineText}>
911-
Choose another type
911+
Choose Another Type
912912
</Text>
913913
</TouchableOpacity>
914914
)}

frontend/cu-bytes/app/register.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default function RegisterScreen() {
162162
style={sc.headerButtonText}
163163
numberOfLines={1}
164164
>
165-
{usernameGlobal !== '' ? 'Log out' : 'Log in'}
165+
{usernameGlobal !== '' ? 'Log Out' : 'Log In'}
166166
</Text>
167167
</TouchableOpacity>
168168
</View>

0 commit comments

Comments
 (0)