Skip to content

fix(core): align border radius tokens with Figma design system#3805

Open
desiree-np wants to merge 3 commits intomainfrom
fix/border-radius-tokens-parity
Open

fix(core): align border radius tokens with Figma design system#3805
desiree-np wants to merge 3 commits intomainfrom
fix/border-radius-tokens-parity

Conversation

@desiree-np
Copy link
Copy Markdown
Collaborator

Summary

  • Add missing xxl token (20px) to the border radius scale — present in Figma but absent in code
  • Migrate 11 hardcoded rounded-[10px] usages to rounded (the correct semantic token for the DEFAULT 10px value)

Changes

Token definition

File Change
packages/core/src/tokens/borderRadius.ts Added xxl: "1.25rem" (20px) between xl and 2xl
packages/react-native/src/styles/theme.css Added --radius-xxl: 1.25rem to match

Component cleanup (rounded-[10px]rounded)

  • src/ui/InputField/InputField.tsx
  • src/ui/F0Wizard/components/WizardSteps.tsx
  • src/experimental/Navigation/F0TableOfContent/index.tsx (2 occurrences)
  • src/experimental/Navigation/F0TableOfContent/Item/PrimitiveItem.tsx
  • src/components/F0DurationInput/F0DurationInput.tsx
  • src/experimental/Forms/EntitySelect/ListItem/index.tsx (2 occurrences)
  • src/experimental/Forms/EntitySelect/CreateItem/index.tsx
  • src/experimental/Forms/EntitySelect/Content/MainContent/Searcher.tsx
  • src/experimental/Forms/EntitySelect/Content/MainContent/index.tsx

Border radius scale — before / after

Token px Figma Before After
none 0
2xs 4
xs 6
sm 8
DEFAULT (rounded) 10 ✅ (rounded)
md 12
lg 14
xl 16
xxl 20 ❌ missing ✅ added
2xl 24 ✅ (kept)
full 9999

- Add missing `xxl` token (20px / 1.25rem) to borderRadius scale in core and react-native theme.css
- Migrate 11 hardcoded `rounded-[10px]` usages to `rounded` (the DEFAULT token) across web components
@desiree-np desiree-np requested a review from a team as a code owner March 31, 2026 12:29
Copilot AI review requested due to automatic review settings March 31, 2026 12:29
@github-actions github-actions bot added fix core Changes affect packages/core react Changes affect packages/react react-native Changes affect packages/react-native labels Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3805 to install the package

Use pnpm i github:factorialco/f0#18d9b8a740cf9189ef6ca14e0e83b51f5dd37c8a to install this specific commit

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

🔍 Visual review for your branch is published 🔍

Here are the links to:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns border-radius design tokens across the monorepo with the Figma design system, adding the missing xxl size and replacing hardcoded 10px radii with the semantic Tailwind token.

Changes:

  • Add xxl (1.25rem / 20px) to the core border radius token scale and React Native CSS variables.
  • Replace rounded-[10px] with rounded across affected React components/experimental UI to use the semantic default radius.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/core/src/tokens/borderRadius.ts Adds xxl: "1.25rem" to the shared radius token scale.
packages/react-native/src/styles/theme.css Adds --radius-xxl: 1.25rem to keep RN theme variables in sync with tokens.
packages/react/src/ui/InputField/InputField.tsx Uses rounded instead of hardcoded rounded-[10px] for the sm variant (plus formatting changes).
packages/react/src/ui/F0Wizard/components/WizardSteps.tsx Replaces rounded-[10px] with rounded on step buttons (plus formatting changes).
packages/react/src/experimental/Navigation/F0TableOfContent/index.tsx Replaces placeholder rounded-[10px] with rounded (plus formatting changes).
packages/react/src/experimental/Navigation/F0TableOfContent/Item/PrimitiveItem.tsx Replaces rounded-[10px] with rounded on item container (plus formatting changes).
packages/react/src/experimental/Forms/EntitySelect/ListItem/index.tsx Replaces list item rounded-[10px] with rounded (plus formatting changes).
packages/react/src/experimental/Forms/EntitySelect/CreateItem/index.tsx Replaces create-item rounded-[10px] with rounded (plus formatting changes).
packages/react/src/experimental/Forms/EntitySelect/Content/MainContent/Searcher.tsx Replaces searcher rounded-[10px] with rounded (plus formatting changes).
packages/react/src/experimental/Forms/EntitySelect/Content/MainContent/index.tsx Replaces select trigger rounded-[10px] with rounded (plus formatting changes).
packages/react/src/components/F0DurationInput/F0DurationInput.tsx Replaces container rounded-[10px] with rounded (plus formatting changes).
Comments suppressed due to low confidence (1)

packages/react/src/components/F0DurationInput/F0DurationInput.tsx:6

  • This file was reformatted with semicolons, but packages/react is formatted by oxfmt with semi: false and CI runs pnpm --filter @factorialco/f0-react format:check. Please run oxfmt to restore the expected formatting.
import { cva } from "cva";
import {
  Fragment,
  forwardRef,
  useCallback,
  useEffect,

Comment on lines 1 to 4
import { cva } from "cva";
import { AnimatePresence, motion } from "motion/react";
import {
AriaAttributes,
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was reformatted with semicolons, but packages/react/.oxfmtrc.jsonc sets semi: false and CI runs pnpm --filter @factorialco/f0-react format:check. Please re-run pnpm --filter @factorialco/f0-react format (oxfmt) so the formatting matches repo conventions and the PR doesn’t fail the formatting job.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
import { cva } from "cva";

import Check from "@/icons/app/Check"
import { cn, focusRing } from "@/lib/utils"
import { Counter } from "@/ui/Counter"
import Check from "@/icons/app/Check";
import { cn, focusRing } from "@/lib/utils";
import { Counter } from "@/ui/Counter";
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file now uses semicolons, but @factorialco/f0-react enforces oxfmt with semi: false in CI (format:check). Please run the package formatter (oxfmt) so the file matches repo formatting and passes CI.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
import { AnimatePresence, motion } from "motion/react";
import { ReactNode } from "react";

import { ButtonInternal } from "@/components/F0Button/internal"
import { F0Icon } from "@/components/F0Icon"
import { OneEllipsis } from "@/components/OneEllipsis/OneEllipsis"
import { Counter } from "@/ui/Counter"
import { ChevronDown, Handle } from "@/icons/app"
import { useI18n } from "@/lib/providers/i18n"
import { cn, focusRing } from "@/lib/utils"
import { ButtonInternal } from "@/components/F0Button/internal";
import { F0Icon } from "@/components/F0Icon";
import { OneEllipsis } from "@/components/OneEllipsis/OneEllipsis";
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was reformatted with semicolons; however, packages/react uses oxfmt with semi: false and CI runs format:check. Please reformat with oxfmt to avoid failing CI and to reduce formatting-only churn.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +13
} from "react";

import { OneEllipsis } from "@/components/OneEllipsis/OneEllipsis";
import { F1SearchBox } from "@/experimental/Forms/Fields/F1SearchBox";
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file appears to have been reformatted with semicolons, but packages/react/.oxfmtrc.jsonc configures semi: false and CI runs pnpm --filter @factorialco/f0-react format:check. Please run oxfmt so formatting matches repo conventions.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
import { ChevronDown, ChevronRight } from "lucide-react";
import { useState } from "react";

import { F0AvatarPerson } from "@/components/avatars/F0AvatarPerson"
import { F0Button } from "@/components/F0Button"
import { F0Icon } from "@/components/F0Icon"
import { Counter } from "@/ui/Counter"
import { CheckCircle } from "@/icons/app"
import LogoAvatar from "@/icons/app/LogoAvatar"
import { cn } from "@/lib/utils"
import { Checkbox } from "@/ui/checkbox"
import { F0AvatarPerson } from "@/components/avatars/F0AvatarPerson";
import { F0Button } from "@/components/F0Button";
import { F0Icon } from "@/components/F0Icon";
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting: semicolons were introduced here, but packages/react is formatted by oxfmt with semi: false and CI checks format:check. Please run pnpm --filter @factorialco/f0-react format to align formatting.

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 6
import { F0Button } from "@/components/F0Button";
import { Plus } from "@/icons/app";
import { cn } from "@/lib/utils";

import { focusNextFocusable, focusPreviousFocusable } from "../ListItem"
import { focusNextFocusable, focusPreviousFocusable } from "../ListItem";

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file now includes semicolons, which conflicts with the packages/react oxfmt config (semi: false) enforced by CI. Please re-run the formatter (oxfmt) so format:check passes.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
import { Search } from "lucide-react";

import { CrossedCircle } from "@/icons/app"
import { CrossedCircle } from "@/icons/app";

import { F0Icon } from "../../../../../components/F0Icon"
import { focusNextFocusable, focusPreviousFocusable } from "../../ListItem"
import { F0Icon } from "../../../../../components/F0Icon";
import { focusNextFocusable, focusPreviousFocusable } from "../../ListItem";
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was reformatted with semicolons, but packages/react uses oxfmt with semi: false and CI runs format:check. Please run the package formatter (oxfmt) to match repo conventions.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +8
import { VirtualItem } from "@tanstack/react-virtual";
import React, { useCallback, useMemo } from "react";

import { F0Select } from "@/components/F0Select"
import { F0Select } from "@/components/F0Select";

import { Action } from "../../../../../components/F0Select/components/SelectBottomActions"
import { cn } from "../../../../../lib/utils"
import { Spinner } from "@/ui/Spinner"
import { VirtualList } from "../../../../Navigation/VirtualList"
import { CreateItem } from "../../CreateItem"
import { EntitySelectListItem } from "../../ListItem"
import { Action } from "../../../../../components/F0Select/components/SelectBottomActions";
import { cn } from "../../../../../lib/utils";
import { Spinner } from "@/ui/Spinner";
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting: semicolons were introduced, but packages/react is enforced by oxfmt with semi: false in CI (format:check). Please reformat with oxfmt so this passes CI and avoids formatting-only diffs.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 44.98% 10718 / 23828
🔵 Statements 44.25% 11043 / 24952
🔵 Functions 37.05% 2432 / 6564
🔵 Branches 36.46% 6865 / 18826
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/components/F0DurationInput/F0DurationInput.tsx 93.47% 91.54% 93.75% 98.75% 146, 207, 210, 240, 241
packages/react/src/experimental/Forms/EntitySelect/Content/MainContent/Searcher.tsx 0% 0% 0% 0% 8-54
packages/react/src/experimental/Forms/EntitySelect/Content/MainContent/index.tsx 0% 0% 0% 0% 22-555
packages/react/src/experimental/Forms/EntitySelect/CreateItem/index.tsx 0% 0% 0% 0% 7-39
packages/react/src/experimental/Forms/EntitySelect/ListItem/index.tsx 0% 0% 0% 0% 34-318
packages/react/src/experimental/Navigation/F0TableOfContent/index.tsx 19.24% 8.73% 26.08% 19.55% 99-101, 164-259, 281, 301-308, 316-321, 328-339, 350-392, 440-493, 509, 518-597, 611-755, 768-886
packages/react/src/experimental/Navigation/F0TableOfContent/Item/PrimitiveItem.tsx 53.84% 52.08% 14.28% 53.84% 64-152
packages/react/src/ui/Avatar/Avatar.tsx 100% 75% 100% 100%
packages/react/src/ui/F0Wizard/components/WizardSteps.tsx 89.28% 84.61% 87.5% 88.46% 82-84
packages/react/src/ui/InputField/InputField.tsx 80% 85.88% 86.66% 80% 310, 348-349, 362-376, 386-387
Generated in workflow #12418 for commit 3c53c0a by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

📱 Expo Go Preview Published

  • Branch: development
  • Message: fix(tokens): add background-promote-bold to RN theme and use rounded-xxl in Avatar
  • Group ID: 7d873998-0044-481a-9ef4-accb4753a7b8
  • Created at: 2026-03-31T15:28:37.926Z

Links

QR Code

Expo Go Preview QR

Copilot AI review requested due to automatic review settings March 31, 2026 15:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

size: {
sm: "rounded-[10px]",
sm: "rounded",
md: "rounded-[12px]",
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this variant map, md still uses an arbitrary rounded-[12px] value while sm was migrated to the semantic token. Since core tokens define md (12px), consider switching md to rounded-md as well to keep border radius usage consistently token-based and easier to maintain.

Suggested change
md: "rounded-[12px]",
md: "rounded-md",

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 12
md: "0.75rem",
lg: "0.875rem",
xl: "1rem",
xxl: "1.25rem",
"2xl": "1.5rem",
full: "9999px",
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the new xxl border radius token is good, but some React APIs enumerate border-radius tokens manually (e.g. packages/react/src/components/F0Box/types.ts and utils/border.ts) and currently don’t include xxl. That makes the new token unavailable/inconsistent for consumers using those token-based props. Please update any such token unions/mappings to include xxl (and its per-corner variants) so the token is fully supported across the design system.

Copilot uses AI. Check for mistakes.
Comment on lines 272 to 279
--color-f0-background-accent-bold: var(--f0-background-accent-bold);
--color-f0-background-accent-bold-hover: var(
--f0-background-accent-bold-hover
);
--color-f0-background-promote: var(--f0-background-promote);
--color-f0-background-promote-bold: var(--f0-background-promote-bold);
--color-f0-background-promote-hover: var(--f0-background-promote-hover);
--color-f0-background-critical: var(--f0-background-critical);
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is described as a border-radius token alignment, but this file also adds a new --color-f0-background-promote-bold mapping and defines --f0-background-promote-bold for light/dark variants. If this is intentional, please update the PR description to reflect the additional color-token change (or move it to a separate PR) to keep scope clear.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@sauldom102 sauldom102 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are defining here xxl border radius but we already have 2xl 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes affect packages/core fix react Changes affect packages/react react-native Changes affect packages/react-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants