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(module: typography): Fix OnCopy not invoked when Text is null or empty #2098

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

LeaFrock
Copy link
Contributor

@LeaFrock LeaFrock commented Nov 8, 2021

🤔 This is a ...

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

🔗 Related issue link

💡 Background and solution

When using copyable components inheritting TypographyBase, such as AntDesign.Text, if the value of CopyConfig.Text is null or empty, the OnCopy action will be ignored. So developers cannot set self-defined content and inform the user of a message like 'Copied!' at the same time. And also the current doc/demo doesn't mention this, so I think it's a bug.
The solution is to change the codes of Copy method.

📝 Changelog

Language Changelog
🇺🇸 English Fix OnCopy not invoked when Text is null or empty
🇨🇳 Chinese 修复Text为null或空字符时OnCopy未被执行的问题

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

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

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

Prepare preview

@codecov
Copy link

codecov bot commented Nov 10, 2021

Codecov Report

Merging #2098 (7275ebb) into master (f48f61d) will increase coverage by 2.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2098      +/-   ##
==========================================
+ Coverage   27.86%   29.94%   +2.07%     
==========================================
  Files         492      515      +23     
  Lines       32493    24746    -7747     
  Branches        0      240     +240     
==========================================
- Hits         9055     7409    -1646     
+ Misses      23438    17301    -6137     
- Partials        0       36      +36     
Impacted Files Coverage Δ
components/typography/TypographyBase.cs 28.12% <0.00%> (+3.12%) ⬆️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/locale-provider/LocaleProvider.cs 54.54% <0.00%> (-7.96%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
components/core/Helpers/DateHelper.cs 80.00% <0.00%> (-2.71%) ⬇️
components/timeline/Timeline.razor.cs 63.21% <0.00%> (-2.24%) ⬇️
...onents/date-picker/internal/DatePickerHeader.razor 45.71% <0.00%> (-1.91%) ⬇️
... and 424 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f48f61d...7275ebb. Read the comment docs.

@ElderJames ElderJames merged commit b2d24d1 into ant-design-blazor:master Nov 10, 2021
ElderJames pushed a commit that referenced this pull request Apr 23, 2022
ElderJames pushed a commit that referenced this pull request Apr 30, 2022
ElderJames pushed a commit that referenced this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants