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

feat: custom feedback icons #43894

Merged
merged 26 commits into from Sep 4, 2023
Merged

feat: custom feedback icons #43894

merged 26 commits into from Sep 4, 2023

Conversation

gldio
Copy link
Contributor

@gldio gldio commented Jul 29, 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 #20245

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English customFeedbackIcons prop added to Form.Item component and It is used with hasFeedback as default feedback icons. This prop replaces the feedback icons with the given ones with ones.
🇨🇳 Chinese customFeedbackIcons 属性添加到 Form.Item 组件,并与 hasFeedback 一起用作默认反馈图标。 此道具将反馈图标替换为给定的图标。

☑️ 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 13b57be

This pull request adds a new feature to the Form.Item component that enables users to customize the feedback icons for validation states. It modifies the component code, the test file, and the documentation files to support this feature. It also adds a new demo file and a markdown file to showcase the feature with an example.

🔍 Walkthrough

🤖 Generated by Copilot at 13b57be

  • Add customFeedbackIcons prop to Form.Item component to allow customizing the feedback icons for different validation statuses (link, link, link, link, link)
  • Import AlertFilled icon from @ant-design/icons package for use in test case and demo (link, link)
  • Add test case for customFeedbackIcons feature in components/form/__tests__/index.test.tsx file, using AlertFilled icon wrapped in Tooltip component as custom error icon (link)
  • Add demo file for customFeedbackIcons feature in components/form/demo/custom-feedback-icons.tsx file, using AlertFilled icon wrapped in Tooltip component as custom error icon and antd-style package to enable pointer events on feedback icon (link)
  • Add markdown file for customFeedbackIcons demo in components/form/demo/custom-feedback-items.md file, with brief description in Chinese and English and code block referencing demo file (link)
  • Add entry for customFeedbackIcons demo to Examples section of English documentation for Form component in components/form/index.en-US.md file, using <code> tag to embed demo file and enable debugging mode (link)
  • Add entry for customFeedbackIcons prop to Form.Item section of English documentation for Form.Item component in components/form/index.en-US.md file, describing prop, type, default value, and version availability (link)
  • Add entry for customFeedbackIcons demo to 代码演示 section of Chinese documentation for Form component in components/form/index.zh-CN.md file, using <code> tag to embed demo file and enable debugging mode (link)
  • Add entry for customFeedbackIcons prop to Form.Item section of Chinese documentation for Form.Item component in components/form/index.zh-CN.md file, describing prop, type, default value, and version availability (link)

@stackblitz
Copy link

stackblitz bot commented Jul 29, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2023

@gldio gldio changed the title feat: custom feedback items feat: custom feedback icons Jul 29, 2023
@argos-ci
Copy link

argos-ci bot commented Jul 29, 2023

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

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 18 changes Sep 4, 2023, 12:31 PM

@gldio gldio requested a review from afc163 July 31, 2023 13:09
@afc163
Copy link
Member

afc163 commented Aug 9, 2023

ci failed, please check it.

@arvinxx arvinxx removed their request for review August 9, 2023 05:32
@gldio
Copy link
Contributor Author

gldio commented Aug 9, 2023

ci failed, please check it.

I fixed a failed test but it's not a test that I wrote. Btw, should I commit the jest snaps? I didn't commit them because there are 45 snaps changed that it's kind of strange to me.

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (85dc67f) 100.00% compared to head (2b54846) 100.00%.
Report is 2 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #43894   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          678       678           
  Lines        11429     11434    +5     
  Branches      3080      3085    +5     
=========================================
+ Hits         11429     11434    +5     
Files Changed Coverage Δ
components/form/Form.tsx 100.00% <ø> (ø)
components/form/FormItem/index.tsx 100.00% <ø> (ø)
components/form/context.tsx 100.00% <ø> (ø)
components/form/FormItem/ItemHolder.tsx 100.00% <100.00%> (ø)

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

@gldio
Copy link
Contributor Author

gldio commented Aug 16, 2023

I changed and commited the new snaps. It passed all checks but "argos" is waiting for your decision.

Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: Gunay <gladio@gmail.com>
gldio and others added 2 commits August 16, 2023 16:33
Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: Gunay <gladio@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: Gunay <gladio@gmail.com>
@gldio gldio requested a review from afc163 August 16, 2023 15:16
@afc163
Copy link
Member

afc163 commented Aug 23, 2023

Conflicting

Signed-off-by: Gunay <gladio@gmail.com>
@gldio
Copy link
Contributor Author

gldio commented Aug 23, 2023

Conflicting

Resolved.

Signed-off-by: afc163 <afc163@gmail.com>
Signed-off-by: afc163 <afc163@gmail.com>
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.

None yet

6 participants