Skip to content

feat(web-shared): extend cn with custom tailwind-merge class groups#2619

Merged
mitul-s merged 1 commit into
mainfrom
c+ms/extend-cn-tailwind-merge-be69
Jun 25, 2026
Merged

feat(web-shared): extend cn with custom tailwind-merge class groups#2619
mitul-s merged 1 commit into
mainfrom
c+ms/extend-cn-tailwind-merge-be69

Conversation

@mitul-s

@mitul-s mitul-s commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Teaches tailwind-merge about the design-system typography/material utilities (text-heading-*, text-label-*, text-copy-*, text-button-*, material-*) so that conflicting classes within those groups resolve correctly when merged via cn.

Changes

  • Add packages/web-shared/src/lib/cn.ts with an extendTailwindMerge config covering the custom class groups
  • Move cn out of lib/utils.ts into its own lib/cn module and import it directly from there (no re-export indirection)
  • Repoint the web-shared consumers' cn imports to ../lib/cn

Notes

Verification

  • pnpm --filter @workflow/web-shared typecheck passes
  • Each consumer file changes only its cn import line
Open in Web Open in Cursor 

Move cn to its own lib/cn module that teaches tailwind-merge about the
design-system text-heading/text-label/text-copy/text-button/material
utilities, and import it directly from lib/cn.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jun 24, 2026 8:21pm
example-nextjs-workflow-webpack Building Building Preview, Comment Jun 24, 2026 8:21pm
example-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-express-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-nitro-workflow Building Building Preview, Comment Jun 24, 2026 8:21pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 24, 2026 8:21pm
workflow-swc-playground Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workflow-tarballs Ready Ready Preview, Comment Jun 24, 2026 8:21pm
workflow-web Ready Ready Preview, Comment Jun 24, 2026 8:21pm

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8754769

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/web-shared Patch
@workflow/web Patch
@workflow/cli Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mitul-s mitul-s marked this pull request as ready for review June 24, 2026 20:26
@mitul-s mitul-s requested review from a team and ijjk as code owners June 24, 2026 20:27
@mitul-s mitul-s enabled auto-merge (squash) June 25, 2026 03:01
@mitul-s mitul-s merged commit 8c12132 into main Jun 25, 2026
58 checks passed
@mitul-s mitul-s deleted the c+ms/extend-cn-tailwind-merge-be69 branch June 25, 2026 03:02
github-actions Bot added a commit that referenced this pull request Jun 25, 2026
…2619)

Move cn to its own lib/cn module that teaches tailwind-merge about the
design-system text-heading/text-label/text-copy/text-button/material
utilities, and import it directly from lib/cn.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Signed-off-by: Mitul Shah <mitulxshah@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2623. Merge conflicts were resolved by AI — please review carefully. (backport job run)

karthikscale3 pushed a commit that referenced this pull request Jun 25, 2026
…2619) (#2623)

Move cn to its own lib/cn module that teaches tailwind-merge about the
design-system text-heading/text-label/text-copy/text-button/material
utilities, and import it directly from lib/cn.

Signed-off-by: Mitul Shah <mitulxshah@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
pranaygp added a commit that referenced this pull request Jun 26, 2026
* origin/main: (46 commits)
  [web] Fix HTTP/2 in bundled server build so observability reads work (#2632)
  [core] Fix turbo-mode step-body writes racing run_started (#2629)
  fix(world-postgres): rename setup command (#2644)
  chore: ignore workflow swc caches (#2640)
  fix(ai): ignore intentional stream aborts (#2635)
  fix(nitro): reload steps during Vite HMR (#2572)
  [world] Make @workflow/world own its Zod dependency (#2622)
  feat(web-shared): extend cn with custom tailwind-merge class groups (#2619)
  [world-vercel] Enable HTTP/2 for the events API and stream writes (#2573)
  Remove shadow from off-screen marker indicator button (#2614)
  Fix discovery of dotted JS workflow imports (#2594)
  Version Packages (beta) (#2597)
  Thread occurredAt into web-shared entities (#2608)
  Propagate trace context to vercel-workflow.com in workbench instrumentation (#2601)
  Reduce workflow build log noise (#2565)
  Version Packages (beta) (#2596)
  Use text-gray-900 for trace shortcut helper text (#2595)
  Trace /flow route initialization (#2592)
  Version Packages (beta) (#2591)
  feat(web): add trace step shortcut helper (#2582)
  ...

# Conflicts:
#	workbench/nextjs-turbopack/instrumentation.ts
#	workbench/nextjs-webpack/instrumentation.ts
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
pranaygp added a commit that referenced this pull request Jun 26, 2026
…edrive

* origin/main: (90 commits)
  [ai] Fix "missing text part" stream crash by repairing UI message framing (#2537)
  [ci] Fix release "Premature close" by bounding changelog GraphQL batch size (#2669)
  [ai] Drop orphan UI chunks after negative-index reconnect (#2082)
  Fix trace detail panel Input/Output flicker (selection-driven state machine) (#2637)
  [world-local] Scope untagged startup recovery to untagged runs (#2667)
  fix(world-postgres): defer loopback worker startup (#2657)
  docs: deprecate DurableAgent and WorkflowChatTransport, point to AI SDK WorkflowAgent (#2616)
  [web] Fix HTTP/2 in bundled server build so observability reads work (#2632)
  [core] Fix turbo-mode step-body writes racing run_started (#2629)
  fix(world-postgres): rename setup command (#2644)
  chore: ignore workflow swc caches (#2640)
  fix(ai): ignore intentional stream aborts (#2635)
  fix(nitro): reload steps during Vite HMR (#2572)
  [world] Make @workflow/world own its Zod dependency (#2622)
  feat(web-shared): extend cn with custom tailwind-merge class groups (#2619)
  [world-vercel] Enable HTTP/2 for the events API and stream writes (#2573)
  Remove shadow from off-screen marker indicator button (#2614)
  Fix discovery of dotted JS workflow imports (#2594)
  Version Packages (beta) (#2597)
  Thread occurredAt into web-shared entities (#2608)
  ...

# Conflicts:
#	packages/core/src/runtime/step-executor.ts
#	packages/world-vercel/src/http-client.ts
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