Skip to content

feat(CubeLogo)!: replace CloudLogo with CubeLogo + CubeFullLogo - #1270

Merged
tenphi merged 2 commits into
mainfrom
feat/cube-logo-components
Jul 30, 2026
Merged

feat(CubeLogo)!: replace CloudLogo with CubeLogo + CubeFullLogo#1270
tenphi merged 2 commits into
mainfrom
feat/cube-logo-components

Conversation

@tenphi

@tenphi tenphi commented Jul 30, 2026

Copy link
Copy Markdown
Member

Breaking: CloudLogo is removed

It shipped the previous brand artwork with hard-coded hexes (#ff6492, #141446, #7a77ff, #a14474) and the retired "Cube Cloud" wordmark, so it could neither follow a colour scheme nor be recoloured.

Nothing consumed it — verified zero imports across cubejs-enterprise; the only greps there are the HeaderCubeCloudLogo data-qa string and unrelated googleCloudLogo SVG imports.

Added

The marks cubejs-enterprise had inlined into its own HomeLogoButton, so the artwork now lives in one place:

Component Sizing
CubeLogo square mark — size drives both axes
CubeFullLogo mark + wordmark — size sets the height only, width follows the 98 / 28 ratio

CubeFullLogo puts both marks on one canvas (viewBox="0 0 98 28" — mark at x 0–28, wordmark at x 33–98, so the gap is part of the artwork). Icon is square by default (width: '1em 1em'), so the wrapper and the inner svg release width to auto with aspect-ratio pinned — otherwise the wordmark is squashed into a 1em box. Don't set an explicit width on it.

Both draw every path with currentColor, so they inherit the surrounding text colour or take an explicit color, and fall back to $icon-size when size is omitted.

Light/dark

The mark is two different drawings, not one recoloured — the dark variant is filled differently so it holds its weight against a dark surface. Both render and the @dark state swaps them in CSS: no re-render, no scheme prop, correct during SSR and before hydration.

Consequence for tests: both paths are always in the DOM. Assert on [data-element="LightMark"] / [data-element="DarkMark"], not on a lone path.

Migrating

The old component was a Button; these are icons. Wrap it and keep the accessible name on the control:

// before
<CloudLogo to="/" />

// after
<Button aria-label="Cube home" to="/">
  <CubeFullLogo aria-hidden />
</Button>

Both marks expose role="img" + aria-label="Cube" on their own, for use outside an interactive element.

Verification

Build clean · 1003 tests pass (6 new: scheme-swap markup, accessible name, and that the full logo keeps width: auto + aspect-ratio: 98 / 28 while the mark stays square) · oxlint + prettier clean · size-limit passes (451.89 kB / 460 kB).

Independent of the pastel palette redesign (#1229), so it can land on its own — cubejs-enterprise can then drop its inlined copies and consume these.

🤖 Generated with Claude Code


Note

Medium Risk
Major breaking API removal requires consumer migration for any CloudLogo usage; branding/header behavior changes if apps relied on the old button+SVG component.

Overview
Breaking: removes CloudLogo (button-wrapped legacy “Cube Cloud” SVG with fixed brand hexes) and drops the old cube-cloud-logo.svg asset.

Adds CubeLogo and CubeFullLogo as Icon-based marks: currentColor sizing via size / $icon-size, with CubeFullLogo using aspect-ratio: 98/28 so height-only sizing does not squash the wordmark. Light/dark cube artwork is swapped with @dark CSS on LightMark / DarkMark paths (SSR-safe, no scheme prop).

Public API in src/index.ts now exports CubeLogo / CubeFullLogo instead of CloudLogo. Docs, Storybook, tests, and a major changeset document migration: wrap CubeFullLogo in Button (or similar) with aria-label on the control when the logo is interactive.

Reviewed by Cursor Bugbot for commit 199f254. Bugbot is set up for automated code reviews on this repo. Configure here.

BREAKING CHANGE: `CloudLogo` is removed.

It shipped the previous brand artwork with hard-coded hexes (`#ff6492`,
`#141446`, `#7a77ff`, `#a14474`) plus the retired "Cube Cloud" wordmark, so it
could not adapt to a colour scheme or be recoloured — and nothing consumed it
(verified: zero imports across cubejs-enterprise; the only greps there are the
`HeaderCubeCloudLogo` data-qa string and unrelated `googleCloudLogo` SVG
imports).

Adds the marks cubejs-enterprise had inlined into its own `HomeLogoButton`, so
the artwork lives in one place:

- `CubeLogo` — square mark, `Icon`-based, `size` drives both axes.
- `CubeFullLogo` — mark + wordmark on one canvas (`viewBox="0 0 98 28"`, the
  mark at x 0–28 and the wordmark at x 33–98, so the gap is part of the
  artwork). `size` sets the HEIGHT only; width follows the `98 / 28` ratio via
  `aspect-ratio`. `Icon` is square by default (`width: '1em 1em'`), so both the
  wrapper and the inner `svg` release width to `auto` — otherwise the wordmark
  gets squashed into a 1em box.

Every path uses `currentColor`, so the marks inherit the surrounding text colour
or take an explicit `color`, and fall back to `$icon-size` with no `size`.

The mark is two different drawings, not one recoloured: the dark variant is
filled differently to hold its weight against a dark surface. Both render and
the `@dark` state swaps them in CSS, so there is no re-render, no scheme prop,
and it is correct during SSR. Both paths are always in the DOM — assert on
`[data-element="LightMark"]` / `[data-element="DarkMark"]`, not on a lone `path`.

Both expose `role="img"` + `aria-label="Cube"`; the docs show handing the name to
the control and marking the logo `aria-hidden` when the logo *is* the link.

Verified: build clean, 1003 tests pass (6 new, asserting the scheme-swap markup,
the accessible name, and that the full logo keeps `width: auto` with
`aspect-ratio: 98 / 28` while the mark stays square), oxlint + prettier clean,
size-limit passes (451.89 kB / 460 kB).
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 199f254

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 Major

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

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview Jul 30, 2026 11:49am

Request Review

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-722f90e.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 441.3 KB (+0.13% 🔺) Yes 🎉
Tree shaking (just a Button) 114.88 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@tenphi
tenphi merged commit 65bf3bc into main Jul 30, 2026
15 checks passed
@tenphi
tenphi deleted the feat/cube-logo-components branch July 30, 2026 11:52
@tenphi tenphi mentioned this pull request Jul 30, 2026
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.

1 participant