Skip to content

UI & Fix: Upgrade ClaimUsername dropdowns with Shadcn Select and resolve Vite config lint error - #132

Merged
sky-ruler merged 3 commits into
sky-ruler:mainfrom
nirakarpatel:main
Jun 27, 2026
Merged

UI & Fix: Upgrade ClaimUsername dropdowns with Shadcn Select and resolve Vite config lint error#132
sky-ruler merged 3 commits into
sky-ruler:mainfrom
nirakarpatel:main

Conversation

@nirakarpatel

Copy link
Copy Markdown
Contributor

Description

This PR focuses heavily on visual consistency and modern aesthetics by replacing the native HTML <select> dropdowns on the ClaimUsername page with custom shadcn-ui Select components, bringing them perfectly in line with the app's overall glassmorphic design system.

Additionally, this PR addresses a failing GitHub Actions lint check caused by an unresolved __dirname variable in the Vite configuration.

Key Changes

UI & Design Upgrades

  • Shadcn Integration: Installed @base-ui/react/select via shadcn-ui and generated a jsconfig.json to properly alias imports.
  • Custom SelectTrigger Sizing: Removed Shadcn's hardcoded default heights (h-8), enabling the dropdown triggers to automatically inherit the dynamic py-3 padding. This ensures they perfectly vertically align and match the height of the standard text inputs.
  • Glassmorphic Menu Content: Styled the SelectContent dropdown container with a translucent blur effect (backdrop-blur-xl, bg-[#0f111a]/70, border-white/10) for a sleek, modern feel.
  • Compact & Scrollable List: Capped the maximum dropdown height to 300px and implemented custom, thin translucent scrollbars.
  • Enhanced Hierarchy & Typography:
    • Reduced SelectItem padding and font size (text-[13px]) to reduce bulkiness.
    • Updated SelectLabel group headers to be small (text-[10px]), bold, uppercase, and wide-tracked for clear visual separation.
  • Hover States: Updated the hover/focus highlight on the dropdown options to use a softer, semi-transparent accent color (focus:bg-accent/80 focus:text-white) that seamlessly blends with the glass background.

Linting & Configuration Fixes

  • ES Module Compatibility: Imported fileURLToPath from url and dirname from path in client/vite.config.js.
  • Path Aliasing Fix: Reconstructed __dirname using import.meta.url to resolve a no-undef ESLint error. This ensures the @ alias (used for the src directory) correctly resolves the absolute path in modern ES module environments.

Testing

  • Verified that npm run lint now passes successfully on the client directory in GitHub Actions.
  • Verified that the Vite development server processes the new @ alias flawlessly.
  • Checked that both "Branch" and "Academic Year" dropdowns maintain their state and correctly pass validation checks during onboarding.
  • Confirmed that the new custom scrollbars and backdrop-blurs appear perfectly across different viewport sizes.

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sky Ruler's projects Team on Vercel.

A member of the Team first needs to authorize it.

@sky-ruler
sky-ruler merged commit c7bbb8c into sky-ruler:main Jun 27, 2026
3 of 4 checks passed
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.

2 participants