fix(editor): add uppercase mark to inspector text panel

Merged
SV
1d ago
+78-1

Summary

InspectorText derives mark active state from the hardcoded MARK_NAMES list. "uppercase" was missing, so the inspector Text panel never tracked the Uppercase mark even though FORMAT_ITEMS renders its toggle and the bubble menu (BubbleMenuUppercase) works. The toggle rendered but stayed visually inactive (aria-pressed always false).

Adds "uppercase" to MARK_NAMES, matching the schema and the bubble menu.

Changes

  • packages/editor/src/ui/inspector/text.tsx: add "uppercase" to MARK_NAMES
  • packages/editor/src/ui/inspector/text.spec.tsx: new test asserting the uppercase toggle renders and reflects active mark state
  • .changeset/inspector-uppercase-mark.md: patch changeset for @react-email/editor

Validation

  • pnpm biome check on changed files, clean
  • pnpm --filter @react-email/editor typecheck, clean
  • pnpm test in packages/editor: 55 unit files / 523 tests and 4 browser files / 19 tests, all pass
  • pnpm --filter @react-email/editor build: regenerated dist/ui/index.mjs / index.cjs contain "uppercase" in MARK_NAMES (dist is gitignored, not committed)

Closes #3849


Summary by cubic

Fixes the inspector text panel so the Uppercase toggle correctly reflects the active mark state. MARK_NAMES was missing "uppercase", so the toggle rendered but always appeared inactive even when the mark was applied.