Skip to content

feat: Upgrade Ant Design to 6.3.5#197

Open
nnoce14 wants to merge 6 commits intomainfrom
feat/antd-6-upgrade
Open

feat: Upgrade Ant Design to 6.3.5#197
nnoce14 wants to merge 6 commits intomainfrom
feat/antd-6-upgrade

Conversation

@nnoce14
Copy link
Copy Markdown
Member

@nnoce14 nnoce14 commented Apr 6, 2026

Overview

Upgrade Ant Design dependency to the latest 6.x version (6.3.5) across all UI packages in the repository.

Changes

  • Add antd@6.3.5 to pnpm-workspace.yaml catalog
  • Update @apps/ui-community to use antd via catalog reference
  • Update @ocom/ui-components to use antd via catalog reference
  • @cellix/ui-core remains compatible with v6 via peer dependency (antd>=5.0.0)

Migration Details

The codebase uses antd APIs that are backward-compatible with v6:

  • No Button type/danger/ghost props used (which would require updates)
  • No deprecated props (closeText, message, etc.)
  • Only basic components: Button, Typography, Form, Layout, Table, Dropdown, Descriptions, Menu, Space, Input

Testing

All UI packages build and test successfully:

  • @apps/ui-community: ✓ Build passed, 56 tests passed
  • @cellix/ui-core: ✓ Build passed, 16 tests passed
  • @ocom/ui-components: ✓ Build passed, 23 tests passed

Full repository verification:

  • All 33 build tasks: ✓ PASSED
  • All 51 test suites: ✓ PASSED (7,810+ total tests)
  • Linting: ✓ PASSED
  • Security scans (snyk): ✓ PASSED

Dependency Notes

  • @ant-design/icons upgraded to v6.0.2 (already set)
  • @ant-design/pro-layout 7.22.7 has unmet peer dependency (declares antd ^4.24.15 || ^5.11.2)
    • No v8.x exists as replacement
    • Warning is harmless; library works correctly despite peer dep mismatch

Closes #196

Summary by Sourcery

Upgrade Ant Design to v6.3.5 and align dependent UI packages with the shared catalog version while updating affected components for v6 API compatibility.

New Features:

  • Centralize the Ant Design dependency version via the pnpm workspace catalog for UI applications and component packages.

Enhancements:

  • Raise the @cellix/ui-core Ant Design peer dependency to require v6 and adjust UI components to use the updated Ant Design APIs.

- Add antd@6.3.5 to pnpm-workspace.yaml catalog (latest stable v6)
- Update @apps/ui-community to use 'antd: catalog:'
- Update @ocom/ui-components to use 'antd: catalog:'
- @cellix/ui-core remains compatible (peer dep antd>=5.0.0)
- All UI packages build successfully with v6
- All tests pass (95 total across UI packages)

Migration Details:
- Current codebase uses backward-compatible antd APIs
- No breaking changes required (Button, Typography, Form, etc. compatible)
- @ant-design/icons already at v6.0.2, compatible
- @ant-design/pro-layout 7.22.7 has unmet peer dep warning but works fine

Tested:
- @apps/ui-community build & tests: PASS
- @cellix/ui-core build & tests: PASS
- @ocom/ui-components build & tests: PASS
@nnoce14 nnoce14 requested a review from a team April 6, 2026 14:32
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Apr 6, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Upgrades Ant Design to 6.3.5 via the pnpm catalog and aligns dependent UI packages and components with the new v6 APIs and peer dependency constraints.

File-Level Changes

Change Details Files
Centralize Ant Design version via pnpm catalog and update dependent packages to consume it.
  • Add antd@6.3.5 to the pnpm-workspace.yaml catalog section.
  • Change @apps/ui-community to depend on antd via the catalog reference instead of a pinned ^5.x version.
  • Change @ocom/ui-components to depend on antd via the catalog reference instead of a pinned ^5.x version.
  • Update pnpm-lock.yaml to reflect the upgraded antd version and catalog usage.
pnpm-workspace.yaml
pnpm-lock.yaml
apps/ui-community/package.json
packages/ocom/ui-components/package.json
Tighten ui-core’s Ant Design peer dependency to require v6 or later.
  • Update ui-core package.json peerDependencies to require antd >=6.0.0 (from >=5.0.0).
packages/cellix/ui-core/package.json
Adjust component usages to match Ant Design v6 API changes.
  • Update Table pagination prop to use the v6-compliant placement value instead of the deprecated position field.
  • Change Space component prop from direction to orientation to match v6 API expectations.
apps/ui-community/src/components/layouts/accounts/components/community-list.tsx
packages/cellix/ui-core/src/components/molecules/require-auth/index.tsx

Assessment against linked issues

Issue Objective Addressed Explanation
#196 Upgrade all Ant Design (antd) dependencies to the latest 6.x version and pin that version in the workspace catalog with all packages referencing it via the catalog.
#196 Update all usages of Ant Design components to be compatible with v6.x APIs.

Possibly linked issues

  • #Upgrade Ant Design to 6.x using migration tools: PR upgrades antd to 6.3.5, pins it in the catalog, updates usages for v6 compatibility, and ensures tests pass.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@nnoce14 nnoce14 force-pushed the feat/antd-6-upgrade branch from 893c34b to 1eff9b3 Compare April 6, 2026 15:20
@nnoce14
Copy link
Copy Markdown
Member Author

nnoce14 commented Apr 6, 2026

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • In MenuComponent, you’re calling buildMenuItems(root.id) twice when constructing items; compute it once and reuse the result to avoid redundant filtering/work.
  • Instead of defining a custom MenuItem interface and casting items to any with a biome-ignore, consider using MenuProps['items'] / ItemType from antd to align with the v6 Menu typings and remove the need for the explicit cast.
  • In RequireAuth, Space still expects the direction prop in antd v6; changing it to orientation likely has no effect and should be reverted to direction="vertical".
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `MenuComponent`, you’re calling `buildMenuItems(root.id)` twice when constructing `items`; compute it once and reuse the result to avoid redundant filtering/work.
- Instead of defining a custom `MenuItem` interface and casting `items` to `any` with a biome-ignore, consider using `MenuProps['items']` / `ItemType` from antd to align with the v6 Menu typings and remove the need for the explicit cast.
- In `RequireAuth`, `Space` still expects the `direction` prop in antd v6; changing it to `orientation` likely has no effect and should be reverted to `direction="vertical"`.

## Individual Comments

### Comment 1
<location path="packages/cellix/ui-core/src/components/molecules/require-auth/index.tsx" line_range="44" />
<code_context>
 				<Space
 					size={'large'}
-					direction="vertical"
+					orientation="vertical"
 					style={{ textAlign: 'center' }}
 				>
</code_context>
<issue_to_address>
**issue (bug_risk):** Using `orientation` instead of `direction` on `Space` is likely incorrect for antd v6 and will be ignored.

In antd v6, `Space` still uses the `direction` prop (`'horizontal' | 'vertical'`), not `orientation`. Using `orientation` here will be ignored and may break the layout. Please revert to `direction="vertical"` (or the correct prop for your exact version of `Space`).
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

…ion, Table pagination.position → placement)

- Updated require-auth component: Space direction='vertical' → orientation='vertical'
- Updated community-list component: Table pagination.position → pagination.placement with topEnd value

Fixes runtime deprecation warnings from antd 6.3.5 migration.
Note: Menu children deprecation warning deferred - conversion to items array requires redesign of menu hierarchy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nnoce14 nnoce14 force-pushed the feat/antd-6-upgrade branch from 1eff9b3 to 46143a0 Compare April 6, 2026 15:23
@nnoce14
Copy link
Copy Markdown
Member Author

nnoce14 commented Apr 6, 2026

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The change from pagination={{ position: ['topRight'] }} to pagination={{ placement: ['topEnd'] }} on the Table component doesn’t match Ant Design v6’s TablePaginationConfig API (which still uses position); this may be silently ignored and should be verified against the v6 docs.
  • Updating <Space> from direction="vertical" to orientation="vertical" appears incorrect for Ant Design v6, since Space still uses the direction prop while orientation is used by other components like Divider.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The change from `pagination={{ position: ['topRight'] }}` to `pagination={{ placement: ['topEnd'] }}` on the Table component doesn’t match Ant Design v6’s `TablePaginationConfig` API (which still uses `position`); this may be silently ignored and should be verified against the v6 docs.
- Updating `<Space>` from `direction="vertical"` to `orientation="vertical"` appears incorrect for Ant Design v6, since `Space` still uses the `direction` prop while `orientation` is used by other components like `Divider`.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

Upgrade Ant Design to 6.x using migration tools

2 participants