Add additional blazor tags for button, highlight and splitter#2241
Conversation
There was a problem hiding this comment.
Pull request overview
Updates component API metadata annotations used by the Blazor generator/analyzer (targeting a Blazor 7.2.x update), primarily by marking certain option/event argument shapes as plain JSON objects and adjusting Blazor-specific type metadata.
Changes:
- Add
/* jsonAPIPlainObject */annotations for splitter resize event args and highlight navigation options. - Switch
HighlightNavigationfrom a type alias to an interface to support analyzer metadata. - Add Blazor-specific metadata for button
commandForElement, and suppress Blazor generation for chatresourceStrings.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/splitter/types.ts | Marks IgcSplitterResizeEventArgs as a plain JSON object for interop tooling. |
| src/components/highlight/service.ts | Marks HighlightNavigation as a plain JSON object and changes it to an interface for metadata support. |
| src/components/chat/chat.ts | Adds /* blazorSuppress */ to resourceStrings to affect Blazor API generation. |
| src/components/button/button-base.ts | Adds /* alternateType: object */ for commandForElement accessors to guide Blazor type mapping. |
Comments suppressed due to low confidence (1)
src/components/chat/chat.ts:320
- This change adds a Blazor analyzer directive on
resourceStrings, but the PR title/description only mention button/highlight/splitter. Please update the PR metadata (title/description) to include the chat change or explain why this directive is required for the Blazor 7.2.x update, to avoid an undocumented API-generation change forigc-chat.
/* blazorSuppress */
/**
* The resource strings of the chat.
*/
@property({ attribute: false })
public set resourceStrings(
| /* blazorCSSuppress */ | ||
| /* alternateType: object */ |
There was a problem hiding this comment.
@mddragnev If this is already CS-suppressed, what caused the need for alt object?
There was a problem hiding this comment.
blazorCSSuppress is not entirely suppressing the member but the api analyzer generates it and marks it as BlazorSuppressWidgetMember then the blazor translator skip it. I guess that it has no use now when we dont have our react components using the translator. If you insist I can change that to blazorSuppress and remove the alternateType
There was a problem hiding this comment.
blazorSuppress it then (aka full hide)
This is needed when updating blazor to 7.2.x
Description
Type of Change
Related Issues
Closes #
Testing
Checklist