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

Tag Tests & Updates #2816

Merged

Conversation

kooliokey
Copy link
Contributor

@kooliokey kooliokey commented Oct 19, 2022

  • Add more tests for Tag.
  • Deprecate PresetColor in favor of using Color.
    • This matches the react library better and prevents confusion.
    • The PresetColor parameter is nullable but throws if you set it to null and it uses the logic in Color behind the scenes anyway.
  • Update documentation for Tag to remove PresetColor to discourage future usage and indicate a default value for Color

🤔 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

#2644

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix bug with tag color change after render not always styling properly.
🇨🇳 Chinese

☑️ 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 Oct 19, 2022

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Base: 40.20% // Head: 41.67% // Increases project coverage by +1.46% 🎉

Coverage data is based on head (dbbffac) compared to base (0de1573).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2816      +/-   ##
==========================================
+ Coverage   40.20%   41.67%   +1.46%     
==========================================
  Files         544      544              
  Lines       25739    25736       -3     
  Branches      260      260              
==========================================
+ Hits        10349    10726     +377     
+ Misses      15350    14970     -380     
  Partials       40       40              
Impacted Files Coverage Δ
components/tag/Tag.razor.cs 88.73% <100.00%> (+5.87%) ⬆️
components/select/Select.razor.cs 53.18% <0.00%> (+0.26%) ⬆️
components/select/SelectBase.cs 71.19% <0.00%> (+0.27%) ⬆️
components/input/Input.cs 67.25% <0.00%> (+0.35%) ⬆️
components/date-picker/DatePicker.Razor.cs 77.48% <0.00%> (+0.66%) ⬆️
components/core/CssSizeLength.cs 86.07% <0.00%> (+1.07%) ⬆️
components/grid/Col.razor.cs 96.00% <0.00%> (+1.33%) ⬆️
components/date-picker/internal/DatePickerBase.cs 70.57% <0.00%> (+1.60%) ⬆️
components/core/Extensions/JSRuntimeExtensions.cs 53.33% <0.00%> (+3.33%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ElderJames
Copy link
Member

Thanks for contribute this @kooliokey ! Please leave the PersetColor parameter as the same as Color. This will reduce breaking changes.

@kooliokey
Copy link
Contributor Author

kooliokey commented Oct 20, 2022

Thanks for contribute this @kooliokey ! Please leave the PersetColor parameter as the same as Color. This will reduce breaking changes.

Hi! The changes should not introduce any breaking changes and in fact they fix a bug I found with tag - if you have it set to default color, then to a custom/preset, then back to default color it doesn't style currently. This change set fixed it. I think the only way it would be a breaking change is if someone had the Obsolete tag as an error in their builds. Do you want me to take that out?

Here is what it does now:
image

Click "Change Color"

image

Click "Change Color" again
image

With the code in this PR, the final step results in the correct styling as in step 1.

Sample Code:
image

@ElderJames
Copy link
Member

Obsolete attribute is ok. 👍

@ElderJames ElderJames merged commit b5ad920 into ant-design-blazor:master Oct 20, 2022
@ElderJames ElderJames mentioned this pull request Oct 28, 2022
62 tasks
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