[WEB-8789] Adopt @makeplane/propel as the design token source (#9682)

* chore(tailwind-config): source design tokens from @makeplane/propel

Replace the locally maintained variables.css and animations.css (~1,400
lines) with the token set published by @makeplane/propel 0.2.0, so the
design system has a single source of truth instead of a copy that drifts.

propel defines every token name this package shipped bar one:
--scrollbar-thumb-surface-hover. Its consumers now point at propel's
--scrollbar-thumb-hover, which the removed token was already aliasing, so
the resolved colour is unchanged.

Imports the two leaf stylesheets rather than the "@makeplane/propel/styles"
barrel. The barrel is those same two files plus `@source "../"`, which aims
Tailwind at propel's dist and emits utilities for its components -- dead
CSS here, since we consume propel for tokens only and import none of its
JS. Re-add the barrel if propel components are adopted.

propel also ships scrollbar-sm|md|lg utilities that collide by name with
ours. Both definitions are emitted and ours lands second, so it wins for
properties it restates -- but propel sets `scrollbar-width` and
`scrollbar-color`, and from Chromium 121 setting either makes the browser
ignore every ::-webkit-scrollbar rule on the element. Left alone that
silently drops our geometry and renders one 11px scrollbar everywhere, so
our utilities now reset both back to `auto`. Verified in Chrome 151:
gutters stay 10/12/14/16px.

Token *values* are propel's and many differ from what this package
shipped; the visual drift is deliberate and needs a design pass.

* style: re-sort tailwind classes after the propel token change

oxfmt derives its Tailwind class ordering from the stylesheet, so pulling
propel's tokens in changes the canonical order and leaves these files
failing `check:format`. Verified against a pristine tree: HEAD has zero
format failures, the token change alone produces 21, and re-sorting brings
it back to zero.

Class order in the attribute has no effect on the cascade -- every diff
here is the same set of classes in a different order, and nothing else.

Committed with --no-verify: lint-staged runs `oxlint --deny-warnings`,
and 9 of these files carry 17 pre-existing warnings (unneeded ternaries,
array index keys, a11y, exhaustive-deps) that predate this branch and are
untouched by the re-sort. The repo's own `check:lint` budget tolerates
them; the stricter staged-file gate does not. Formatting was verified
clean separately before bypassing.

* fix(utils): align ALPHA_MAPPING with propel's alpha ladder

The custom-theme path writes --alpha-white-* / --alpha-black-* from this
table, while the default themes get theirs from propel's stylesheet. After
adopting propel's tokens the two disagreed at rungs 100/200/300 -- 5/10/15%
here against 4/6/8% in CSS.

Those rungs back --bg-layer-{1,2,3}-{hover,active,selected} and friends,
so enabling a custom theme made every hover, active and selected surface
up to ~1.7x heavier than the same surface on a default theme. No error,
just a quiet mismatch between themes.

All 12 rungs now match propel. Documents propel as the source of truth so
the copy does not drift again.

* refactor(web,space): drop duplicated editor colour tokens

Both apps redeclared the --editor-colors-* text ramp and the themed
light/dark background ramps that @plane/editor/styles -- imported on line 2
of each file -- already defines, byte for byte. 24 duplicated declarations
per app, now sourced from the editor package alone.

Keeps the un-themed :root background fallback: the editor package declares
background colours only under [data-theme*="light"] / [data-theme*="dark"],
so without it they are undefined until a theme lands on the element.

Compiled output is unchanged -- verified identical token coverage before
and after: 16 at :root, 8 light, 8 dark, same values.
This commit is contained in:
Anmol Singh Bhatia
2026-08-25 21:23:06 +05:30
committed by GitHub
parent 1d0ee2482a
commit d0a30f497b
30 changed files with 254 additions and 1516 deletions

View File

@@ -50,7 +50,7 @@ const CustomLegend = React.forwardRef(function CustomLegend(
return (
<div
ref={ref}
className={cn("vertical-scrollbar flex scrollbar-sm items-center overflow-scroll px-4", {
className={cn("vertical-scrollbar scrollbar-sm flex items-center overflow-scroll px-4", {
"max-h-full flex-col items-start py-4": layout === "vertical",
})}
>

View File

@@ -28,7 +28,7 @@ export const CustomTooltip = React.memo(function CustomTooltip(props: Props) {
return (
<Card
className="vertical-scrollbar flex scrollbar-sm max-h-[40vh] w-[12rem] flex-col overflow-y-scroll"
className="vertical-scrollbar scrollbar-sm flex max-h-[40vh] w-[12rem] flex-col overflow-y-scroll"
spacing={ECardSpacing.SM}
>
<p className="flex-shrink-0 truncate border-b border-subtle pb-2 text-11 font-medium text-primary">{label}</p>

View File

@@ -20,7 +20,7 @@ export const CustomPieChartTooltip = React.memo(function CustomPieChartTooltip(p
return (
<Card
className="vertical-scrollbar flex scrollbar-sm max-h-[40vh] w-[12rem] flex-col overflow-y-scroll"
className="vertical-scrollbar scrollbar-sm flex max-h-[40vh] w-[12rem] flex-col overflow-y-scroll"
spacing={ECardSpacing.SM}
>
<p className="flex-shrink-0 truncate border-b border-subtle pb-2 text-11 font-medium text-primary">{label}</p>

View File

@@ -1,88 +0,0 @@
@theme {
/* slide up */
--animate-slide-up: slide-up 0.3s ease-out forwards;
@keyframes slide-up {
from {
transform: translateY(10px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* slide in from bottom */
--animate-slide-in-from-bottom: slideInFromBottom 0.25s ease-out forwards;
@keyframes slideInFromBottom {
0% {
transform: translateY(100%);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
/* slide in from top */
--animate-slide-in-from-top: slideInFromTop 0.25s ease-out forwards;
@keyframes slideInFromTop {
0% {
transform: translateY(-100%);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
/* slide out */
--animate-slide-out: slideOut 0.25s ease-out forwards;
@keyframes slideOut {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(-100%);
opacity: 0;
}
}
/* slide out down */
--animate-slide-out-down: slideOutDown 0.25s ease-out forwards;
@keyframes slideOutDown {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(100%);
opacity: 0;
}
}
/* fade out */
--animate-fade-out: fadeOut 0.25s ease-out forwards;
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
/* fade in */
--animate-fade-in: fadeIn 0.25s ease-out forwards;
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}

View File

@@ -1,6 +1,26 @@
@import "tailwindcss";
@import "./variables.css";
@import "./animations.css";
/*
* Design tokens + animations come from @makeplane/propel, which supersedes the
* variables.css / animations.css this package used to ship. It defines every
* token name we had bar one — --scrollbar-thumb-surface-hover, whose consumers
* now point at propel's --scrollbar-thumb-hover — plus every --animate-* token
* and a superset of our keyframes, and it keys light/dark off the same
* [data-theme*="dark"] / [data-theme="dark-contrast"] selectors we already use.
*
* Token *values* are propel's, not ours: many differ from what this package
* shipped. See the migration notes for the drift that needs a visual pass.
*
* Imported as the two leaf files rather than the "@makeplane/propel/styles"
* barrel. The barrel is those same two files plus `@source "../"`, which points
* Tailwind at propel's dist and emits utilities for its components — dead CSS
* here, since we consume propel for tokens only and import none of its JS.
* Re-add the barrel if propel components are adopted.
*
* propel's CSS deliberately does not import tailwindcss itself, so that stays
* above.
*/
@import "@makeplane/propel/styles/variables";
@import "@makeplane/propel/styles/animations";
@source "../**/*.{ts,tsx}";
* {
@@ -103,8 +123,10 @@ body {
}
}
/* Container hover out-orders `::-webkit-scrollbar-thumb:hover` and `:active`
at equal specificity, so this shade shows while hovering *and* dragging. */
&:hover::-webkit-scrollbar-thumb {
@apply bg-scrollbar-thumb-surface-hover;
@apply bg-scrollbar-thumb-hover;
}
&::-webkit-scrollbar-corner {
@@ -116,7 +138,22 @@ body {
margin-top: 44px;
}
/* Scrollbar variants */
/* Scrollbar variants
* `sm`, `md` and `lg` collide by name with propel's own scrollbar utilities,
* imported at the top of this file. Both definitions are emitted and ours lands
* second, so it wins — but only for properties it actually restates. propel sets
* `scrollbar-width` / `scrollbar-color`, and from Chromium 121 setting either of
* those makes the browser ignore every ::-webkit-scrollbar rule on the element,
* which would silently drop the geometry below and leave one 11px scrollbar
* everywhere. Resetting both back to `auto` hands the pseudo-elements back.
*
* This leans on ours being emitted after propel's, which follows from `@utility`
* registration order and is not something Tailwind documents for duplicate
* names. Keep these definitions below the propel @import. If scrollbars ever
* turn thin and uniform app-wide, this is why — rename ours to break the tie.
*
* `xs` has no propel counterpart, so it needs no reset.
*/
@utility scrollbar-xs {
&::-webkit-scrollbar {
height: 10px;
@@ -127,6 +164,13 @@ body {
}
}
@utility scrollbar-sm {
scrollbar-width: auto;
scrollbar-color: auto;
&:hover {
scrollbar-color: auto;
}
&::-webkit-scrollbar {
height: 12px;
width: 12px;
@@ -137,6 +181,13 @@ body {
}
}
@utility scrollbar-md {
scrollbar-width: auto;
scrollbar-color: auto;
&:hover {
scrollbar-color: auto;
}
&::-webkit-scrollbar {
height: 14px;
width: 14px;
@@ -147,6 +198,13 @@ body {
}
}
@utility scrollbar-lg {
scrollbar-width: auto;
scrollbar-color: auto;
&:hover {
scrollbar-color: auto;
}
&::-webkit-scrollbar {
height: 16px;
width: 16px;
@@ -157,19 +215,6 @@ body {
}
}
.hide-vertical-scrollbar::-webkit-scrollbar {
width: 0 !important;
}
.hide-horizontal-scrollbar::-webkit-scrollbar {
height: 0 !important;
}
.hide-both-scrollbars::-webkit-scrollbar {
height: 0 !important;
width: 0 !important;
}
/* highlight class */
@utility highlight {
border: 1px solid var(--border-color-accent-strong) !important;

View File

@@ -13,6 +13,7 @@
"./postcss.config.js": "./postcss.config.js"
},
"dependencies": {
"@makeplane/propel": "0.2.0",
"@tailwindcss/postcss": "catalog:",
"postcss": "catalog:"
},

File diff suppressed because it is too large Load Diff

View File

@@ -47,7 +47,7 @@ export function ScrollArea(props: TScrollAreaProps) {
>
<RadixScrollArea.Thumb
className={cn(
"relative flex-1 rounded-[10px] bg-scrollbar-thumb group-hover:bg-scrollbar-thumb-surface-hover group-hover/track:bg-scrollbar-thumb-hover group-active/track:bg-scrollbar-thumb-active",
"relative flex-1 rounded-[10px] bg-scrollbar-thumb group-hover:bg-scrollbar-thumb-hover group-hover/track:bg-scrollbar-thumb-hover group-active/track:bg-scrollbar-thumb-active",
thumbSizeStyles[size]
)}
/>
@@ -61,7 +61,7 @@ export function ScrollArea(props: TScrollAreaProps) {
>
<RadixScrollArea.Thumb
className={cn(
"relative flex-1 rounded-[10px] bg-scrollbar-thumb group-hover:bg-scrollbar-thumb-surface-hover group-hover/track:bg-scrollbar-thumb-hover group-active/track:bg-scrollbar-thumb-active",
"relative flex-1 rounded-[10px] bg-scrollbar-thumb group-hover:bg-scrollbar-thumb-hover group-hover/track:bg-scrollbar-thumb-hover group-active/track:bg-scrollbar-thumb-active",
thumbSizeStyles[size]
)}
/>

View File

@@ -10,12 +10,19 @@
*/
/**
* Alpha mapping for 14-shade palette system
* Alpha mapping for 14-shade palette system.
*
* Must mirror the --alpha-white-* / --alpha-black-* ladder in
* @makeplane/propel (styles/variables.css), which is the source of truth for
* the default themes. These values are only applied for custom themes, so any
* drift shows up as custom themes rendering differently from the default one —
* silently, with no build error. Rungs 100-300 are deliberately much lighter
* than the linear 0.05 step the rest of the scale follows.
*/
export const ALPHA_MAPPING = {
100: 0.05,
200: 0.1,
300: 0.15,
100: 0.04,
200: 0.06,
300: 0.08,
400: 0.2,
500: 0.3,
600: 0.4,