Skip to content

Feature/dashboard overview func#91

Open
Richardinho3 wants to merge 6 commits intomainfrom
feature/dashboard-overview-func
Open

Feature/dashboard overview func#91
Richardinho3 wants to merge 6 commits intomainfrom
feature/dashboard-overview-func

Conversation

@Richardinho3
Copy link
Copy Markdown
Collaborator

Summary

Removed redundant featuzrs from calasses page and added deadline overview on db overview page.


Implementation Details

  • Added a table of homeworks and tests, sorted by due date
  • Linked deadline table to todo subpage
  • Fixed responsiveness of db overview page
  • Removed christmas event from login page
  • Fixed calendar (styling only)

@Richardinho3 Richardinho3 requested a review from Copilot April 10, 2026 08:42
@Richardinho3 Richardinho3 self-assigned this Apr 10, 2026
@Richardinho3 Richardinho3 added new feature New feature frontend Frontend related issue labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the dashboard overview to include a due-date (“Deadliny”) overview and improves dashboard responsiveness/styling, while removing some redundant UI elements from other pages.

Changes:

  • Added a deadlines list to the dashboard overview, sorted by due date, with deep-links into the todo page.
  • Added URL-search driven behaviors on the todo page to open an assignment or start creating a new one.
  • Removed the snowfall/seasonal UI and trimmed redundant UI from the classes page; added global scrollbar styling.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
frontend/src/routes/RegisterPage.tsx Disables Snowfall effect on register page
frontend/src/routes/LoginPage.tsx Disables Snowfall effect on login page
frontend/src/routes/DashboardPage.tsx Passes classId into DashboardOverview
frontend/src/routes/DashboardAssignmentsPage.tsx Adds query-param driven open/create behaviors for deadlines
frontend/src/routes/ClassesPage.tsx Removes header link/buttons from classes page
frontend/src/components/DashboardOverview.tsx Adds deadlines table + responsive layout updates
frontend/src/assets/css/index.css Adds global scrollbar styling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 65 to 68
return (
<div className="flex min-h-screen items-center justify-center bg-[#1c1c1c]">
<Snowfall snowflakeCount={100} />
{/* <Snowfall snowflakeCount={100} /> */}
<div className="w-full max-w-md space-y-8 rounded-lg bg-[#272727] p-8 shadow-lg">
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowfall is now commented out in JSX, but the import Snowfall from "react-snowfall"; remains. With noUnusedLocals: true this will fail TypeScript compilation. Remove the unused import (or conditionally render Snowfall without commenting it out).

Copilot uses AI. Check for mistakes.
Comment on lines 53 to 56
return (
<div className="flex min-h-screen items-center justify-center bg-[#1c1c1c]">
<Snowfall snowflakeCount={100} />
{/* <Snowfall snowflakeCount={100} /> */}
<div className="w-full max-w-md space-y-8 rounded-lg bg-[#272727] p-8 shadow-lg">
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowfall is now commented out in JSX, but the import Snowfall from "react-snowfall"; remains. With noUnusedLocals: true this will fail TypeScript compilation. Remove the unused import (or conditionally render Snowfall without commenting it out).

Copilot uses AI. Check for mistakes.
Comment on lines +240 to +286
useEffect(() => {
const requestedId = search?.open;
if (!requestedId) {
return;
}

if (isLoading || assignments.length === 0) {
return;
}

if (isEditorOpen) {
return;
}

const match = assignments.find(
(assignment) => String(assignment.id) === String(requestedId),
);

if (match) {
openAssignmentEditor(match);
navigate({ to: "/dashboard/todo", search: {}, replace: true });
}
}, [assignments, isEditorOpen, isLoading, search?.open]);

useEffect(() => {
if (search?.open) {
return;
}

const shouldCreate = search?.create;
if (!shouldCreate) {
return;
}

if (isLoading || isEditorOpen) {
return;
}

newDeadlineButtonRef.current?.scrollIntoView({
behavior: "smooth",
block: "center",
});
newDeadlineButtonRef.current?.focus();

openNewAssignmentEditor();
navigate({ to: "/dashboard/todo", search: {}, replace: true });
}, [isEditorOpen, isLoading, search?.create, search?.open]);
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new effects reference openAssignmentEditor, openNewAssignmentEditor, and navigate but they are not included in the dependency arrays. With eslint-plugin-react-hooks enabled, this will trigger exhaustive-deps warnings (and can cause stale closures). Wrap the editor openers in useCallback (or move the logic inside the effect) and include the missing dependencies.

Copilot uses AI. Check for mistakes.
Comment on lines +304 to +316
<header className="flex items-start justify-between gap-4">
<h2 className="font-bold text-3xl">Deadliny</h2>
<button
type="button"
onClick={() => navigate({ to: "/dashboard/todo", search: { create: "1" } })}
className="flex items-center gap-2 rounded-lg px-3 py-2 text-[#18b4a6] hover:bg-black/5 transition-colors"
>
<FontAwesomeIcon
icon={faSquarePlus}
className="text-[#18b4a6] scale-200 hover:scale-190 cursor-pointer transition-transform duration-100"
/>

</button>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "add deadline" control is an icon-only <button> without an accessible label. Screen readers will announce it poorly, and it’s hard to discover. Add an aria-label (and optionally a visible tooltip/title) describing the action, e.g. "Vytvořit deadline".

Copilot uses AI. Check for mistakes.
Comment on lines 278 to 287
<div
key={i}
className={` flex items-center justify-center rounded ${
className={`aspect-square w-full flex items-center justify-center rounded-md cursor-pointer ${
isToday
? "bg-[#18b4a6] text-white hover:scale-95 transition-colors duration-50 cursor-pointer"
? "bg-[#18b4a6] text-white transition-colors duration-150 "
: cell.inMonth
? "hover:bg-black/5 transition-colors duration-50 cursor-pointer text-[#e6e6e6] hover:scale-95"
? "hover:bg-black/3 transition-colors duration-150 text-[#e6e6e6]"
: "text-gray-400"
}`}
>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calendar day cells are rendered as <div>s styled with cursor-pointer, which implies interactivity, but they have no click handler and no keyboard semantics. Either remove the pointer styling or switch to a semantic interactive element (button/role="button" + tabIndex + keyboard handlers) if days are intended to be clickable.

Copilot uses AI. Check for mistakes.
Comment on lines 253 to 260
<header className="flex items-center justify-between p-6 pt-4">
<h1 className="text-4xl font-semibold text-text">Třídy</h1>

<Link to={dashboardLink} className="text-white">
provizorní odkaz na dashboard zde
</Link>

<div className="flex gap-2">
<button
type="button"
onClick={() => setShowJoinModal(true)}
className="px-4 py-2 bg-[#18b4a6] text-white rounded-md shadow-lg hover:scale-95"
>
<FontAwesomeIcon icon={faLink} />
</button>
<button
type="button"
onClick={() => setShowCreateModal(true)}
className="inline-flex items-center justify-center w-12 h-12 rounded-md bg-[var(--color-primary)] text-white shadow-lg hover:scale-95"
>
<span className="text-2xl font-bold">+</span>
</button>
</div>




</header>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header cleanup removed the dashboard link/buttons, but Link, FontAwesomeIcon, faLink, and the dashboardLink variable are still declared at the top of the file and are now unused. With noUnusedLocals: true this will break the build—please remove the unused imports/variable or reintroduce their usage.

Copilot uses AI. Check for mistakes.
Comment on lines 12 to 17
import { faDna } from "@fortawesome/free-solid-svg-icons";

library.add(faGreaterThan, faLessThan, faSquarePlus, faDna);

import { isWoman, vocative } from "czech-vocative";

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an import { isWoman, vocative } from "czech-vocative"; after the runtime statement library.add(...). Static import declarations must not appear after non-import statements in an ES module (this will fail parsing/build in many toolchains). Move the czech-vocative import up with the other imports (and keep library.add(...) after all imports).

Copilot uses AI. Check for mistakes.
@Richardinho3 Richardinho3 requested a review from daneedev April 10, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Frontend related issue new feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants