Skip to content

DX-1128: docs local cn + heights utils (drop @ably/ui/core/utils)#3410

Merged
jamiehenson merged 2 commits into
mainfrom
dx-1128/docs-local-cn-heights
Jun 23, 2026
Merged

DX-1128: docs local cn + heights utils (drop @ably/ui/core/utils)#3410
jamiehenson merged 2 commits into
mainfrom
dx-1128/docs-local-cn-heights

Conversation

@jamiehenson

@jamiehenson jamiehenson commented Jun 17, 2026

Copy link
Copy Markdown
Member

Part of DX-1128. Drops @ably/ui/core/utils by vendoring the two utilities docs uses.

What

  • src/utilities/cn.tstwMerge(clsx(...)), local replacement for @ably/ui/core/utils/cn.
  • src/utilities/heights.ts — layout height helpers, replacing @ably/ui/core/utils/heights.
  • clsx + tailwind-merge promoted to direct deps (were transitive via @ably/ui).
  • Codemodded ~34 import sites across components/pages.

Behaviour

Pure import-source swap — same functions, same output. No visual change.

Stack (DX-1128)

PR Role
#3409 Design foundation — vendor @ably/ui tokens + reset/core CSS (merged)
#3410 Local cn + heights utils
#3411 Docs-native Icon component (Ably glyphs only; Heroicons imported directly)
#3412 Presentational components (Badge, Button, LinkButton, FeaturedLink, Status)
#3413 Interactive components (SegmentedControl, TabMenu)
#3414 ProductTile + product data (leaf)
#3415 syntax-highlighter util + registry
#3416 Code + CodeSnippet — completes the lift; prunes dead CSS + drops @ably/ui Tailwind scan

#3410#3416 are a linear stack, each building on the previous; #3409 has merged to main. ▶ = this PR.

Testing

  • Load the review app.
  • Check a sufficient sample of pages load with no visual regressions.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 450f5704-6ffe-4e1a-bee3-65270aa378e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dx-1128/docs-local-cn-heights

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-cn-heights branch from 7048a5b to f52a3b3 Compare June 18, 2026 13:17
@jamiehenson jamiehenson marked this pull request as ready for review June 18, 2026 13:36
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-cn-heights branch from f52a3b3 to 501a8c3 Compare June 18, 2026 14:34
@jamiehenson jamiehenson added the review-app Create a Heroku review app label Jun 18, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 18, 2026 14:54 Inactive
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-design-foundation branch from 9793a26 to 53a85f2 Compare June 18, 2026 14:56
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-cn-heights branch from 501a8c3 to 3707061 Compare June 18, 2026 14:56
@ably-ci ably-ci temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 18, 2026 14:57 Inactive
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-design-foundation branch from 53a85f2 to 1b58cba Compare June 18, 2026 15:50
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-cn-heights branch from 3707061 to 8fec0bb Compare June 18, 2026 15:50
@ably-ci ably-ci temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 18, 2026 15:50 Inactive
@jamiehenson jamiehenson marked this pull request as draft June 18, 2026 16:25
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-design-foundation branch from 1b58cba to 0452333 Compare June 23, 2026 13:25
@jamiehenson jamiehenson force-pushed the dx-1128/docs-local-cn-heights branch from 8fec0bb to 7fe3b3c Compare June 23, 2026 13:25
@ably-ci ably-ci temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 23, 2026 13:26 Inactive
Base automatically changed from dx-1128/docs-local-design-foundation to main June 23, 2026 13:59
@jamiehenson

Copy link
Copy Markdown
Member Author

Reviewed this — can't formally approve my own PR, so notes here. tl;dr: clean, low-risk — pure import-source swap, good to go once CI's green on the 18.3.1 base.

Verified:

  • Codemod's complete — all 33 cn + 4 heights imports swapped to src/utilities/*, none missed.
  • cn.ts is the canonical twMerge(clsx(inputs)) shadcn impl.
  • heights.ts matches upstream 18.3.1 exactly (HEADER_HEIGHT 64 / HEADER_BOTTOM_MARGIN 24; componentMaxHeight same output).
  • clsx/tailwind-merge pinned to the versions @ably/ui already used, so no resolution drift.

Two nits, neither blocking:

  • componentMaxHeight uses a template literal where upstream uses + "px" concat — identical output, only worth matching for byte-parity against source.
  • No unit tests for the two utils — fine given how trivial they are, though a 2-liner on componentMaxHeight would be cheap.

Not yet confirmed: full Gatsby-5.16 build/tsc on the freshly-rebased base — worth eyeballing CI before un-drafting.

~ 𝒞𝓁𝒶𝓊𝒹𝑒

@jamiehenson jamiehenson marked this pull request as ready for review June 23, 2026 14:09
@jamiehenson jamiehenson temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 23, 2026 14:10 Inactive

@kennethkalmer kennethkalmer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Neat, love the stacked table in the PR as well

Comment thread src/utilities/heights.ts Outdated
@jamiehenson jamiehenson enabled auto-merge June 23, 2026 16:53
@jamiehenson jamiehenson temporarily deployed to ably-docs-dx-1128-docs--kq7o95 June 23, 2026 16:53 Inactive
@jamiehenson jamiehenson merged commit 15df0e4 into main Jun 23, 2026
7 checks passed
@jamiehenson jamiehenson deleted the dx-1128/docs-local-cn-heights branch June 23, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants