Skip to content

Commit cbcf369

Browse files
Windslash123Arshia Aravinthan
andauthored
style: 🎨 UI adjustments (#536)
* style: 🎨 align badge with group card * chore: πŸ”§ remove calendar gradient * chore: πŸ”§ actually realign * chore: increase padding on mobile groups card * chore: πŸ”§ hide action required in the mobile all section * style: 🎨 divider should reach end to end for mobile notifs * chore: πŸ”§ add deselect all option to mobile notifs * fix: πŸ› badge alignment on notif button * style: 🎨 add extra gap btwn notif and create meeting button * style: 🎨 change join group to contained button * fix: πŸ› match drop shadow on contained to button color * style: change to 8px per valerie --------- Co-authored-by: Arshia Aravinthan <aravinta@uci.edu>
1 parent 93c192b commit cbcf369

6 files changed

Lines changed: 67 additions & 44 deletions

File tree

β€Žsrc/components/creation/calendar/calendar.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function Calendar({
102102
: `${monthName} ${currentYear}`;
103103

104104
return (
105-
<div className="rounded-lg bg-gradient-to-l from-[#00A96E0D] to-[#377CFB0D] py-6 md:border">
105+
<div className="rounded-lg py-6 md:border">
106106
<div className="flex flex-col items-center justify-between px-4 pb-3 md:items-center md:px-8">
107107
<Tabs
108108
value={meetingType}

β€Žsrc/components/groups/group-card.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function GroupCard({
7777
<Box
7878
sx={(theme) => ({
7979
position: "absolute",
80-
top: -4,
80+
top: 0,
8181
right: 24,
8282
display: { xs: "none", sm: "flex" },
8383
alignItems: "center",
@@ -108,7 +108,7 @@ export function GroupCard({
108108
<Box
109109
sx={(theme) => ({
110110
position: "absolute",
111-
top: -4,
111+
top: 0,
112112
right: 24,
113113
display: { xs: "none", sm: "flex" },
114114
alignItems: "center",

β€Žsrc/components/groups/groups-page.tsxβ€Ž

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,18 @@ export function GroupsPage({ groups, notifications }: GroupsPageProps) {
102102
}}
103103
>
104104
<Typography variant="h3">Groups</Typography>
105-
<Box sx={{ ml: "auto", display: "flex", alignItems: "center", gap: 1 }}>
106-
<Button
107-
size="square"
108-
variant="outlined"
109-
onClick={() => setNotificationsOpen(true)}
110-
>
111-
<Badge badgeContent={unreadCount} color="primary">
105+
<Box
106+
sx={{ ml: "auto", display: "flex", alignItems: "center", gap: 1.5 }}
107+
>
108+
<Badge badgeContent={unreadCount} color="primary">
109+
<Button
110+
size="square"
111+
variant="outlined"
112+
onClick={() => setNotificationsOpen(true)}
113+
>
112114
<Notifications sx={{ color: "text.primary", fontSize: 24 }} />
113-
</Badge>
114-
</Button>
115+
</Button>
116+
</Badge>
115117
<Button
116118
size="square"
117119
variant="contained"
@@ -162,9 +164,9 @@ export function GroupsPage({ groups, notifications }: GroupsPageProps) {
162164
>
163165
<Button
164166
type="button"
165-
variant="outlined"
167+
variant="contained"
166168
color="secondary"
167-
startIcon={<People sx={{ color: "secondary.contrastText" }} />}
169+
startIcon={<People />}
168170
onClick={() => setShowJoinGroup(true)}
169171
>
170172
Join Group
@@ -269,7 +271,7 @@ export function GroupsPage({ groups, notifications }: GroupsPageProps) {
269271
sx={{
270272
display: "grid",
271273
gridTemplateColumns: { xs: "1fr", sm: "repeat(3, 1fr)" },
272-
gap: { xs: 0.5, sm: 4 },
274+
gap: { xs: 1, sm: 4 },
273275
}}
274276
>
275277
{filteredGroups
@@ -280,20 +282,29 @@ export function GroupsPage({ groups, notifications }: GroupsPageProps) {
280282
return priority(a) - priority(b);
281283
})
282284
.map((group) => (
283-
<GroupCard
285+
<Box
284286
key={group.id}
285-
id={group.id}
286-
name={group.name}
287-
description={group.description}
288-
members={group.members}
289-
totalMeetings={group.totalMeetings}
290-
totalMembers={group.memberCount}
291-
creatorName={group.creatorName}
292-
creatorAvatar={group.creatorAvatar}
293-
actionRequired={group.needsAvailability}
294-
upcomingMeetingName={group.upcomingMeetingName}
295-
icon={group.icon}
296-
/>
287+
sx={{
288+
display: {
289+
xs: group.needsAvailability ? "none" : "block",
290+
sm: "block",
291+
},
292+
}}
293+
>
294+
<GroupCard
295+
id={group.id}
296+
name={group.name}
297+
description={group.description}
298+
members={group.members}
299+
totalMeetings={group.totalMeetings}
300+
totalMembers={group.memberCount}
301+
creatorName={group.creatorName}
302+
creatorAvatar={group.creatorAvatar}
303+
actionRequired={group.needsAvailability}
304+
upcomingMeetingName={group.upcomingMeetingName}
305+
icon={group.icon}
306+
/>
307+
</Box>
297308
))}
298309
</Box>
299310
) : (

β€Žsrc/components/groups/mobile-notifications-drawer.tsxβ€Ž

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ export function MobileNotificationsDrawer({
117117
setSelectedIds(new Set(unread.map((n) => n.id)));
118118
}
119119

120+
function deselectAll() {
121+
setSelectedIds(new Set());
122+
}
123+
124+
const allSelected = unread.length > 0 && selectedIds.size === unread.length;
125+
120126
async function markSelectedAsRead() {
121127
const ids =
122128
selectedIds.size > 0 ? [...selectedIds] : unread.map((n) => n.id);
@@ -153,17 +159,17 @@ export function MobileNotificationsDrawer({
153159
</UnreadCount>
154160
</HeaderBox>
155161

156-
<Divider />
162+
<Divider sx={{ mx: -2 }} />
157163

158164
{unread.length > 0 && (
159165
<ActionBar>
160166
<Button
161167
size="small"
162168
color="info"
163-
onClick={selectAll}
169+
onClick={allSelected ? deselectAll : selectAll}
164170
sx={{ textTransform: "capitalize" }}
165171
>
166-
Select All
172+
{allSelected ? "Deselect All" : "Select All"}
167173
</Button>
168174
{selectedIds.size > 0 && (
169175
<Button

β€Žsrc/components/summary/meetings.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export const Meetings = ({
297297
}}
298298
>
299299
<Typography variant="h3">Meetings</Typography>
300-
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
300+
<Box sx={{ display: "flex", alignItems: "center", gap: 1.5 }}>
301301
<Badge badgeContent={unreadCount} color="primary">
302302
<Button
303303
variant="outlined"

β€Žsrc/theme.tsβ€Ž

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,24 @@ export const getTheme = (mode: "light" | "dark") =>
217217
root: {
218218
textTransform: "none",
219219
},
220-
contained: ({ theme }) => ({
221-
boxShadow: `0 4px 0 0 rgba(0,0,0,0.15), 0 4px 0 0 ${theme.palette.primary.main}`,
222-
"& .MuiSvgIcon-root": { color: "inherit" },
223-
"&:hover": {
224-
boxShadow: `0 2px 0 0 rgba(0,0,0,0.15), 0 2px 0 0 ${theme.palette.primary.main}`,
225-
transform: "translateY(2px)",
226-
},
227-
"&:active": {
228-
boxShadow: "none",
229-
transform: "translateY(4px)",
230-
},
231-
}),
220+
contained: ({ theme, ownerState }) => {
221+
const paletteColor =
222+
ownerState.color && ownerState.color !== "inherit"
223+
? theme.palette[ownerState.color]?.main
224+
: theme.palette.primary.main;
225+
return {
226+
boxShadow: `0 4px 0 0 rgba(0,0,0,0.15), 0 4px 0 0 ${paletteColor}`,
227+
"& .MuiSvgIcon-root": { color: "inherit" },
228+
"&:hover": {
229+
boxShadow: `0 2px 0 0 rgba(0,0,0,0.15), 0 2px 0 0 ${paletteColor}`,
230+
transform: "translateY(2px)",
231+
},
232+
"&:active": {
233+
boxShadow: "none",
234+
transform: "translateY(4px)",
235+
},
236+
};
237+
},
232238
containedPrimary: ({ theme }) => ({
233239
"&:hover": {
234240
backgroundColor: theme.palette.primary.main,

0 commit comments

Comments
Β (0)