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: checkbox ref type #44746

Conversation

LexiosAlex
Copy link
Contributor

@LexiosAlex LexiosAlex commented Sep 10, 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 #44725

💡 Background and solution

To reproduce please check related issue link

Changed HTMLInputElement to CheckboxRef so for external usage for now checkbox should have a properly defined type

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 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 db4fb7b

Updated CheckboxRef type import and export to match rc-checkbox dependency and moved them to the top of components/checkbox/index.ts. This improves type compatibility and code organization.

🔍 Walkthrough

🤖 Generated by Copilot at db4fb7b

  • Move and update the import and export of CheckboxRef type to match the upstream changes in rc-checkbox (link)

@stackblitz
Copy link

stackblitz bot commented Sep 10, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 10, 2023

Prepare preview

@github-actions
Copy link
Contributor

  • 🚨 Please fill changelog in the PR

    • Write with a developer-oriented perspective and narrative method, without describing the details of the repair
    • Describing the problem and the impact on the developer
    • describing the user-first site problem, not your solution
    • Refer: https://ant.design/changelog#501
  • 🚨 请填写 PR 中的 changelog

    • 请用面向开发者的角度叙述方式撰写,不描述修复细节
    • 描述问题和对开发者的影响
    • 描述用户第一现场的问题,而非你的解决方式
    • 参考:https://ant.design/changelog-cn#501

@LexiosAlex LexiosAlex changed the title fix: checkbox ref #44725 fix: checkbox ref type Sep 10, 2023
@argos-ci
Copy link

argos-ci bot commented Sep 10, 2023

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

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 change Sep 12, 2023, 2:18 AM

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5b75f3f) 100.00% compared to head (74a69ce) 100.00%.
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #44746   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          680       681    +1     
  Lines        11427     11526   +99     
  Branches      3073      3103   +30     
=========================================
+ Hits         11427     11526   +99     
Files Changed Coverage Δ
components/checkbox/index.ts 100.00% <ø> (ø)

... and 75 files with indirect coverage changes

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

@afc163
Copy link
Member

afc163 commented Sep 11, 2023

ci broken

@LexiosAlex
Copy link
Contributor Author

LexiosAlex commented Sep 11, 2023

ci broken

Thanks, will address the lint changes

image

And for the screenhshot test, are you sure this test isn`t flaky? Is it possible to run this again?

@@ -1,10 +1,10 @@
import * as React from 'react';
import Checkbox from '..';
import Checkbox, { CheckboxRef } from '..';
Copy link
Member

Choose a reason for hiding this comment

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

Import "CheckboxRef" is only used as types. (@typescript-eslint/consistent-type-imports)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@afc163 afc163 merged commit 242769e into ant-design:master Sep 12, 2023
52 checks passed
@MadCcc MadCcc mentioned this pull request Sep 15, 2023
20 tasks
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.

3 participants