Skip to content

feat: Install/add components in base coss-ui package#25456

Closed
sean-brydon wants to merge 35 commits intomainfrom
feat/add-coss-ui
Closed

feat: Install/add components in base coss-ui package#25456
sean-brydon wants to merge 35 commits intomainfrom
feat/add-coss-ui

Conversation

@sean-brydon
Copy link
Copy Markdown
Member

@sean-brydon sean-brydon commented Nov 28, 2025

What does this PR do?

This PR adds coss ui to the packages/coss-ui folder


Summary by cubic

Adds the base coss-ui package with a full set of accessible React components, shared utilities, and styles to standardize UI across apps. Integrates the library into the web app (aliases, Tailwind sources, config) and continues migrating settings screens to @coss/ui.

  • New Features

    • Adds core UI primitives: form fields (Input, Textarea, Checkbox, Radio, Switch, NumberField), overlays (Dialog, Sheet, Popover, Tooltip, AlertDialog), navigation (Tabs, Menu, Breadcrumb, Sidebar, Pagination), selection (Select, Combobox, Autocomplete), and display/feedback (Card, Table, Progress, Meter, Toast, Alert, Skeleton, Empty), plus Accordion, Collapsible, Slider, Toggle, and ToggleGroup.
    • Introduces InputGroup, Group, Toolbar, Frame, PreviewCard, ScrollArea, Separator, Badge, Avatar, Kbd, Spinner.
    • Standardizes variants and sizes; updates Button, Input, and Textarea (adds unstyled option and size support).
    • Adds useIsMobile hook, shared cn utility, and skeleton animation styles.
    • Configures components.json aliases (components "@/components", hooks "@coss/ui/hooks", utils "@coss/ui/lib/utils", ui "@coss/ui/components") and links Tailwind to coss-ui styles; adds scripts for linting, type checks, and registry sync. Adopts @coss/ui in web settings/profile views and shared UI, updates imports, tsconfig paths, and Next transpile settings.
  • Dependencies

    • Migrates to @base-ui/react ^1.0.0.
    • Bumps class-variance-authority to 0.7.1, clsx to ^2.1.1, and tailwind-merge to ^3.4.0; adds lucide-react ^0.555.0.
    • Removes @tailwindcss/forms plugin and dependency.
    • Updates yarn.lock to reflect new dependencies.

Written for commit c0b8175. Summary will update automatically on new commits.

@sean-brydon sean-brydon requested a review from a team as a code owner November 28, 2025 12:40
@graphite-app graphite-app Bot requested a review from a team November 28, 2025 12:41
@keithwillcode keithwillcode added consumer core area: core, team members only labels Nov 28, 2025
Comment thread packages/coss-ui/components.json Outdated
Comment on lines +13 to +17
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components",
"lib": "@/lib",
"hooks": "@/hooks"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correctly setup with input paths

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

10 issues found across 56 files

Prompt for AI agents (all 10 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/coss-ui/components/empty.tsx">

<violation number="1" location="packages/coss-ui/components/empty.tsx:13">
Props are spread on both the outer wrapper div and the inner content div, causing duplication of event handlers, IDs, and other attributes. The inner div should likely not receive `{...props}` since the outer wrapper already has them.</violation>
</file>

<file name="packages/coss-ui/components/spinner.tsx">

<violation number="1" location="packages/coss-ui/components/spinner.tsx:8">
The `aria-label=&quot;Loading&quot;` contains a hardcoded English string. Consider accepting the aria-label as a required prop or providing a mechanism for localization to ensure accessibility in different languages.</violation>
</file>

<file name="packages/coss-ui/components/sidebar.tsx">

<violation number="1" location="packages/coss-ui/components/sidebar.tsx:86">
`cookieStore` API is not universally available - it&#39;s unsupported in Firefox (all versions) and during SSR. This will cause runtime errors. Consider adding a guard like `if (typeof cookieStore !== &#39;undefined&#39;)` or falling back to `document.cookie`.</violation>

<violation number="2" location="packages/coss-ui/components/sidebar.tsx:622">
Using `Math.random()` in `useMemo` with empty dependencies will cause hydration mismatches in SSR. The server and client will generate different random values. Consider using a stable seed, passing width as a prop, or using `useId()` to generate a deterministic value.</violation>
</file>

<file name="packages/coss-ui/components/toggle-group.tsx">

<violation number="1" location="packages/coss-ui/components/toggle-group.tsx:66">
The `||` operator will always use context values since they&#39;re truthy strings (&quot;default&quot;), preventing individual Toggle items from overriding group variants/sizes via props. Consider using nullish coalescing with props taking precedence: `variant ?? context.variant`.</violation>

<violation number="2" location="packages/coss-ui/components/toggle-group.tsx:67">
Same issue as `resolvedVariant` - the `||` operator prevents size props from overriding context values. Consider: `size ?? context.size`.</violation>
</file>

<file name="packages/coss-ui/styles.css">

<violation number="1" location="packages/coss-ui/styles.css:61">
Duplicate `@keyframes skeleton` definitions (8 identical copies). This appears to be a code generation or copy-paste error. Remove the 7 duplicate definitions and keep only one.</violation>
</file>

<file name="packages/coss-ui/components/pagination.tsx">

<violation number="1" location="packages/coss-ui/components/pagination.tsx:87">
Consider exposing &#39;Previous&#39; text as a configurable prop (e.g., `label?: string`) to allow consuming applications to provide localized strings. UI component libraries typically avoid hardcoded user-facing text to support i18n.</violation>
</file>

<file name="packages/coss-ui/components/breadcrumb.tsx">

<violation number="1" location="packages/coss-ui/components/breadcrumb.tsx:74">
`opacity-72` is not a standard Tailwind CSS class. Use `opacity-70` or `opacity-75` instead.</violation>

<violation number="2" location="packages/coss-ui/components/breadcrumb.tsx:97">
Hardcoded text &quot;More&quot; should use `t()` for localization consistency.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Comment thread packages/coss-ui/src/components/empty.tsx
Comment thread packages/coss-ui/src/components/spinner.tsx
Comment thread packages/coss-ui/src/components/sidebar.tsx
Comment thread packages/coss-ui/src/components/sidebar.tsx
Comment thread packages/coss-ui/src/components/toggle-group.tsx
Comment thread packages/coss-ui/src/components/toggle-group.tsx
@@ -58,6 +58,46 @@
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
@keyframes skeleton {
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Nov 28, 2025

Choose a reason for hiding this comment

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

Duplicate @keyframes skeleton definitions (8 identical copies). This appears to be a code generation or copy-paste error. Remove the 7 duplicate definitions and keep only one.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/coss-ui/styles.css, line 61:

<comment>Duplicate `@keyframes skeleton` definitions (8 identical copies). This appears to be a code generation or copy-paste error. Remove the 7 duplicate definitions and keep only one.</comment>

<file context>
@@ -58,6 +58,46 @@
   --radius-md: calc(var(--radius) - 2px);
   --radius-lg: var(--radius);
   --radius-xl: calc(var(--radius) + 4px);
+  @keyframes skeleton {
+  to {
+    background-position: -200% 0;
</file context>

✅ Addressed in 6b71b1b

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@pasqualevitiello weird - this came straight from registery

Comment thread packages/coss-ui/src/components/pagination.tsx
Comment thread packages/coss-ui/src/components/breadcrumb.tsx
Comment thread packages/coss-ui/src/components/breadcrumb.tsx Outdated
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
cal-companion Ready Ready Preview, Comment Dec 17, 2025 11:22am
2 Skipped Deployments
Project Deployment Review Updated (UTC)
cal Ignored Ignored Dec 17, 2025 11:22am
cal-eu Ignored Ignored Dec 17, 2025 11:22am

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 1, 2025

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: cal.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 1, 2025

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: cal-eu.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 25 files (reviewed changes from recent commits).

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/coss-ui/package.json">

<violation number="1" location="packages/coss-ui/package.json:6">
P1: Export path `./styles/globals.css` does not exist. The `styles/` directory is missing - only `styles.css` exists at the root level. This will cause import failures.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Comment thread packages/coss-ui/package.json Outdated
"version": "0.0.0",
"exports": {
"./styles.css": "./styles.css",
"./globals.css": "./styles/globals.css",
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Dec 1, 2025

Choose a reason for hiding this comment

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

P1: Export path ./styles/globals.css does not exist. The styles/ directory is missing - only styles.css exists at the root level. This will cause import failures.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/coss-ui/package.json, line 6:

<comment>Export path `./styles/globals.css` does not exist. The `styles/` directory is missing - only `styles.css` exists at the root level. This will cause import failures.</comment>

<file context>
@@ -3,9 +3,10 @@
   &quot;version&quot;: &quot;0.0.0&quot;,
   &quot;exports&quot;: {
-    &quot;./styles.css&quot;: &quot;./styles.css&quot;,
+    &quot;./globals.css&quot;: &quot;./styles/globals.css&quot;,
+    &quot;./lib/*&quot;: &quot;./lib/*.ts&quot;,
     &quot;./components/*&quot;: &quot;./components/*.tsx&quot;,
</file context>
Suggested change
"./globals.css": "./styles/globals.css",
"./globals.css": "./styles.css",

✅ Addressed in dbdf280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants