Skip to content
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

[Fix] Update manager dashboard UI #11667

Merged
merged 13 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 25 additions & 17 deletions apps/web/src/pages/ManagerDashboardPage/ManagerDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ const ManagerDashboard = ({ userQuery }: ManagerDashboardProps) => {
setAccordionItems(newValue);
}}
type="multiple"
// we don't need that fat padding in the accordion inside the task card
data-h2-padding-bottom="base:selectors[>.Accordion__Item > .Accordion__Content](x.5)"
>
<Accordion.Item value="your_talent_searches">
<Accordion.Trigger>
Expand All @@ -144,11 +146,18 @@ const ManagerDashboard = ({ userQuery }: ManagerDashboardProps) => {
// match accordion padding
data-h2-padding="base(0 x1 x0.75 x1.3)"
data-h2-display="base(flex)"
data-h2-gap="base(x0.5)"
data-h2-flex-direction="base(column) p-tablet(row)"
data-h2-flex-wrap="base(nowrap) p-tablet(wrap)"
data-h2-align-items="base(flex-start) p-tablet(center)"
data-h2-gap="base(x0.5 0)"
data-h2-content='p-tablet:children[:not(:last-child)::after]("β€’")'
data-h2-color="p-tablet:children[::after](black.lighter)"
data-h2-margin="p-tablet:children[:not(:last-child)::after](0 x.5)"
data-h2-font-size="base(caption)"
>
{showUnfinishedPieces ? (
// This link is missing an href since the page doesn't exist yet. Probably #10982
<>
// This link is missing an href since the page doesn't exist yet. Probably #10982
<div>
<Link color="primary" href="#">
{intl.formatMessage({
defaultMessage: "All requests",
Expand All @@ -157,25 +166,24 @@ const ManagerDashboard = ({ userQuery }: ManagerDashboardProps) => {
"Link to a page to view all the requests",
})}
</Link>
&bull;
</>
) : (
<></>
)}
<Link color="primary" href={paths.search()}>
{intl.formatMessage({
defaultMessage: "New request",
id: "BGQaDq",
description:
"Link to a page to start a new request",
})}
</Link>
</div>
) : null}
<div>
<Link color="primary" href={paths.search()}>
{intl.formatMessage({
defaultMessage: "New request",
id: "BGQaDq",
description:
"Link to a page to start a new request",
})}
</Link>
</div>
</div>
<Accordion.Content>
<div
data-h2-display="base(flex)"
data-h2-flex-direction="base(column)"
data-h2-gap="base(x0.5)"
data-h2-gap="base(x1)"
>
<div>
{intl.formatMessage(
Expand Down
7 changes: 4 additions & 3 deletions packages/ui/src/components/PreviewList/PreviewList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface MetaDataProps {
const MetaData = ({ children, type, color }: MetaDataProps) => {
switch (type) {
case "text":
return <span data-h2-color="base(gray.darker)">{children}</span>;
return <span data-h2-color="base(black.light)">{children}</span>;
case "chip":
return (
<span>
Expand All @@ -40,6 +40,7 @@ const actionProps = {
"data-h2-content": "base:selectors[::after](' ')",
"data-h2-inset": "base:selectors[::after](0)",
"data-h2-justify-self": "base(end)",
"data-h2-margin-right": "base(x1) p-tablet(x1.5)",
} satisfies ButtonLinkProps;

interface ButtonProps {
Expand Down Expand Up @@ -83,7 +84,7 @@ const Item = ({
data-h2-align-items="base(flex-start) p-tablet(center)"
data-h2-gap="base(x.5)"
data-h2-border-bottom="base:all:selectors[:not(:last-child)](1px solid)"
data-h2-border-bottom-color="base:all:selectors[:not(:last-child)](gray.lighter)"
data-h2-border-bottom-color="base:all:selectors[:not(:last-child)](gray.light)"
data-h2-transition="base:children[.PreviewList__Heading](transform 200ms ease)"
data-h2-color="base:selectors[:has(:is(button, a):hover) .PreviewList__Heading](secondary.darker) base:all:selectors[:has(:is(button, a):focus-visible) .PreviewList__Heading](black)"
data-h2-background-color="base:selectors[:has(:is(button, a):focus-visible) .PreviewList__Heading](focus)"
Expand Down Expand Up @@ -112,7 +113,7 @@ const Item = ({
data-h2-align-items="base(flex-start) p-tablet(center)"
data-h2-gap="base(x.5 0)"
data-h2-content='p-tablet:children[:not(:last-child)::after]("β€’")'
data-h2-color="p-tablet:children[::after](gray.darker)"
data-h2-color="p-tablet:children[::after](black.lighter)"
data-h2-margin="p-tablet:children[:not(:last-child)::after](0 x.5)"
data-h2-font-size="base(caption)"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ResourceBlock/BaseItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const BaseItem = ({
data-h2-display="base(flex)"
data-h2-flex-direction="base(column)"
data-h2-gap="base(x0.15)"
data-h2-border-bottom="base:all:selectors[:not(:last-child)](1px solid gray.lighter)"
data-h2-border-bottom="base:all:selectors[:not(:last-child)](1px solid gray.light)"
data-h2-border-radius="base:all:selectors[:last-child](0 0 rounded rounded)"
// make the containing block for state icon
data-h2-position="base(relative)"
Expand Down
7 changes: 6 additions & 1 deletion packages/ui/src/components/ResourceBlock/LinkMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@ const LinkMenuItem = ({
utilityIcon={ChevronDownIcon}
mode="inline"
color="black"
data-h2-height="base(x0.85)"
data-h2-transform="base:children[svg](rotate(0deg)) base:selectors[[data-state='open']]:children[svg](rotate(180deg))"
>
{selectedLink?.title}
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content align="end" collisionPadding={2}>
{links.map((link) => (
<DropdownMenu.Item key={link.title + link.href} asChild color="black">
<DropdownMenu.Item
key={link.title + link.href}
asChild
color={link.isSelected ? "secondary" : "black"}
>
<Link href={link.href}>{link.title}</Link>
</DropdownMenu.Item>
))}
Expand Down
Loading