-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ft/gut-feeling
- Loading branch information
Showing
120 changed files
with
4,370 additions
and
1,590 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
components/dashboard/src/components/WidePageWithSubmenu.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (c) 2023 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License.AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import classNames from "classnames"; | ||
import { Separator } from "./Separator"; | ||
import { cn } from "@podkit/lib/cn"; | ||
import { SubmenuItem, SubmenuItemProps } from "./PageWithSubMenu"; | ||
|
||
export interface PageWithSubMenuProps { | ||
/** | ||
* The name of the navigation menu, as read by screen readers. | ||
*/ | ||
navTitle?: string; | ||
subMenu: SubmenuItemProps[]; | ||
children: React.ReactNode; | ||
} | ||
|
||
export function WidePageWithSubMenu(p: PageWithSubMenuProps) { | ||
return ( | ||
<div className="w-full"> | ||
<div className={cn("app-container flex flex-col md:flex-row")}> | ||
{/* TODO: extract into SubMenu component and show scrolling indicators */} | ||
<nav aria-label={p.navTitle}> | ||
<ul | ||
className={classNames( | ||
// Handle flipping between row and column layout | ||
"flex flex-row md:flex-col items-center", | ||
"w-full md:w-52 overflow-auto md:overflow-visible", | ||
"pt-4 pb-4 md:pb-0", | ||
"space-x-2 md:space-x-0 md:space-y-2", | ||
"tracking-wide text-gray-500", | ||
)} | ||
> | ||
{p.subMenu.map((e) => { | ||
return <SubmenuItem title={e.title} link={e.link} key={e.title} icon={e.icon} />; | ||
})} | ||
</ul> | ||
</nav> | ||
<div className="md:ml-4 w-full pt-1 mb-40"> | ||
<Separator className="md:hidden" /> | ||
<div className="pt-4 md:pt-0">{p.children}</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
components/dashboard/src/components/podkit/breadcrumbs/BreadcrumbNav.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (c) 2023 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License.AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import { LinkButton } from "@podkit/buttons/LinkButton"; | ||
import { cn } from "@podkit/lib/cn"; | ||
import { ChevronLeft } from "lucide-react"; | ||
import type { FC } from "react"; | ||
import { MiddleDot } from "../../typography/MiddleDot"; | ||
import { Heading3 } from "@podkit/typography/Headings"; | ||
|
||
interface BreadcrumbPageNavProps { | ||
/** | ||
* The title of the current page. | ||
*/ | ||
pageTitle: string; | ||
/** | ||
* The description of the current page. | ||
*/ | ||
pageDescription?: string; | ||
/** | ||
* The link to the previous page. | ||
*/ | ||
backLink?: string; | ||
className?: string; | ||
} | ||
|
||
export const BreadcrumbNav: FC<BreadcrumbPageNavProps> = ({ pageTitle, pageDescription, backLink, className }) => { | ||
return ( | ||
<section className={cn("flex flex-row items-center justify-start gap-2 w-full py-4 app-container", className)}> | ||
{backLink && ( | ||
<LinkButton | ||
variant={"ghost"} | ||
className="py-1 px-0 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-200" | ||
href={backLink} | ||
> | ||
<ChevronLeft size={24} /> | ||
</LinkButton> | ||
)} | ||
<Heading3 asChild> | ||
<h1>{pageTitle}</h1> | ||
</Heading3> | ||
<MiddleDot /> | ||
<p className="text-gray-900 dark:text-gray-300 text-lg">{pageDescription}</p> | ||
</section> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.