Skip to content

chore: update workspaces top bar to display org name #14596

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 17 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: expand tooltip styling for owner
  • Loading branch information
Parkreiner committed Sep 6, 2024
commit de554d6133c3453a17af421a0db2c49113313b75
55 changes: 34 additions & 21 deletions site/src/pages/WorkspacePage/WorkspaceTopbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,28 +145,41 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
}}
>
<TopbarData>
<Tooltip title={`Owner: ${workspace.owner_name}`}>
<span
css={{
display: "flex",
flexFlow: "row nowrap",
gap: "8px",
maxWidth: "160px",
textOverflow: "ellipsis",
overflowX: "hidden",
whiteSpace: "nowrap",
cursor: "default",
}}
<Popover mode="hover">
<PopoverTrigger>
<span
css={{
display: "flex",
flexFlow: "row nowrap",
gap: "8px",
maxWidth: "160px",
textOverflow: "ellipsis",
overflowX: "hidden",
whiteSpace: "nowrap",
cursor: "default",
}}
>
<UserAvatar
size="xs"
username={workspace.owner_name}
avatarURL={workspace.owner_avatar_url}
/>

{workspace.owner_name}
</span>
</PopoverTrigger>

<HelpTooltipContent
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
transformOrigin={{ vertical: "top", horizontal: "center" }}
>
<UserAvatar
size="xs"
username={workspace.owner_name}
avatarURL={workspace.owner_avatar_url}
<AvatarData
title={workspace.owner_name}
subtitle="Owner"
avatar={workspace.owner_avatar_url}
/>

{workspace.owner_name}
</span>
</Tooltip>
</HelpTooltipContent>
</Popover>

{showOrganizations && (
<>
Expand Down Expand Up @@ -272,7 +285,7 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
to={`${templateLink}/versions/${workspace.latest_build.template_version_name}`}
css={{ color: "inherit" }}
>
{workspace.latest_build.template_version_name}
Version: {workspace.latest_build.template_version_name}
</Link>
}
avatar={
Expand Down