Skip to content

Conversation

@ChrisPulman
Copy link
Member

@ChrisPulman ChrisPulman commented Jan 25, 2026

What kind of change does this PR introduce?

Fixes #375

What is the current behavior?

Xml Comments are not generated correctly on [Reactive] attributes placed on partial properties.
Xml Comments are not generated correctly on [ReactiveCommand] Properties.

What is the new behavior?

This update enhances the source generator to extract and include XML documentation comments for generated properties, improving IntelliSense and documentation.
It also updates the PropertyInfo model to store XML comments, adjusts code generation to use these comments, and adds a summary for an internal test property.

Added support to extract and include XML documentation comments from method symbols into the generated command properties.
This helps retain developer documentation in the generated code for better maintainability and IntelliSense support.

Minor code cleanup and a new .slnx solution file are included.

What might this PR break?

Bug fix no change in operation

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

This update enhances the source generator to extract and include XML documentation comments for generated properties, improving IntelliSense and documentation. It also updates the PropertyInfo model to store XML comments, adjusts code generation to use these comments, and adds a summary for an internal test property. Minor code cleanup and a new .slnx solution file are included.
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 20.58824% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.33%. Comparing base (0a67b63) to head (6deebd2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ators.Roslyn/Reactive/ReactiveGenerator.Execute.cs 26.31% 14 Missing ⚠️
...eactiveCommand/ReactiveCommandGenerator.Execute.cs 0.00% 11 Missing ⚠️
...ators.Roslyn/ReactiveCommand/Models/CommandInfo.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #377      +/-   ##
==========================================
- Coverage   43.52%   43.33%   -0.20%     
==========================================
  Files          75       75              
  Lines        3993     4020      +27     
  Branches      485      488       +3     
==========================================
+ Hits         1738     1742       +4     
- Misses       2096     2119      +23     
  Partials      159      159              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Added support to extract and include XML documentation comments from method symbols into the generated command properties. This helps retain developer documentation in the generated code for better maintainability and IntelliSense support.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for XML documentation comments in source-generated properties and commands for the [Reactive] and [ReactiveCommand] attributes, addressing issue #375. The implementation extracts XML documentation from annotated members using Roslyn's GetDocumentationCommentXml API and includes it in the generated code.

Changes:

  • Enhanced PropertyInfo and CommandInfo models to store XML documentation comments
  • Implemented XML comment extraction logic in both ReactiveGenerator and ReactiveCommandGenerator
  • Added example XML documentation to test view model
  • Fixed inheritdoc cref formatting issue (removed incorrect "this." prefix)

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ReactiveCommandGenerator.Execute.cs Adds XML documentation extraction from method symbols and includes it in generated command properties
CommandInfo.cs Extends model with XmlComment property to store extracted documentation
ReactiveGenerator.Execute.cs Adds XML documentation extraction from property symbols with fallback to inheritdoc for partial properties
PropertyInfo.cs Extends model with XmlComment property to store extracted documentation
FieldSyntaxExtensions.cs Adds unused System.Linq and CSharp.Syntax imports
TestViewModel.cs Adds example XML documentation comment for internal test property
ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs Fixes inheritdoc cref reference from "this.value" to "value"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glennawatson glennawatson merged commit dff50fe into main Jan 26, 2026
12 checks passed
@glennawatson glennawatson deleted the CP_FixXmlDocsPartialReactivePropAttribute branch January 26, 2026 00:59
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.

[Bug]: XML documentation is not propagated to generated members for [Reactive] partial properties and [ReactiveCommand]

3 participants