-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add user groups column to users table #10284
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
Changes from all commits
cb51aa8
a33fe0c
cfd1807
d278c20
2fdbd65
0c9525e
2e2bf08
b8a73f5
52cb1bf
df9b25c
a29f395
fd8dafc
3b11414
083bb16
0061dc0
25767c6
c2aea9b
534cf82
f8d8de5
3ec6823
85d4de0
376d20c
b9d2b72
dc2fedd
1624981
81f252b
6cc07b4
f73ba71
c646d9f
c46b42a
3b36858
49570b0
d18641e
40846c6
c678223
c642ef8
774e4d5
d2cc9cc
33af1ce
ccb213f
88eaf4a
271b704
8cf2324
2e4ce81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,23 @@ import { FC } from "react"; | |
import { css, type Interpolation, type Theme } from "@emotion/react"; | ||
|
||
export type AvatarProps = MuiAvatarProps & { | ||
size?: "sm" | "md" | "xl"; | ||
size?: "xs" | "sm" | "md" | "xl"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice added! |
||
colorScheme?: "light" | "darken"; | ||
fitImage?: boolean; | ||
}; | ||
|
||
const sizeStyles = { | ||
xs: (theme) => ({ | ||
width: theme.spacing(2), | ||
height: theme.spacing(2), | ||
fontSize: theme.spacing(1), | ||
fontWeight: 700, | ||
}), | ||
sm: (theme) => ({ | ||
width: theme.spacing(3), | ||
height: theme.spacing(3), | ||
fontSize: theme.spacing(1.5), | ||
fontWeight: 600, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noticed that as the letters for the fallback avatars got smaller, they needed to be beefed up a little to still stand out against the background properly |
||
}), | ||
md: {}, | ||
xl: (theme) => ({ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use lodash so maybe it can be helpful to simplify some of these logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've never used Lodash before, so to be honest, I keep forgetting that we have it, but I'll see if some of their utilities can help out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried going through the documentation, but it didn't seem like Lodash has support for Map objects, and I didn't want to "downgrade" the type by turning it into a regular JS object (which would mean losing better memory usage, easy iteration, and easy size checking)
I did refactor the code to consolidate some loops, though