Skip to content

chore(landing): initialize landing page#356

Merged
michalges merged 9 commits into
mainfrom
chore/initialize-landing-page
May 13, 2026
Merged

chore(landing): initialize landing page#356
michalges merged 9 commits into
mainfrom
chore/initialize-landing-page

Conversation

@michalges
Copy link
Copy Markdown
Member

No description provided.

@michalges michalges self-assigned this May 10, 2026
Copilot AI review requested due to automatic review settings May 10, 2026 17:12
@github-actions
Copy link
Copy Markdown

Looks like you did not link an issue to this PR. If this PR completes a task, consider linking it.

@michalges michalges changed the title chore: initialize landing page chore(landing): initialize landing page May 10, 2026
Copy link
Copy Markdown

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 introduces a public landing page at / and consolidates the administrative dashboard under a new base route (/admin) via a shared ADMIN_PATH constant, updating navigation, permissions, and tests accordingly.

Changes:

  • Added a new landing page (/) and moved admin navigation/routing to /admin using ADMIN_PATH.
  • Refactored layouts and navbar rendering so the global layout owns <Navbar /> and <main>, while auth layouts focus on access control/redirects.
  • Added Next.js route files under src/app/(private)/admin/** for multiple resources and updated unit/e2e tests for the new paths.

Reviewed changes

Copilot reviewed 35 out of 138 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tests/e2e/utils/set-arl-filters.ts Updates URL expectations to include the /admin base path.
src/tests/e2e/utils/return-from-arf.ts Updates return navigation URL expectations to /admin.
src/tests/e2e/specs/student-organizations.spec.ts Adjusts CRUD test URL waits for the /admin namespace.
src/tests/e2e/specs/guide-articles.spec.ts Adjusts CRUD and persistence test navigation to /admin.
src/features/resources/types/internal.ts Updates routable/creatable/editable resource route typing to include ADMIN_PATH.
src/features/resources/components/edit-button.tsx Updates edit links to route through /admin.
src/features/resources/components/create-button.tsx Updates create links to route through /admin.
src/features/resources/components/abstract-resource-layout.test.tsx Updates pathname-based title test to use /admin routes.
src/features/resources/components/abstract-resource-layout-title.tsx Updates pathname prefix logic to match /admin route structure.
src/features/resources/components/abstract-resource-group.tsx Switches “Back” navigation from Home to Dashboard.
src/features/authentication/data/route-permissions.ts Adds /admin-scoped route permissions and updates resource permission keys.
src/features/authentication/components/public-layout.tsx Redirects authenticated users to /admin and simplifies layout rendering.
src/features/authentication/components/private-layout.tsx Updates the guarded base route from / to /admin.
src/features/authentication/components/login-form.tsx Redirects to /admin on successful login.
src/features/authentication/components/bouncer.tsx Updates resource-based permission checks to use /admin/${resource}.
src/features/abstract-resource-list/lib/get-item-badges.ts Updates badge edit links to use /admin routes.
src/features/abstract-resource-list/components/abstract-resource-list.tsx Switches footer navigation from Home to Dashboard.
src/features/abstract-resource-form/components/arf-controller.tsx Updates post-submit navigation (push/replace) to /admin routes.
src/features/abstract-resource-form/components/arf-cancel-button.tsx Updates cancel navigation to /admin/${resource}.
src/features/abstract-resource-calendar/components/arc-client.tsx Switches calendar “Back” navigation from Home to Dashboard.
src/config/constants.ts Introduces ADMIN_PATH = "/admin" constant.
src/components/presentation/return-button.tsx Updates resource return target URLs to include /admin.
src/components/presentation/navbar.tsx Refactors navbar into a client component using useAuthentication() and pathname-based styling.
src/components/presentation/logout-button.tsx Moves logout action into a dropdown menu item UI.
src/components/presentation/error-message.tsx Makes error UI client-aware and chooses Home vs Dashboard return based on auth state.
src/components/presentation/dashboard-button.tsx Updates dashboard button routes to /admin/${resource}.
src/components/presentation/back-to-dashboard-button.tsx Adds a dedicated “Back to dashboard” button targeting /admin.
src/components/main-content.tsx Removes the MainContent wrapper component (now handled in root layout).
src/app/page.tsx Adds the new public landing page linking into the admin panel.
src/app/not-found.tsx Simplifies not-found handling to render ErrorMessage directly.
src/app/layout.tsx Moves navbar and <main> wrapper to the root layout for consistent rendering.
src/app/(private)/admin/versions/page.tsx Adds /admin/versions list route.
src/app/(private)/admin/versions/layout.tsx Adds resource layout wrapper for Versions.
src/app/(private)/admin/versions/edit/[id]/page.tsx Adds Versions edit route.
src/app/(private)/admin/versions/create/page.tsx Adds Versions create route.
src/app/(private)/admin/student-organizations/page.tsx Adds /admin/student-organizations list route.
src/app/(private)/admin/student-organizations/layout.tsx Adds resource layout wrapper for Student Organizations.
src/app/(private)/admin/student-organizations/edit/[id]/page.tsx Adds Student Organizations edit route.
src/app/(private)/admin/student-organizations/create/page.tsx Adds Student Organizations create route.
src/app/(private)/admin/page.tsx Renames the admin index page component and aligns it with /admin.
src/app/(private)/admin/notifications/topics/page.tsx Adds Notification Topics list route under Notifications.
src/app/(private)/admin/notifications/topics/layout.tsx Adds resource layout wrapper for Notification Topics.
src/app/(private)/admin/notifications/topics/edit/[id]/page.tsx Adds Notification Topics edit route.
src/app/(private)/admin/notifications/topics/create/page.tsx Adds Notification Topics create route.
src/app/(private)/admin/notifications/(notifications)/page.tsx Updates Notifications dashboard button link to use /admin.
src/app/(private)/admin/notifications/(notifications)/layout.tsx Adds resource layout wrapper for Notifications.
src/app/(private)/admin/notifications/(notifications)/create/page.tsx Adds Notifications create route.
src/app/(private)/admin/misc/sks-opening-hours/page.tsx Adds SKS Opening Hours list route under Misc.
src/app/(private)/admin/misc/sks-opening-hours/layout.tsx Adds resource layout wrapper for SKS Opening Hours.
src/app/(private)/admin/misc/sks-opening-hours/edit/[id]/page.tsx Adds SKS Opening Hours edit route.
src/app/(private)/admin/misc/sks-opening-hours/create/page.tsx Adds SKS Opening Hours create route.
src/app/(private)/admin/misc/(misc)/page.tsx Updates Mobile Config edit link to use /admin.
src/app/(private)/admin/misc/(misc)/layout.tsx Adds resource layout wrapper for Mobile Config (Misc).
src/app/(private)/admin/misc/(misc)/edit/page.tsx Adds Mobile Config edit route.
src/app/(private)/admin/map/polinka-stations/page.tsx Adds Polinka Stations list route under Map.
src/app/(private)/admin/map/polinka-stations/layout.tsx Adds resource layout wrapper for Polinka Stations.
src/app/(private)/admin/map/polinka-stations/edit/[id]/page.tsx Adds Polinka Stations edit route.
src/app/(private)/admin/map/polinka-stations/create/page.tsx Adds Polinka Stations create route.
src/app/(private)/admin/map/pink-boxes/page.tsx Adds Pink Boxes list route under Map.
src/app/(private)/admin/map/pink-boxes/layout.tsx Adds resource layout wrapper for Pink Boxes.
src/app/(private)/admin/map/pink-boxes/edit/[id]/page.tsx Adds Pink Boxes edit route.
src/app/(private)/admin/map/pink-boxes/create/page.tsx Adds Pink Boxes create route.
src/app/(private)/admin/map/libraries/page.tsx Adds Libraries list route under Map.
src/app/(private)/admin/map/libraries/layout.tsx Adds resource layout wrapper for Libraries.
src/app/(private)/admin/map/libraries/edit/[id]/page.tsx Adds Libraries edit route.
src/app/(private)/admin/map/libraries/create/page.tsx Adds Libraries create route.
src/app/(private)/admin/map/food-spots/page.tsx Adds Food Spots list route under Map.
src/app/(private)/admin/map/food-spots/layout.tsx Adds resource layout wrapper for Food Spots.
src/app/(private)/admin/map/food-spots/edit/[id]/page.tsx Adds Food Spots edit route.
src/app/(private)/admin/map/food-spots/create/page.tsx Adds Food Spots create route.
src/app/(private)/admin/map/campuses/page.tsx Adds Campuses list route under Map.
src/app/(private)/admin/map/campuses/layout.tsx Adds resource layout wrapper for Campuses.
src/app/(private)/admin/map/campuses/edit/[id]/page.tsx Adds Campuses edit route.
src/app/(private)/admin/map/campuses/create/page.tsx Adds Campuses create route.
src/app/(private)/admin/map/buildings/page.tsx Adds Buildings list route under Map.
src/app/(private)/admin/map/buildings/layout.tsx Adds resource layout wrapper for Buildings.
src/app/(private)/admin/map/buildings/edit/[id]/page.tsx Adds Buildings edit route.
src/app/(private)/admin/map/buildings/create/page.tsx Adds Buildings create route.
src/app/(private)/admin/map/bicycle-showers/page.tsx Adds Bicycle Showers list route under Map.
src/app/(private)/admin/map/bicycle-showers/layout.tsx Adds resource layout wrapper for Bicycle Showers.
src/app/(private)/admin/map/bicycle-showers/edit/[id]/page.tsx Adds Bicycle Showers edit route.
src/app/(private)/admin/map/bicycle-showers/create/page.tsx Adds Bicycle Showers create route.
src/app/(private)/admin/map/aeds/page.tsx Adds AEDs list route under Map.
src/app/(private)/admin/map/aeds/layout.tsx Adds resource layout wrapper for AEDs.
src/app/(private)/admin/map/aeds/edit/[id]/page.tsx Adds AEDs edit route.
src/app/(private)/admin/map/aeds/create/page.tsx Adds AEDs create route.
src/app/(private)/admin/map/(map)/page.tsx Adds Map section dashboard page with resource buttons.
src/app/(private)/admin/map/(map)/layout.tsx Adds resource layout wrapper for Map section.
src/app/(private)/admin/holidays/page.tsx Adds Holidays calendar page (backed by Academic Semesters relations).
src/app/(private)/admin/holidays/layout.tsx Adds resource layout wrapper for Holidays.
src/app/(private)/admin/holidays/edit/[id]/page.tsx Adds Holidays edit route.
src/app/(private)/admin/holidays/create/page.tsx Adds Holidays create route.
src/app/(private)/admin/guide-articles/page.tsx Adds Guide Articles list route.
src/app/(private)/admin/guide-articles/layout.tsx Adds resource layout wrapper for Guide Articles.
src/app/(private)/admin/guide-articles/edit/[id]/page.tsx Adds Guide Articles edit route.
src/app/(private)/admin/guide-articles/create/page.tsx Adds Guide Articles create route.
src/app/(private)/admin/guide-articles/create/guide-articles-create-page.test.tsx Adds unit tests for Guide Articles create form behavior.
src/app/(private)/admin/departments/page.tsx Adds Departments list route.
src/app/(private)/admin/departments/layout.tsx Adds resource layout wrapper for Departments.
src/app/(private)/admin/departments/edit/[id]/page.tsx Adds Departments edit route.
src/app/(private)/admin/departments/create/page.tsx Adds Departments create route.
src/app/(private)/admin/day-swaps/page.tsx Adds Day Swaps calendar page (backed by Academic Semesters relations).
src/app/(private)/admin/day-swaps/layout.tsx Adds resource layout wrapper for Day Swaps.
src/app/(private)/admin/day-swaps/edit/[id]/page.tsx Adds Day Swaps edit route.
src/app/(private)/admin/day-swaps/create/page.tsx Adds Day Swaps create route.
src/app/(private)/admin/calendar-events/page.tsx Adds Calendar Events calendar page.
src/app/(private)/admin/calendar-events/layout.tsx Adds resource layout wrapper for Calendar Events.
src/app/(private)/admin/calendar-events/edit/[id]/page.tsx Adds Calendar Events edit route.
src/app/(private)/admin/calendar-events/create/page.tsx Adds Calendar Events create route.
src/app/(private)/admin/banners/page.tsx Adds Banners list route.
src/app/(private)/admin/banners/layout.tsx Adds resource layout wrapper for Banners.
src/app/(private)/admin/banners/edit/[id]/page.tsx Adds Banners edit route.
src/app/(private)/admin/banners/edit/[id]/banners-edit-page.test.tsx Adds unit test covering banner edit form population.
src/app/(private)/admin/banners/create/page.tsx Adds Banners create route.
src/app/(private)/admin/banners/create/banners-create-page.test.tsx Adds unit test covering banner create form defaults.
src/app/(private)/admin/academic-semesters/page.tsx Adds Academic Semesters calendar route.
src/app/(private)/admin/academic-semesters/layout.tsx Adds resource layout wrapper for Academic Semesters.
src/app/(private)/admin/academic-semesters/edit/[id]/page.tsx Adds Academic Semesters edit route.
src/app/(private)/admin/academic-semesters/create/page.tsx Adds Academic Semesters create route.
src/app/(private)/admin/about-us/versions/page.tsx Adds Milestones (About Us versions) list route.
src/app/(private)/admin/about-us/versions/layout.tsx Adds resource layout wrapper for Milestones.
src/app/(private)/admin/about-us/versions/edit/[id]/page.tsx Adds Milestones edit route.
src/app/(private)/admin/about-us/versions/create/page.tsx Adds Milestones create route.
src/app/(private)/admin/about-us/roles/page.tsx Adds About Us Roles list route.
src/app/(private)/admin/about-us/roles/layout.tsx Adds resource layout wrapper for About Us Roles.
src/app/(private)/admin/about-us/roles/edit/[id]/page.tsx Adds About Us Roles edit route.
src/app/(private)/admin/about-us/roles/create/page.tsx Adds About Us Roles create route.
src/app/(private)/admin/about-us/links/page.tsx Adds About Us Links list route.
src/app/(private)/admin/about-us/links/layout.tsx Adds resource layout wrapper for About Us Links.
src/app/(private)/admin/about-us/links/edit/[id]/page.tsx Adds About Us Links edit route.
src/app/(private)/admin/about-us/links/create/page.tsx Adds About Us Links create route.
src/app/(private)/admin/about-us/contributors/page.tsx Adds Contributors list route under About Us.
src/app/(private)/admin/about-us/contributors/layout.tsx Adds resource layout wrapper for Contributors.
src/app/(private)/admin/about-us/contributors/edit/[id]/page.tsx Adds Contributors edit route.
src/app/(private)/admin/about-us/contributors/create/page.tsx Adds Contributors create route.
src/app/(private)/admin/about-us/(about-us)/page.tsx Updates About Us dashboard entry to use /admin edit route.
src/app/(private)/admin/about-us/(about-us)/layout.tsx Adds resource layout wrapper for About Us root section.
src/app/(private)/admin/about-us/(about-us)/edit/page.tsx Adds About Us edit route.

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

Comment thread src/app/page.tsx
Copilot AI review requested due to automatic review settings May 10, 2026 21:23
Copy link
Copy Markdown

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

Copilot reviewed 40 out of 143 changed files in this pull request and generated 1 comment.

Comment thread src/features/resources/types/internal.ts Outdated
@michalges michalges requested a review from GTR1701 May 10, 2026 21:35
Copy link
Copy Markdown
Member

@GTR1701 GTR1701 left a comment

Choose a reason for hiding this comment

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

Ogólnie to co popisałem w komentarzach do kodu. Dodatkowo kilka rzeczy wyłapałem, ale to można raczej w ramach taska z landing page'em zrobić.

Image

Tutaj trochę mamy rozjechane rozmiary ikonek i niezbyt ładnie to wygląda.

Dodatkowo jest problem z animacjami przechodząc między landing page'em a dashboardem. Aczkolwiek można to zostawić bo i tak strona będzie budowana.

Image

Comment thread src/app/(private)/admin/about-us/(about-us)/page.tsx
Comment thread src/components/presentation/back-to-dashboard-button.tsx Outdated
Comment thread src/config/constants.ts Outdated
Copilot AI review requested due to automatic review settings May 13, 2026 15:18
Copy link
Copy Markdown

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

Copilot reviewed 29 out of 134 changed files in this pull request and generated 1 comment.

Comment thread src/features/authentication/data/route-permissions.ts
@michalges michalges requested a review from GTR1701 May 13, 2026 15:47
@michalges
Copy link
Copy Markdown
Member Author

michalges commented May 13, 2026

co do navbara, cześć z tych przycisków zostało sprzed zmian, już nie chciałem ich dotykać bo to trochę poza scopem prki. + pewnie przy robieniu landing page'a wyjdzie pare zmian do tego navbara i tak

Copilot AI review requested due to automatic review settings May 13, 2026 17:52
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@michalges michalges merged commit 01124c7 into main May 13, 2026
11 of 12 checks passed
@michalges michalges deleted the chore/initialize-landing-page branch May 13, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants