Skip to content

refactor: migrate checkbox to dify-ui#36295

Merged
lyzno1 merged 8 commits into
mainfrom
codex/migrate-checkbox
May 18, 2026
Merged

refactor: migrate checkbox to dify-ui#36295
lyzno1 merged 8 commits into
mainfrom
codex/migrate-checkbox

Conversation

@lyzno1
Copy link
Copy Markdown
Member

@lyzno1 lyzno1 commented May 18, 2026

Summary

  • Migrated all non-group checkboxes in web to @langgenius/dify-ui/checkbox
  • Removed the legacy web/app/components/base/checkbox implementation, tests, and stories to consolidate on the new primitive
  • Aligned controlled APIs with Base UI semantics by standardizing on checked, onCheckedChange, and indeterminate
  • Cleaned up legacy compatibility props such as onCheck, ariaLabel, and ariaLabelledBy, replacing them with native label composition patterns or aria-label only where necessary
  • Refactored several call sites to improve label/clickable composition and reduce mechanical toggle patterns

Testing

  • pnpm --dir packages/dify-ui test src/checkbox src/checkbox-group
  • pnpm --dir web type-check
  • pnpm --dir web test ... covering representative migration scenarios including dataset, plugin, form, annotation, and install flow related cases

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. javascript Pull requests that update javascript code refactor labels May 18, 2026
@lyzno1 lyzno1 changed the title refactor: 迁移 checkbox 到 dify-ui 并删除旧 base 组件 refactor: migrate checkbox to dify-ui May 18, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 93.67089% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.93%. Comparing base (1925d58) to head (a08a7dc).

Files with missing lines Patch % Lines
web/app/components/app/annotation/list.tsx 83.33% 1 Missing ⚠️
...figuration/config-var/config-modal/form-fields.tsx 75.00% 1 Missing ⚠️
...e/step-two/components/general-chunking-options.tsx 88.88% 1 Missing ⚠️
...documents/detail/completed/components/menu-bar.tsx 50.00% 1 Missing ⚠️
...tasets/documents/detail/completed/segment-list.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #36295      +/-   ##
==========================================
- Coverage   85.94%   85.93%   -0.01%     
==========================================
  Files        4458     4456       -2     
  Lines      211298   211260      -38     
  Branches    39503    39487      -16     
==========================================
- Hits       181593   181556      -37     
+ Misses      26501    26500       -1     
  Partials     3204     3204              
Flag Coverage Δ
dify-ui 94.59% <ø> (ø)
web 86.55% <93.67%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1 lyzno1 enabled auto-merge May 18, 2026 05:17
@lyzno1 lyzno1 added this pull request to the merge queue May 18, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 18, 2026
Merged via the queue into main with commit e2c52c9 May 18, 2026
33 checks passed
@lyzno1 lyzno1 deleted the codex/migrate-checkbox branch May 18, 2026 05:34
zhangtaodemama added a commit to zhangtaodemama/langgenius-dify-bfaadcb0c706 that referenced this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer refactor size:XL This PR changes 500-999 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants