Skip to content

feat(content): add tight Result, neutral and small Alert, borderless sharp Banner - #1698

Merged
tenphi merged 3 commits into
mainfrom
claude/linting-improvements-ptsz7z
Nov 23, 2026
Merged

tenphi merged 3 commits into
mainfrom
claude/linting-improvements-ptsz7z

Conversation

@tenphi

@tenphi tenphi commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Describe changes

Cube Cloud styles Result, Alert and Banner by hand in about 35 places, and its Tasty lint flags each one (tasty/no-protected-restyle). Most of them repeat one of four looks, so this PR gives each look a prop of its own:

  • Result layout="tight" 🧱 — for a result in a box that clips, such as a dashboard tile.
    • The icon, title, content and actions are spaced by gap alone (1x unless set).
    • No padding, no room around the icon, no margin above the content and actions, so the actions stay inside the box.
    • Replaces Cloud's shared Icon: { padding: 0 }, Content: { margin: 0 }, Actions: { margin: 0 } style object (about 20 uses).
  • Result fits its container 📏 — its width is now max min(80ch, 100%) and its Content is capped at 100%.
    • Before: content that cannot wrap, such as a long path, pushed the result past a container narrower than 80ch.
    • Replaces Cloud's FITTED_RESULT_STYLES.
  • Alert theme="neutral" 🩶 — disabled's gray card with the regular text color, for a note that carries no status.
    • Named neutral, not default: theme already defaults to note, so theme="default" would mislead.
    • Replaces theme="disabled" plus a color override (5 places).
  • Alert size="small" 🔡 — t4 text and 1x padding, for an alert in a dense panel. medium is the default and renders as before.
  • Sharp Banner drops its border ✂️ — a shape="sharp" banner runs across the page or stacks with others, so like a sharp Alert it has no 1px edge.
    • Replaces border="0" next to shape="sharp" (3 places).

Each change shows in a story:

Change Story
Result layout="tight" Result → Tight (new): default vs tight in two clipping tiles
Result fits its container Result → NarrowContainer (new): a 320px frame with a path that can't wrap; on the old width the Result grew to 602px
Alert theme="neutral" Alert → Themes (gains neutral)
Alert size="small" Alert → Sizes (new)
Sharp Banner without a border Banner → Stacked (its sharp banners lose the 1px edge)

Tests:

  • alert.test.tsx: the neutral color and fill, the medium default, the small preset and padding.
  • Result.browser.test.tsx: the tight layout's padding, gap and margins, the default layout keeping its room, the tight layout staying padding-free in a dialog, and the width cap. The width test fails on the old width.
  • Banner.browser.test.tsx (new): 1px border by default, 0 when sharp.

The lint plugin's defaults registry is regenerated (pnpm audit-defaults): Alert gains the size default and loses its preset default, which is now a state map.

Checklist
  • Pipeline is passed
  • Tests are added (including unit tests and stories in the storybook)
  • Tests are passed successfully
  • If you're adding a new component/new props, add stories that describe how this component/prop works
  • Changeset(s) is(are) added
  • Commit message follows commit guidelines

Part of CUB-5386

Other information

Checks run locally:

  • pnpm test ✅ (the pre-push run passed in full; an earlier run timed out one Form workflow test at 5.2 s under load, which passes on its own; this PR does not touch Form)
  • pnpm test:browser for Result and Banner ✅
  • pnpm test:types ✅
  • pnpm diagnostics:compiler and pnpm diagnostics:hooks --check ✅ (no new diagnostics)
  • pnpm audit-docs --component=Alert and --component=Result ✅
  • oxlint and prettier on the changed folders ✅ (two pixel-value warnings in stories this PR does not touch)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gr8S7DY3cmFsm5eXyHP4d4

…sharp Banner

- Result: layout="tight" spaces the blocks by gap alone, with no padding,
  for a result in a box that clips. Its width is capped at the container,
  so content that cannot wrap no longer pushes it out.
- Alert: theme="neutral" (disabled's gray card, regular text) and
  size="small" (t4 text, 1x padding).
- Banner: a sharp banner drops its border, as a sharp Alert does.

Each replaces styles Cube Cloud sets on these components by hand.

Part of CUB-5386

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DY3cmFsm5eXyHP4d4
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cube-ui-kit Ready Ready Preview Nov 23, 2026 10:32am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9efddc3

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

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

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

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-4ec3051.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Change
All 653.81 KB +0.02% 🔺
Tree shaking (just a Button) 163.76 KB · 25% of All 0% 🟰

Compared against main at 090c708 — run 44757017164, 2026-11-20T14:48:34Z.

Third-party packages

✅ No third-party package entered or left the bundle, and none grew more than 10 KB past its approved size.


To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html.

Shows the width cap the last commit added: in a frame narrower than
80ch the Result stays inside it and a path that can't wrap truncates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DY3cmFsm5eXyHP4d4
@tenphi
tenphi merged commit a4ba9de into main Nov 23, 2026
26 checks passed
@tenphi
tenphi deleted the claude/linting-improvements-ptsz7z branch November 23, 2026 10:36
@tenphi tenphi mentioned this pull request Nov 23, 2026
tenphi pushed a commit that referenced this pull request Nov 23, 2026
Resolves the harnesspm.lock.json conflict: main changed the uikit:docs
hash for #1698's docs edits, and this branch excludes uikit:docs, so the
entry goes. A fresh install and `harnesspm sync` on the merged tree
change nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7FAHF2ZZjma1gHg43N

This branch was successfully deployed

2 active deployments
Preview — 9efddc3e Deployed Nov 23, 2026 by vercel[bot]
Chromatic staging — 9efddc3e Deployed Nov 23, 2026 by tenphi via Prepare Storybook for review & tests #4526
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