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

Several coaching session page UI cleanup changes #40

Merged
merged 1 commit into from
Oct 10, 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
11 changes: 7 additions & 4 deletions src/app/coaching-sessions/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ export default function CoachingSessionsPage() {
></CoachingSessionTitle>
<div className="ml-auto flex w-full space-x-2 sm:justify-end">
<PresetSelector current={current} future={future} past={past} />
<PresetActions />
{/* Hidden for MVP */}
<div className="hidden">
<PresetActions />
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -195,9 +198,9 @@ export default function CoachingSessionsPage() {
className="w-[260px] text-sm"
side="left"
>
Notes refreshing is currently a manual process. To view
changes made by someone else in this session, before making
any new Notes changes yourself, click this button.
To view changes to the Notes made by someone else during this
session, before making any new changes yourself, click this
button.
</HoverCardContent>
</HoverCard>
</div>
Expand Down
20 changes: 12 additions & 8 deletions src/components/ui/main-nav-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { current, future, past } from "../../data/presets";

import { ChevronDownIcon } from "@radix-ui/react-icons";

import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import {
Card,
CardContent,
Expand All @@ -50,6 +49,7 @@ import {
PopoverTrigger,
} from "@/components/ui/popover";
import { useAppStateStore } from "@/lib/providers/app-state-store-provider";
import { siteConfig } from "@/site.config";

export function MainNavMenu() {
const [open, setIsOpen] = React.useState(false);
Expand All @@ -62,8 +62,9 @@ export function MainNavMenu() {
<NavigationMenuItem>
<NavigationMenuTrigger>
<span className="hidden font-bold sm:inline-block">
{/* FIXME: Replace "Refactor" with something from siteConfig or something else */}
{organization.name.length > 0 ? organization.name : "Refactor"}
{organization.name.length > 0
? organization.name
: siteConfig.name}
</span>
</NavigationMenuTrigger>
<NavigationMenuContent>
Expand All @@ -72,20 +73,23 @@ export function MainNavMenu() {
<NavigationMenuLink asChild>
<a
className="flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md"
href="/"
href="/dashboard"
>
<Icons.logo className="h-6 w-6" />
<Icons.refactor_logo className="h-4 w-4" />
<div className="mb-2 mt-4 text-lg font-medium">
Refactor Coaching
{organization.name.length > 0
? organization.name
: siteConfig.name}
</div>
<p className="text-sm leading-tight text-muted-foreground">
Professional software engineer coaching.
{siteConfig.description}
</p>
</a>
</NavigationMenuLink>
</li>

<Card>
{/* Hidden for MVP */}
<Card className="hidden">
<CardHeader>
<CardTitle>Organization & Relationship</CardTitle>
<CardDescription>
Expand Down
163 changes: 0 additions & 163 deletions src/components/ui/model-selector.tsx

This file was deleted.

28 changes: 14 additions & 14 deletions src/components/ui/site-header.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import { CommandMenu } from "@/components/ui/command-menu"
import { MainNav } from "@/components/ui/main-nav"
import { MobileNav } from "@/components/ui/mobile-nav"
import { ModeToggle } from "@/components/ui/mode-toggle"
import { UserNav } from "@/components/ui/user-nav"
import { CommandMenu } from "@/components/ui/command-menu";
import { MainNav } from "@/components/ui/main-nav";
import { MobileNav } from "@/components/ui/mobile-nav";
import { ModeToggle } from "@/components/ui/mode-toggle";
import { UserNav } from "@/components/ui/user-nav";

// import { useRouter } from 'next/navigation'
// import { useAuthStore } from "@/lib/providers/auth-store-provider";
Expand All @@ -19,7 +19,7 @@ export function SiteHeader() {

return (
<header className="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div className="container flex h-14 max-w-screen-2xl items-center">
<div className="flex h-14 pl-4 max-w-screen-2xl items-start">
<MainNav />
<MobileNav />
<div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
Expand All @@ -29,20 +29,20 @@ export function SiteHeader() {
<nav className="flex items-center">
<ModeToggle />
{/* {isLoggedIn ? ( */}
<UserNav />
<UserNav />
{/* ) : ( */}
{/* <> */}
{/* {console.warn("User is not logged in, redirecting to login route.")} */}
{/* TODO: For some reason, this is causing a redirect boundary error / trying to update
{/* <> */}
{/* {console.warn("User is not logged in, redirecting to login route.")} */}
{/* TODO: For some reason, this is causing a redirect boundary error / trying to update
2 components (Router) + (SiteHeader) at the same time. I think it has to do with the
AuthStoreProvider and the two different layouts.
Help: https://reactjs.org/link/setstate-in-render */}
{/* router.push("/login") */}
{/* </> */}
{/* router.push("/login") */}
{/* </> */}
{/* )} */}
</nav>
</div>
</div>
</header>
)
}
);
}
57 changes: 0 additions & 57 deletions src/components/ui/temperature-selector.tsx

This file was deleted.

Loading