Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c994acd
commit progress
paulpopus Apr 1, 2026
db6ac75
Merge branch 'main' into secret/ui-4.0
paulpopus Apr 20, 2026
82d2e5c
commit css changes
paulpopus Apr 20, 2026
eca23e4
remove md files
paulpopus Apr 21, 2026
612ce21
chore: update button sizes to valid option
JessRynkar Apr 22, 2026
84619c0
chore: update vars to match design (#16355)
JessRynkar Apr 22, 2026
0fecc24
chore: update bg var
JessRynkar Apr 24, 2026
76f92e6
chore: add v4 test suite
JessRynkar Apr 27, 2026
4089f8f
chore: create first user in new test suite
JessRynkar Apr 27, 2026
eb589f1
Merge branch 'main' of github.com:payloadcms/payload into v4/ui-redesign
PatrikKozak Apr 27, 2026
98be911
fix(ui): strip .css imports from esbuild bundle
PatrikKozak Apr 27, 2026
faf76c3
fix(ui): define --accessibility-outline CSS variable
PatrikKozak Apr 27, 2026
3ae5a48
fix(ui): move ReactSelect menu scroll to rs__menu-list
PatrikKozak Apr 27, 2026
190464e
fix(next): replace deprecated --theme-success-400 with --bg-success-d…
PatrikKozak Apr 27, 2026
820b7f2
adds skill and updates check icon
JarrodMFlesch Apr 27, 2026
82cfa40
Merge branch 'v4/ui4-skill' into v4/ui-redesign
JarrodMFlesch Apr 27, 2026
a71c355
test(a11y): exclude known wcag violations pending v4 color and size t…
PatrikKozak Apr 27, 2026
92cdb30
Merge branch 'v4/ui-redesign' of github.com:payloadcms/payload into v…
PatrikKozak Apr 27, 2026
16d7dd4
fix(ui): restore drawer transition and disable EditUpload crop inputs…
PatrikKozak Apr 27, 2026
69a7dde
fix(ui): fix stale closure in EditUpload fineTuneCrop causing crop to…
PatrikKozak Apr 27, 2026
1186259
fix(ui): add back disable state in EditUpload crop inputs until image…
PatrikKozak Apr 28, 2026
d641b34
feat(ui): restyle Point field for v4 (#16406)
JarrodMFlesch Apr 28, 2026
f889169
fix missing react crop css
JarrodMFlesch Apr 28, 2026
9adf369
Merge remote-tracking branch 'refs/remotes/origin/v4/ui-redesign' int…
JarrodMFlesch Apr 28, 2026
008eb70
update field labels
JarrodMFlesch Apr 28, 2026
e9c1bd8
chore: add e2e test step to ui4 skill
JarrodMFlesch Apr 28, 2026
2c84e51
chore: add test collection variant step to ui4 skill
JarrodMFlesch Apr 28, 2026
2e4a477
fix(test): improve parent focus indicator detection heuristics
JarrodMFlesch Apr 28, 2026
ed062c6
Merge branch 'main' into v4/ui-redesign
JarrodMFlesch Apr 28, 2026
3899f35
feat(ui): migrate Code and JSON fields to CSS for v4 redesign (#16413)
JarrodMFlesch Apr 28, 2026
4e059a1
chore: update ui4 skill
PatrikKozak Apr 28, 2026
e45e955
feat(ui): restyle RadioGroup field for v4 (#16411)
JarrodMFlesch Apr 28, 2026
0a759c3
chore: add figma icon source skill to ui4 skill
PatrikKozak Apr 28, 2026
bd1a6b2
chore: base style updates
JessRynkar Apr 29, 2026
1ba498c
Merge branch 'v4/ui-redesign' of https://github.com/payloadcms/payloa…
JessRynkar Apr 29, 2026
7b654d7
feat(ui): update collapsible field ui and error pill (#16365)
JessRynkar Apr 29, 2026
cff7546
fix(test): fix flaky JSON update test
JarrodMFlesch Apr 29, 2026
854e313
chore: fix collapsible and tab tests by adding focus styles
JessRynkar Apr 29, 2026
1a14efa
Merge branch 'v4/ui-redesign' of https://github.com/payloadcms/payloa…
JessRynkar Apr 29, 2026
a50f77b
fix code and json input height calculations
JarrodMFlesch Apr 29, 2026
a887de5
Merge remote-tracking branch 'refs/remotes/origin/v4/ui-redesign' int…
JarrodMFlesch Apr 29, 2026
e39d54c
chore: fix focus state on collapsible
JessRynkar Apr 29, 2026
da55885
adjust json field, fixes e2e test
JarrodMFlesch Apr 29, 2026
4dcedca
Merge remote-tracking branch 'refs/remotes/origin/v4/ui-redesign' int…
JarrodMFlesch Apr 29, 2026
2146be3
fix(ui): incorrect css vars in collapsibles and tabs
PatrikKozak Apr 29, 2026
0e2b3b8
Merge branch 'v4/ui-redesign' of github.com:payloadcms/payload into v…
PatrikKozak Apr 29, 2026
f6a25f0
fix e2e code height calculation
JarrodMFlesch Apr 29, 2026
385c02b
Merge remote-tracking branch 'refs/remotes/origin/v4/ui-redesign' int…
JarrodMFlesch Apr 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 231 additions & 0 deletions .claude/skills/ui4-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
---
name: ui4-review
description: Review UI4 CSS migrations for proper token usage. Checks that CSS variables are used instead of hardcoded values.
---

# UI4 Review

Reviews CSS changes and **auto-fixes** token violations.

---

## Process

### Step 1: Get Changed CSS Files

```bash
git status --porcelain | grep '\.css$'
```

### Step 2: Review & Auto-Fix Each File

For each changed CSS file:

1. Read the file
2. Identify violations
3. **Apply fixes immediately** using replace_string_in_file
4. Report what was fixed

---

## Violations to Flag

### Spacing (CRITICAL)

**Bad:**

```css
padding: 8px;
padding: 0.5rem;
gap: 16px;
margin: 1rem;
```

**Good:**

```css
padding: var(--spacer-2);
gap: var(--spacer-3);
margin: var(--spacer-3);
```

**Token reference:**
| Value | Token |
|-------|-------|
| 0 | `--spacer-0` |
| 4px / 0.25rem | `--spacer-1` |
| 8px / 0.5rem | `--spacer-2` |
| 12px / 0.75rem | `--spacer-2-5` |
| 16px / 1rem | `--spacer-3` |
| 24px / 1.5rem | `--spacer-4` |
| 32px / 2rem | `--spacer-5` |
| 40px / 2.5rem | `--spacer-6` |

**Exceptions:**

- `1px` borders are OK
- `0` is OK (no token needed)
- Percentage values are OK
- `100%`, `auto`, `inherit` are OK

---

### Colors (CRITICAL)

**Bad:**

```css
background: #f5f5f5;
color: rgba(0, 0, 0, 0.9);
border-color: #e6e6e6;
```

**Good:**

```css
background: var(--bg-default-secondary);
color: var(--text-default-default);
border-color: var(--border-default-default);
```

**Token prefixes:**

- Background: `--bg-*`
- Text: `--text-*`
- Border: `--border-*`
- Icon: `--icon-*`

**Prefer canonical shorthands** (defined in colors.css under "Canonical Shorthands"):

| Full Token | Preferred Shorthand |
| --------------------------- | ------------------- |
| `--icon-default-default` | `--icon-default` |
| `--icon-default-secondary` | `--icon-secondary` |
| `--icon-default-tertiary` | `--icon-tertiary` |
| `--text-default-default` | `--text-default` |
| `--text-default-secondary` | `--text-secondary` |
| `--text-default-tertiary` | `--text-tertiary` |
| `--bg-default-default` | `--bg-default` |
| `--bg-default-secondary` | `--bg-secondary` |
| `--bg-default-hover` | `--bg-hover` |
| `--bg-selected-default` | `--bg-selected` |
| `--border-default-default` | `--border-default` |
| `--border-default-strong` | `--border-strong` |
| `--border-selected-default` | `--border-selected` |

**Always use the shorthand when available.** Check colors.css for the full list.

---

### Border Radius (CRITICAL)

**Bad:**

```css
border-radius: 4px;
border-radius: 5px;
border-radius: 0.3125rem;
```

**Good:**

```css
border-radius: var(--radius-medium);
border-radius: var(--radius-small);
border-radius: var(--radius-full);
```

**Token reference:**
| Value | Token |
|-------|-------|
| 0 | `--radius-none` |
| 2px / 0.125rem | `--radius-small` |
| 5px / 0.3125rem | `--radius-medium` |
| 13px / 0.8125rem | `--radius-large` |
| 9999px | `--radius-full` |

---

### Typography (MODERATE)

**Bad:**

```css
font-size: 11px;
line-height: 16px;
font-weight: 550;
```

**Good:**

```css
font-size: var(--text-body-medium-font-size);
line-height: var(--text-body-medium-line-height);
font-weight: var(--text-body-medium-font-weight);
```

---

### Old Theme Variables (CRITICAL)

Flag any usage of legacy variables:

**Bad:**

```css
var(--theme-elevation-0)
var(--theme-elevation-50)
var(--theme-elevation-100)
var(--theme-error-100)
var(--theme-text)
var(--style-radius-m)
```

These must be replaced with new tokens.

---

## Behavior: AUTO-FIX

**Do NOT just report violations. FIX THEM.**

For each violation:

1. Identify the exact line and value
2. Determine the correct token replacement
3. Use `replace_string_in_file` to fix it immediately
4. Report what was fixed

**Only flag (don't fix) when:**

- No matching token exists (e.g., 18px badge size)
- Value is intentional (e.g., `1px` border, `0`)
- Ambiguous replacement

---

## Output Format

After auto-fixing, report:

```
## Auto-Fixed

✅ Collapsible/index.css:9 — `height: 2rem` → `height: var(--spacer-5)`
✅ Collapsible/index.css:120 — `width: 2rem` → `width: var(--spacer-5)`

## Flagged (Manual Review)

⚠️ ErrorPill/index.css:15 — `height: 1.125rem` (18px) — no matching token
```

---

## Summary

After all fixes, provide a simple summary:

| File | Fixed | Flagged |
| --------------------- | ----- | ------- |
| Collapsible/index.css | 2 | 1 |
| ErrorPill/index.css | 0 | 2 |
Loading
Loading