Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: color picker open popup when disabled #44466

Merged
merged 1 commit into from Aug 28, 2023
Merged

Conversation

RedJue
Copy link
Member

@RedJue RedJue commented Aug 28, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #44463

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix color picker open popup when disabled
🇨🇳 Chinese 修复禁用时颜色选择器弹出窗口的问题

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at 53fed84

This pull request enhances the color picker component by fixing a bug, improving the test coverage, and refining the code style. It prevents the ColorPicker popup from being toggled when the component is disabled, adds a test case for this scenario, and reorders the imports in ColorPicker.tsx and index.test.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at 53fed84

  • Fix bug select搜索功能体验优化建议 #33376 that allows opening color picker popup when disabled by checking the disabled prop before toggling the popup (link)
  • Add test case for the bug fix to verify that the popup does not show when the color picker is disabled (link)
  • Reorder import statements alphabetically in both files as a code style convention (link, link)
  • Import Button component in index.test.tsx to use it in the new test case (link)
  • Remove empty line at the beginning of ColorPicker.tsx as a minor code style improvement (link)

@stackblitz
Copy link

stackblitz bot commented Aug 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 388.58 KB (+4 B 🔺)
./dist/antd-with-locales.min.js 447.5 KB (+2 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Aug 28, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Aug 28, 2023, 9:37 AM

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (bbbc3d9) 100.00% compared to head (a738b38) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #44466   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          661       661           
  Lines        11231     11231           
  Branches      3042      3042           
=========================================
  Hits         11231     11231           
Files Changed Coverage Δ
components/color-picker/ColorPicker.tsx 100.00% <100.00%> (ø)

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

@MadCcc MadCcc merged commit 2d1d987 into master Aug 28, 2023
88 checks passed
@MadCcc MadCcc deleted the fix-color-picker-disabled branch August 28, 2023 12:16
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.

【ColorPicker】禁用后点击组件再启用组件会直接弹出颜色选择
5 participants