Skip to content

[WIP] Replace cn utility with cx utility across codebase#447

Closed
jthrilly with Copilot wants to merge 3 commits into
new-form-systemfrom
copilot/vscode1754654203960
Closed

[WIP] Replace cn utility with cx utility across codebase#447
jthrilly with Copilot wants to merge 3 commits into
new-form-systemfrom
copilot/vscode1754654203960

Conversation

Copilot AI commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Replace all uses of the cn utility from ~/utils/shadcn with the cx utility from ~/utils/cva across the entire codebase.

Task Details:

  1. Find all files that import cn from ~/utils/shadcn (40 files identified)
  2. Replace import statements: import { cn } from '~/utils/shadcn'import { cx } from '~/utils/cva'
  3. Replace all function calls: cn(...)cx(...)
  4. Ensure no functionality is broken (both utilities have the same API for merging Tailwind CSS classes)

Files to update (40 total):

  • /lib/form/components/Form.tsx
  • /lib/form/components/fields/Select.tsx
  • /lib/form/components/fields/InputArrayField.tsx
  • /lib/form/components/fields/Input.tsx
  • /components/ui/typography/Heading.tsx
  • /components/CopyDebugInfoButton.tsx
  • /lib/interviewer/containers/SearchableList.tsx
  • /lib/interviewer/components/NodeList.js
  • /lib/interviewer/components/Navigation.tsx
  • /lib/interviewer/components/Panel.tsx
  • /components/data-table/data-table-floating-bar.tsx
  • /components/data-table/data-table-toolbar.tsx
  • /components/data-table/data-table-faceted-filter.tsx
  • /components/ContainerClasses.ts
  • /components/Banner/Banner.tsx
  • /components/DataTable/ColumnHeader.tsx
  • /components/ProtocolImport/JobCard.tsx
  • /components/layout/Section.tsx
  • /components/layout/SettingsSection.tsx
  • /components/Feedback/FeedbackBanner.tsx
  • /components/ui/skeleton.tsx
  • /components/ui/select.tsx
  • /components/ui/checkbox.tsx
  • /components/ui/dropdown-menu.tsx
  • /components/ui/CloseButton.tsx
  • /components/ui/Input.tsx
  • /components/ui/table.tsx
  • /components/ui/dialog.tsx
  • /components/ui/separator.tsx
  • /components/ui/command.tsx
  • /components/ui/switch.tsx
  • /components/ui/tooltip.tsx
  • /components/ui/Divider.tsx
  • /components/ui/typography/UnorderedList.tsx
  • /components/ui/progress.tsx
  • /components/ui/popover.tsx
  • /components/ui/FancyBox.tsx
  • /components/ui/card.tsx
  • /lib/dnd/stories/DragAndDrop.stories.tsx
  • /app/dashboard/participants/_components/DropzoneField.tsx

Verification:

  • Both cn and cx utilities have the same API (they accept class name inputs and merge them using tailwind-merge)
  • The cx utility comes from the new cva configuration in /utils/cva.ts
  • No functional changes should occur, only the import source and function name changes

@vercel

vercel Bot commented Aug 8, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fresco-sandbox ❌ Failed (Inspect) Aug 8, 2025 0:00am
fresco-storybook ❌ Failed (Inspect) Aug 8, 2025 0:00am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
barf ⬜️ Ignored (Inspect) Aug 8, 2025 0:00am

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