Skip to content

feat: add list of user's groups to Accounts page #10522

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

Merged
merged 23 commits into from
Nov 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
00d819f
chore: add query for a user's groups
Parkreiner Nov 1, 2023
1d646eb
chore: integrate user groups into UI
Parkreiner Nov 1, 2023
024879d
refactor: split UI card into separate component
Parkreiner Nov 2, 2023
102b1e0
chore: enforce alt text for AvatarCard
Parkreiner Nov 2, 2023
e8c713c
chore: add proper alt text support for Avatar
Parkreiner Nov 2, 2023
22e9573
fix: update props for Avatar call sites
Parkreiner Nov 2, 2023
acf2500
finish AccountPage changes
Parkreiner Nov 2, 2023
f4b9a63
wip: commit progress on AvatarCard
Parkreiner Nov 2, 2023
426260d
fix: add better UI error handling
Parkreiner Nov 3, 2023
fecf41e
fix: update theme setup for AvatarCard
Parkreiner Nov 3, 2023
831d110
fix: update styling for AccountPage
Parkreiner Nov 3, 2023
69fab82
fix: make error message conditional
Parkreiner Nov 3, 2023
f7cffd1
chore: update styling for AvatarCard
Parkreiner Nov 3, 2023
2e43d5f
chore: finish AvatarCard
Parkreiner Nov 3, 2023
7c322fa
fix: add maxWidth support to AvatarCard
Parkreiner Nov 3, 2023
b92c5f7
chore: update how no max width is defined
Parkreiner Nov 3, 2023
d5b5323
chore: add AvatarCard stories
Parkreiner Nov 3, 2023
43ae56b
fix: remove incorrect semantics for AvatarCard
Parkreiner Nov 6, 2023
ba57fff
docs: add comment about flexbox behavior
Parkreiner Nov 6, 2023
387c033
docs: add clarifying text about prop
Parkreiner Nov 6, 2023
7dcddbf
fix: fix grammar for singular groups
Parkreiner Nov 6, 2023
68ae492
refactor: split off AccountUserGroups and add story
Parkreiner Nov 6, 2023
d56a9cc
fix: differentiate mock groups more
Parkreiner Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update styling for AvatarCard
  • Loading branch information
Parkreiner committed Nov 3, 2023
commit f7cffd10a62faa9594d0a3c9a03875ba50d4471c
30 changes: 21 additions & 9 deletions site/src/components/AvatarCard/AvatarCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { type ReactNode } from "react";
import { Avatar, AvatarIcon } from "components/Avatar/Avatar";
import { Avatar } from "components/Avatar/Avatar";
import { type CSSObject, useTheme } from "@emotion/react";

type AvatarCardProps = {
header: ReactNode;
header: string;
imgUrl: string;
altText: string;

Expand Down Expand Up @@ -32,8 +32,22 @@ export function AvatarCard({
cursor: "default",
}}
>
<div css={{ marginRight: "auto" }}>
<div css={theme.typography.body1 as CSSObject}>{header}</div>
<div css={{ marginRight: "auto", minWidth: 0 }}>
<h3
title={header}
css={[
theme.typography.body1 as CSSObject,
{
lineHeight: 1.5,
margin: 0,
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
},
]}
>
{header}
</h3>

{subtitle && (
<div
Expand All @@ -47,11 +61,9 @@ export function AvatarCard({
)}
</div>

<div>
<Avatar>
<AvatarIcon src={imgUrl} alt={altText} />
</Avatar>
</div>
<Avatar src={imgUrl} alt={altText} colorScheme="darken">
{header}
</Avatar>
</article>
);
}