Skip to content

fix: fix UI bugs for orgs #16302

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 4 commits into from
Jan 28, 2025
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
10 changes: 8 additions & 2 deletions site/src/modules/management/OrganizationSidebarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ const OrganizationsSettingsNavigation: FC<
return <Loader />;
}

// Sort organizations to put active organization first
const sortedOrganizations = [
activeOrganization,
...organizations.filter((org) => org.id !== activeOrganization.id),
];

const [isPopoverOpen, setIsPopoverOpen] = useState(false);
const navigate = useNavigate();

Expand Down Expand Up @@ -117,9 +123,9 @@ const OrganizationsSettingsNavigation: FC<
<Command loop>
<CommandList>
<CommandGroup className="pb-2">
{organizations.length > 1 && (
{sortedOrganizations.length > 1 && (
<div className="flex flex-col max-h-[260px] overflow-y-auto">
{organizations.map((organization) => (
{sortedOrganizations.map((organization) => (
<CommandItem
key={organization.id}
value={organization.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const CreateOrganizationPage: FC = () => {
const error = createOrganizationMutation.error;

return (
<main className="py-20 sm:py-7">
<main className="py-7">
<CreateOrganizationPageView
error={error}
isEntitled={feats.multiple_organizations}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const CreateOrganizationPageView: FC<

return (
<div className="flex flex-row font-medium">
<div className="absolute top-40 left-12">
<div className="absolute left-12">
<Link
to="/organizations"
className="flex flex-row items-center gap-2 no-underline text-content-secondary hover:text-content-primary"
Expand All @@ -73,7 +73,7 @@ export const CreateOrganizationPageView: FC<
Go Back
</Link>
</div>
<div className="flex flex-col gap-4 w-full min-w-72 mx-auto">
<div className="flex flex-col gap-4 w-full min-w-96 mx-auto">
<div className="flex flex-col items-center">
{Boolean(error) && !isApiValidationError(error) && (
<div css={{ marginBottom: 32 }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const OrganizationProvisionersPage: FC = () => {
<>
<Helmet>
<title>
{pageTitle("Members", organization.display_name || organization.name)}
{pageTitle(
"Provisioners",
organization.display_name || organization.name,
)}
</title>
</Helmet>
<OrganizationProvisionersPageView
Expand Down
Loading