Skip to content

add receiver components to docs, fix events cropper component desc, fix error during blazor server prerendering in dispose methods#453

Merged
ColdForeign merged 37 commits intofeature/add_typescript_for_projectfrom
feature/add_receivers_comp_to_docs
Feb 3, 2026
Merged

add receiver components to docs, fix events cropper component desc, fix error during blazor server prerendering in dispose methods#453
ColdForeign merged 37 commits intofeature/add_typescript_for_projectfrom
feature/add_receivers_comp_to_docs

Conversation

@MaxymGorn
Copy link
Member

@MaxymGorn MaxymGorn commented Jan 13, 2026

Target

  • Add receiver components to docs
  • Fix events cropper component desc
  • Fix error during blazor server prerendering in dispose methods

Open Questions

Checklist

  • Tests cover new or modified code
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the site documentation
  • I have made corresponding changes to the README, NuGet README file
  • My changes generate no new warnings
  • New dependencies added or updated
  • Includes breaking changes
  • Version bumped

Visuals

@MaxymGorn MaxymGorn requested a review from ColdForeign January 15, 2026 19:46
@MaxymGorn MaxymGorn changed the title add receiver components to docs add receiver components to docs, fix events cropper component desc Jan 15, 2026
@MaxymGorn MaxymGorn added documentation Improvements or additions to documentation .NET Pull requests that update .net code labels Jan 15, 2026
@MaxymGorn MaxymGorn closed this Jan 15, 2026
@MaxymGorn MaxymGorn reopened this Jan 15, 2026
Copy link
Contributor

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 PR enhances the documentation system by adding support for receiver components (CroppedCanvasReceiver and ImageReceiver) in the API documentation, improves event parameter documentation with more detailed descriptions, and consolidates the API page routing. The changes also include service worker lifecycle improvements and infrastructure updates for better documentation generation.

Changes:

  • Enhanced XML documentation for CropperComponent events with detailed parameter descriptions
  • Added receiver components (CroppedCanvasReceiver, ImageReceiver) to the API documentation menu and routing
  • Consolidated Api.razor into DataContract.razor for unified API page handling
  • Extended documentation compiler to generate class-level descriptions and support for component contracts
  • Updated service worker to improve update detection and lifecycle management

Reviewed changes

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

Show a summary per file
File Description
CropperComponent.razor.cs Improved component XML documentation summary
CropperComponent.razor.Events.cs Enhanced event parameter documentation with detailed descriptions
CropperComponent.razor.Queries.cs Removed duplicate component-level documentation
CropperComponent.razor.Commands.cs Removed duplicate component-level documentation
CroppedCanvasReceiver.cs Enhanced parameter documentation with cross-references
TypeNameHelper.cs Added generic argument formatter support for HTML link generation
MethodInfoExtensions.cs Extended TypeName method with generic part control and MemoryStream link support
DocStrings.cs (Compiler) Added class documentation generation and enum description support
sw-registrator.js Added service worker update logging and controller change handling
service-worker.published.js Simplified service worker lifecycle event handling
docssection.scss Reduced section header top margin for better spacing
MenuService.cs Added receiver components to API menu with Data grouping
DataContract.razor.cs Added logic to handle component types and receiver components
DataContract.razor Consolidated API routing and added CropperComponent support
CropperDemo.razor.cs Uncommented debug console logging statements
Api.razor Removed file (functionality consolidated into DataContract.razor)
DocStrings.cs (Models) Added methods for enum and class description retrieval
DocsApi.razor.cs Enhanced to support component contracts and class descriptions
DocsApi.razor Improved rendering for receiver components with JSInvokable indicators
ApiMethod.cs Added IsJsInvokable property for method metadata
Comments suppressed due to low confidence (3)

src/Cropper.Blazor/Client/Components/Docs/DocsApi.razor.cs:109

                foreach (var info in propertyInfos.OrderBy(x => x.Name))
                {
                    if (IsEventCallback(info))
                    {
                        yield return new ApiProperty
                        {
                            Name = info.Name,
                            PropertyInfo = info,
                            Default = string.Empty,
                            Description = DocStrings.GetMemberDescription(saveTypename, info, IsContract, IsComponentContract),
                            IsTwoWay = CheckIsTwoWayEventCallback(info),
                            Type = info.PropertyType,
                        };
                    }
                }

src/Cropper.Blazor/Client/Components/Docs/DocsApi.razor.cs:202

  • Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
            if (IsContract || IsComponentContract == true)
            {
                types = Type
                    .GetPropertyInfos();
            }
            else
            {
                types = Type
                    .GetPropertyInfosWithAttribute<ParameterAttribute>();
            }

src/Cropper.Blazor/Client/Models/DocStrings.cs:27

  • Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
                if (isContract || isComponentContract == true)
                {
                    name = saveTypename.Replace("<>", string.Empty) + "_property_" + property.Name;
                }
                else
                {
                    name = saveTypename + "_" + property.Name;
                }

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

@MaxymGorn MaxymGorn changed the title add receiver components to docs, fix events cropper component desc add receiver components to docs, fix events cropper component desc, fix error during blazor server prerendering in dispose methods Jan 29, 2026
@MaxymGorn MaxymGorn added the enhancement New feature or request label Jan 30, 2026
@ColdForeign ColdForeign merged commit 3ad4d86 into feature/add_typescript_for_project Feb 3, 2026
24 checks passed
@ColdForeign ColdForeign deleted the feature/add_receivers_comp_to_docs branch February 3, 2026 17:55
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.02%. Comparing base (5972a17) to head (0f0ffd9).
⚠️ Report is 1 commits behind head on feature/add_typescript_for_project.

Additional details and impacted files
@@                          Coverage Diff                           @@
##           feature/add_typescript_for_project     #453      +/-   ##
======================================================================
+ Coverage                               80.83%   81.02%   +0.18%     
======================================================================
  Files                                      29       29              
  Lines                                     929      938       +9     
  Branches                                   63       65       +2     
======================================================================
+ Hits                                      751      760       +9     
  Misses                                    177      177              
  Partials                                    1        1              
Flag Coverage Δ
DotNet 100.00% <100.00%> (ø)
TypeScript 6.31% <ø> (ø)

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants