-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add sidebar to v2 UI #15925
Add sidebar to v2 UI #15925
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's omit color palette for a bit and roll forward the shadcn default for a bit. on my last pass through prefect-design
we have some wonky color stuff that I'm fine carrying forward but want to understand them before we do
|
||
const items = [ | ||
{ | ||
title: "Dashboard", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over optimization, but if instead of 'title', 'url' we do
{'children': whatever, 'linkProps': { to: '/' }}
then it can easier to reason about and include non text item for children. Also, if we type linkProps correctly we can use typesafety to make sure this nav items list handshakes right. happy to do this in a future PR this isn't blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented a new way to define these items in dae469e. It's a bit different than what you suggested, but I think it gives the flexibility that we need.
import { Link } from "@tanstack/react-router"; | ||
import { Button } from "@/components/ui/button"; | ||
|
||
const navItems = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at this point would recommend just having a million sidebar items than this config object
This PR adds a sidebar to the v2 UI. It looks like this:
The sidebar was created entirely with components from
shadcn/ui.
All the tabs correspond to real routes, but most will take the user to a placeholder page.
This PR also introduces
husky
for pre-commit checks/formatting andvitest
andmsw
for tests.msw
seems to work well for mocking out API calls in tests.Related to #15512