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

feat: Course Calendar #17

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7b65daa
Start calendar
tonydrayton Nov 23, 2024
dbe67c9
more work and empty chat placeholder
tonydrayton Dec 10, 2024
25e1009
Use different approach and make different layers on a calendar
tonydrayton Dec 11, 2024
d573022
More calendar work and beginning mobile view
tonydrayton Dec 11, 2024
428eff5
more ux work on the calendar
tonydrayton Dec 11, 2024
aca4f1e
better darkmode viewing
tonydrayton Dec 11, 2024
641f9a3
fix sheet animation and other changes
tonydrayton Dec 11, 2024
064162d
more calendar work
tonydrayton Dec 26, 2024
4c38282
add icons
tonydrayton Dec 26, 2024
c891a8f
week view calendar work
tonydrayton Dec 26, 2024
33432bf
more logic fixing for calendar views
tonydrayton Dec 26, 2024
57bbd63
style and logic changes with grids
tonydrayton Dec 26, 2024
9e86b26
begin scheduler page
tonydrayton Dec 26, 2024
3dacff4
more scheduler page and component logic
tonydrayton Dec 26, 2024
be24f25
slight style and color fixes
tonydrayton Dec 26, 2024
0aa318a
subtle changes and fixes
tonydrayton Dec 26, 2024
488d742
fix icons
tonydrayton Jan 13, 2025
6c16165
begin day view for mobile
tonydrayton Jan 13, 2025
7e3e267
day view & swipe transitioning
tonydrayton Jan 19, 2025
15483ea
more work, start schedule view
tonydrayton Jan 29, 2025
bf0402b
fix goTo logic (calendar dates)
tonydrayton Jan 29, 2025
be7fb7d
fix up schedule view - better positioning logic, event handling (over…
tonydrayton Jan 29, 2025
83f2fe0
editing events functionality, other changes w events
tonydrayton Jan 29, 2025
32ebdc1
fix dialog not closing on schedule view with event embeds
tonydrayton Jan 30, 2025
5cf204b
fix some styling stuff and the input hour converting
tonydrayton Jan 30, 2025
48b0637
darkmode styling
tonydrayton Jan 30, 2025
1b40e7c
some style fixing for event modal
tonydrayton Jan 30, 2025
1183641
fix some logic with alignment and margins with event grid
tonydrayton Jan 30, 2025
da760ee
small fixes and currentView saving
tonydrayton Jan 31, 2025
bb6c611
add global types and start month view
tonydrayton Jan 31, 2025
2c4607d
add month view
tonydrayton Jan 31, 2025
b4809d7
small fixes and file structure changes
tonydrayton Jan 31, 2025
00c5e28
more fixes eslint
tonydrayton Jan 31, 2025
3580c51
start logic for recurring events
tonydrayton Feb 2, 2025
05c662c
small fixes and changes
tonydrayton Feb 2, 2025
b464016
implement recurring events and use zustand for events now
tonydrayton Feb 2, 2025
bf35f7f
fix display events error by only checking events in view
tonydrayton Feb 2, 2025
72bb16f
fix errors in recurring events and event modals
tonydrayton Feb 2, 2025
6589117
events were not saving start and end time,,
tonydrayton Feb 2, 2025
63cb6d9
style fixes and changes
tonydrayton Feb 2, 2025
8ccbc70
style changes
tonydrayton Feb 2, 2025
0ca5dc3
fix the select inside the modal
tonydrayton Feb 2, 2025
e436a08
set default recurrence to 1
tonydrayton Feb 2, 2025
4cb6ffe
change some file structure with the calendar
tonydrayton Feb 2, 2025
64a2ad0
fix eslint stuff
tonydrayton Feb 2, 2025
b57afca
fix events rendering incorrectly if their duration wasnt a multiple o…
tonydrayton Feb 3, 2025
c387fe4
infinite loading functionality with events on scheduleview
tonydrayton Feb 3, 2025
323fda9
add support for infinite recurring events, and fix the eventmodal req…
tonydrayton Feb 3, 2025
72e740e
small changes and fixes
tonydrayton Feb 5, 2025
9c456a1
add event descriptions
tonydrayton Feb 21, 2025
db637b9
add repeat icon for recurring events
tonydrayton Feb 21, 2025
44d0c65
style changes
tonydrayton Feb 22, 2025
7f0b422
file name changes and cleanup
tonydrayton Feb 22, 2025
e853079
lint
tonydrayton Feb 22, 2025
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
4,818 changes: 3,450 additions & 1,368 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
"@hookform/resolvers": "^3.9.0",
"@microsoft/applicationinsights-web": "^3.3.4",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-context-menu": "^2.2.2",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@vercel/analytics": "^1.4.0",
"@vercel/speed-insights": "^1.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"dompurify": "^3.1.7",
"lucide": "^0.446.0",
"lucide-react": "^0.446.0",
Expand All @@ -34,6 +37,9 @@
"next": "14.2.13",
"next-themes": "^0.3.0",
"react": "^18",
"react-aria-components": "^1.6.0",
"react-big-calendar": "^1.16.0",
"react-day-picker": "^8.10.1",
"react-dom": "^18",
"react-hook-form": "^7.53.1",
"sonner": "^1.7.0",
Expand All @@ -47,14 +53,20 @@
"devDependencies": {
"@types/dom-speech-recognition": "^0.0.4",
"@types/dompurify": "^3.0.5",
"@types/moment": "^2.13.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-big-calendar": "^1.16.0",
"@types/react-dom": "^18",
"@types/uuid": "^10.0.0",
"eslint": "^8",
"eslint-config-next": "14.2.13",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
},
"overrides": {
"@radix-ui/react-dismissable-layer": "1.0.5",
"@radix-ui/react-focus-scope": "1.0.4"
}
}
7 changes: 0 additions & 7 deletions src/app/cal/page.tsx

This file was deleted.

23 changes: 19 additions & 4 deletions src/app/chat/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import InfoToolTip from "@/components/InfoTooltip";
import ChatInterface from "@/components/ChatInterface";
import { useEffect } from "react";
import { useConversationStore } from "@/stores/useConversationStore";
import Calendar from "@/components/Calendar/MainCalendar";
import { useCalendarStore } from "@/stores/useCalendarStore";
import { cn } from "@/lib/utils";
import { MinimumWidth } from "@/types";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { ArrowLeft } from "lucide-react";

// export async function generateMetadata({ params }: { params: { id: string }}) {
// const conversations = await fetchConversations();
Expand All @@ -24,11 +30,12 @@ import { useConversationStore } from "@/stores/useConversationStore";
// }

export default function ChatPage({ params }: { params: { id: string } }) {
const isDesktop = window.innerWidth > MinimumWidth.Large;
const {
setConversations,
setActiveConversation
} = useConversationStore();

const { calendarOpen, setCalendarOpen } = useCalendarStore();
const router = useRouter();

useEffect(() => {
Expand All @@ -53,13 +60,21 @@ export default function ChatPage({ params }: { params: { id: string } }) {
return (
<div className="m-4 flex">
<Nav />
<div className="sm:py-4 xl:px-24 lg:px-18 md:px-14 sm:px-3 w-full">
<div className={cn(
"w-full",
!calendarOpen && "sm:py-4 xl:px-24 lg:px-18 md:px-14 sm:px-3 "
)}>
<div className="flex flex-col">
<div className="flex flex-row pb-4 mb-4 md:relative md:left-[-50px] md:top-[20px] justify-center md:justify-normal">
<h1 className="fixed md:relative text-4xl px-4 font-semibold">DragonGPT</h1>
<h1 className={cn(
"fixed md:relative text-4xl px-4 font-semibold",
calendarOpen && "ml-8"
)}>DragonGPT</h1>
<InfoToolTip />
</div>
<ChatInterface />
<div className="flex flex-row">
<ChatInterface />
</div>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: Arial, Helvetica, sans-serif;
height: 98dvh;
Expand Down
1 change: 1 addition & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "react-big-calendar/lib/css/react-big-calendar.css";
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
Expand Down
23 changes: 19 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ import InfoToolTip from "@/components/InfoTooltip";
import { usePathname } from "next/navigation";
import { useEffect } from "react";
import { useConversationStore } from "@/stores/useConversationStore";
import Calendar from "@/components/Calendar/MainCalendar";
import { useCalendarStore } from "@/stores/useCalendarStore";
import { cn } from "@/lib/utils";
import { MinimumWidth } from "@/types";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { ArrowLeft } from "lucide-react";

export default function Home() {
const isDesktop = window.innerWidth > MinimumWidth.Large;
const {
setConversations,
setActiveConversation,
} = useConversationStore();

const { calendarOpen, setCalendarOpen } = useCalendarStore();
const pathname = usePathname();

useEffect(() => {
Expand Down Expand Up @@ -42,13 +49,21 @@ export default function Home() {
return (
<div className="m-4 flex">
<Nav />
<div className="sm:py-4 xl:px-24 lg:px-18 md:px-14 sm:px-3 w-full">
<div className={cn(
"w-full",
!calendarOpen && "sm:py-4 xl:px-24 lg:px-18 md:px-14 sm:px-3 "
)}>
<div className="flex flex-col gap-8">
<div className="flex flex-row pb-4 md:relative md:left-[-50px] md:top-[20px] justify-center md:justify-normal">
<h1 className="fixed md:relative text-4xl px-4 font-semibold">DragonGPT</h1>
<h1 className={cn(
"fixed md:relative text-4xl px-4 font-semibold",
calendarOpen && "ml-8"
)}>DragonGPT</h1>
<InfoToolTip />
</div>
<ChatInterface />
<div className="flex flex-row">
<ChatInterface />
</div>
</div>
</div>
</div>
Expand Down
83 changes: 83 additions & 0 deletions src/app/scheduler/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
"use client";
import WeekCalendar from "@/components/Calendar/MainCalendar";
import InfoTooltip from "@/components/InfoTooltip";
import Nav from "@/components/Navigation/Nav";
import SchedulerInterface from "@/components/scheduler/scheduler-interface";
import { Sheet, SheetContent, SheetTitle, SheetTrigger } from "@/components/ui/sheet";
import { cn } from "@/lib/utils";
import { useCalendarStore } from "@/stores/useCalendarStore";
import { useSchedulerStore } from "@/stores/useSchedulerStore";
import { MinimumWidth } from "@/types";
import { ArrowLeft, ArrowUpRight } from "lucide-react";
import { useEffect } from "react"

export default function Page() {
const isDesktop = window.innerWidth > MinimumWidth.Large;
const {
setSchedulerMessages,
} = useSchedulerStore();

const { calendarOpen, setCalendarOpen } = useCalendarStore();

useEffect(() => {
const fetchSchedulerChat = () => {
return JSON.parse(
window.localStorage.getItem("scheduler-messages") || "[]"
) as Message[];
};

if (typeof window !== "undefined") {
setSchedulerMessages(fetchSchedulerChat());
}
}, [setSchedulerMessages]);

return (
<div className="m-4 flex">
<Nav />
<div className={cn(
"w-full",
!calendarOpen && "sm:py-4 xl:px-24 lg:px-18 md:px-14 sm:px-3 "
)}>
<div className="flex flex-col">
<div className="flex flex-row pb-4 mb-4 md:relative md:left-[-50px] md:top-[20px] justify-center md:justify-normal">
<h1 className={cn(
"fixed md:relative text-xl px-4 py-2 font-semibold",
calendarOpen && "ml-8"
)}>DragonGPT Scheduler</h1>
<InfoTooltip />
</div>
<div
className="flex flex-row gap-2 self-center border text-sky-900 border-sky-900 rounded-[2rem] p-6 m-8 w-full hover:cursor-pointer"
onClick={() => setCalendarOpen()}
>
<div className="w-full">
<p className="font-semibold text-lg">Dragon Scheduler</p>
<p>Take a look at your schedule</p>
</div>
<ArrowUpRight />
</div>
<div className="flex flex-row">
<SchedulerInterface />
{isDesktop
? calendarOpen && (<WeekCalendar />)
: <Sheet open={calendarOpen} onOpenChange={() => setCalendarOpen()} >
<SheetTitle className="sr-only">Dragon Scheduler</SheetTitle>
<SheetContent className="!max-w-full w-full p-2">
<div className="flex flex-row gap-6 ml-8">
<SheetTrigger className=" hover:bg-gray-300/40 -top-4 sm:top-0 rounded-sm"
>
<ArrowLeft />
<span className="sr-only">Exit calendar</span>
</SheetTrigger>
<span className="text-xl font-bold">Dragon Scheduler</span>
</div>
<WeekCalendar />
</SheetContent>
</Sheet>
}
</div>
</div>
</div>
</div>
)
}
69 changes: 0 additions & 69 deletions src/components/Calendar/CalendarGrid.tsx

This file was deleted.

Loading