Skip to content

Commit fc60f13

Browse files
committed
feat(webapp): move Manage branches to the top of the branches popover
In the dev and preview branch submenus, the Manage branches link now sits above the branch list with the divider below it, instead of below the list.
1 parent f990d56 commit fc60f13

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

apps/webapp/app/components/navigation/EnvironmentSelector.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,25 @@ export function BranchesPopoverContent({
337337
return (
338338
<>
339339
<div className="flex flex-col gap-1 p-1">
340+
{parentEnvironment.type === "DEVELOPMENT" ? (
341+
<PopoverMenuItem
342+
to={branchesDevPath(organization, project, environment)}
343+
title="Manage dev branches"
344+
icon={<Cog8ToothIcon className={cn(ENV_POPOVER_ITEM_ICON, "text-text-dimmed")} />}
345+
leadingIconClassName="text-text-dimmed"
346+
className={ENV_POPOVER_ITEM_LABEL}
347+
/>
348+
) : (
349+
<PopoverMenuItem
350+
to={branchesPath(organization, project, environment)}
351+
title="Manage preview branches"
352+
icon={<Cog8ToothIcon className={cn(ENV_POPOVER_ITEM_ICON, "text-text-dimmed")} />}
353+
leadingIconClassName="text-text-dimmed"
354+
className={ENV_POPOVER_ITEM_LABEL}
355+
/>
356+
)}
357+
</div>
358+
<div className="flex flex-col gap-1 border-t border-grid-bright p-1">
340359
{currentBranchIsArchived && (
341360
<PopoverMenuItem
342361
key={environment.id}
@@ -400,25 +419,6 @@ export function BranchesPopoverContent({
400419
</div>
401420
)}
402421
</div>
403-
<div className="border-t border-grid-bright p-1">
404-
{parentEnvironment.type === "DEVELOPMENT" ? (
405-
<PopoverMenuItem
406-
to={branchesDevPath(organization, project, environment)}
407-
title="Manage dev branches"
408-
icon={<Cog8ToothIcon className={cn(ENV_POPOVER_ITEM_ICON, "text-text-dimmed")} />}
409-
leadingIconClassName="text-text-dimmed"
410-
className={ENV_POPOVER_ITEM_LABEL}
411-
/>
412-
) : (
413-
<PopoverMenuItem
414-
to={branchesPath(organization, project, environment)}
415-
title="Manage preview branches"
416-
icon={<Cog8ToothIcon className={cn(ENV_POPOVER_ITEM_ICON, "text-text-dimmed")} />}
417-
leadingIconClassName="text-text-dimmed"
418-
className={ENV_POPOVER_ITEM_LABEL}
419-
/>
420-
)}
421-
</div>
422422
</>
423423
);
424424
}

0 commit comments

Comments
 (0)