Skip to content

fix(types): use Partial<ITextGraphicAttribute> for TextIcon style#5104

Open
william-xue wants to merge 1 commit intoVisActor:developfrom
william-xue:fix/3967-text-icon-style-type
Open

fix(types): use Partial<ITextGraphicAttribute> for TextIcon style#5104
william-xue wants to merge 1 commit intoVisActor:developfrom
william-xue:fix/3967-text-icon-style-type

Conversation

@william-xue
Copy link
Copy Markdown

The TextIcon.style field was typed as ITextAttribute which:

  1. Did not include fill and other graphic attributes from IGraphicAttribute
  2. Required all properties to be specified (none were optional)

Change to Partial which extends both IGraphicAttribute and ITextAttribute with all properties optional, allowing partial style definitions with fill support.

Closes #3967

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

💡 Background and solution

📝 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

copilot:summary

🔍 Walkthrough

copilot:walkthrough

The TextIcon.style field was typed as ITextAttribute which:
1. Did not include fill and other graphic attributes from IGraphicAttribute
2. Required all properties to be specified (none were optional)

Change to Partial<ITextGraphicAttribute> which extends both
IGraphicAttribute and ITextAttribute with all properties optional,
allowing partial style definitions with fill support.

Closes VisActor#3967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 使用register.icon时,style中提示没有fill属性。定义style时,需要定义所有属性,否则有告警

1 participant