Skip to content

refactor(web): replace Flow DS with shadcn Base UI#182

Open
yiningsoong wants to merge 3 commits into
mainfrom
refactor/140-flow-ds-to-shadcn
Open

refactor(web): replace Flow DS with shadcn Base UI#182
yiningsoong wants to merge 3 commits into
mainfrom
refactor/140-flow-ds-to-shadcn

Conversation

@yiningsoong
Copy link
Copy Markdown
Contributor

@yiningsoong yiningsoong commented May 19, 2026

🚀 Summary

Replace the Flow Design System with shadcn/ui as the base component library, and add a /logos/ static file route to the Go backend so app logos are served
in production without relying on Vite's /public directory.

✏️ Changes

  • Removed the custom Sidebar component tree (Sidebar/, SidebarItem, SidebarProvider, etc.) and replaced it with shadcn's sidebar, sheet, tooltip, badge,
    button, breadcrumb, separator, skeleton, and input primitives
  • Rewrote RootLayout, HomeView, AppCard, and StudentsView to use shadcn components
  • Added AppHeader and AppSection components
  • Replaced useIsMobile and useIsWithinViewport hooks with shadcn's use-mobile hook
  • Added web/lib/utils.ts (cn helper) and components.json for shadcn configuration
  • Added app logo SVGs to web/public/logos/
  • Added /logos/ file serving route in the Go backend (dev: proxied to Vite; prod: served from dist/logos/)

🧪 Test Plan

  • Ran go build ./server/... to verify backend compiles
  • Ran pnpm dev:all and confirmed logos render correctly in the browser
  • Verified sidebar navigation, app cards, and responsive layout work on desktop and mobile viewports
  • Ran pnpm lint and pnpm build with no errors

@yiningsoong
Copy link
Copy Markdown
Contributor Author

add summary

Copy link
Copy Markdown
Contributor Author

@yiningsoong yiningsoong left a comment

Choose a reason for hiding this comment

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

please fix, remove all arbitrary values if possible

Comment thread web/containers/RootLayout.tsx Outdated
Comment thread web/components/ui/skeleton.tsx
Comment thread web/components/AppCard.tsx Outdated
Comment thread web/containers/HomeView.tsx Outdated
Comment thread web/data/apps.ts Outdated
Comment thread web/components/AppCard.tsx Outdated
Comment thread web/assets/logos/allears.svg
@kellylimmm
Copy link
Copy Markdown
Contributor

Can remove .npmrc

@yiningsoong yiningsoong force-pushed the refactor/140-flow-ds-to-shadcn branch from 256ebb7 to d0bb3e4 Compare May 19, 2026 10:11
Comment thread tsconfig.json Outdated
@YimingIsCOLD
Copy link
Copy Markdown
Contributor

Need to do pnpm approve-builds for msw.


const RootLayout: React.FC = () => {
const topbarRef = useRef<HTMLDivElement>(null);
const isWithinViewport = useIsWithinViewport(topbarRef);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the UX want fixed border bottom or disappear when scroll?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I feel moving forward - we should use the prototype as the source of truth. Otherwise it's gonna be a painpoint to keep track on the verbal agreements - other engineers might change it to look like the prototype because they realised it looked different without knowing there was a separate thread all along 🤔

wdyt?

on the topic, checking with UXD on this and asking them to make the changes if necessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they liked the old implementation better so will be reverting LOL, made a note to them to change it on their end to keep it consistent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel moving forward - we should use the prototype as the source of truth. Otherwise it's gonna be a painpoint to keep track on the verbal agreements - other engineers might change it to look like the prototype because they realised it looked different without knowing there was a separate thread all along 🤔

I think we will discuss this on next Monday to set the ways of working.

@YimingIsCOLD
Copy link
Copy Markdown
Contributor

Screenshot 2026-05-20 at 11 11 40

On mobile view, only the featured card has icon and description side by side. The rest of the cards' icon and description are top and bottom.

@yiningsoong yiningsoong force-pushed the refactor/140-flow-ds-to-shadcn branch from d0bb3e4 to 1b4b99c Compare May 20, 2026 03:13
@yiningsoong
Copy link
Copy Markdown
Contributor Author

Screenshot 2026-05-20 at 11 11 40 On mobile view, only the featured card has icon and description side by side. The rest of the cards' icon and description are top and bottom.

we (uxd+me) decided to do 2 columns instead of 1 in mobile

@yiningsoong yiningsoong force-pushed the refactor/140-flow-ds-to-shadcn branch from fcce009 to 41ecf8a Compare May 20, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants