-
Notifications
You must be signed in to change notification settings - Fork 462
Add troubleshooting prompts and corresponding tests for Fluent UI Blazor #4479
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
Add troubleshooting prompts and corresponding tests for Fluent UI Blazor #4479
Conversation
There was a problem hiding this 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 comprehensive prompt functionality to the Fluent UI Blazor MCP server, enabling AI assistants to generate contextual guidance for common development tasks. The implementation includes 13 new prompt classes covering setup, component creation, configuration, troubleshooting, and best practices, along with corresponding unit tests for each prompt.
Changes:
- Added 13 new prompt classes (Troubleshoot, SuggestComponent, SetupProject, Migration, ExplainComponent, CreateForm, CreateDrawer, CreateDialog, CreateDataGrid, ConfigureTheming, ConfigureLocalization, CompareComponents, and Accessibility)
- Added comprehensive unit tests for all prompt classes with multiple test cases per class
- Updated service registration to discover and register prompts from the assembly
- Removed obsolete test file (GetStartedInfoTests.cs) that tested a model class that may have been renamed
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Tools/McpServer/Prompts/TroubleshootPrompts.cs | Generates troubleshooting guidance for rendering, styling, behavior, and performance issues |
| src/Tools/McpServer/Prompts/SuggestComponentPrompts.cs | Suggests appropriate components based on use cases and project context |
| src/Tools/McpServer/Prompts/SetupProjectPrompts.cs | Provides step-by-step project setup instructions for different Blazor project types |
| src/Tools/McpServer/Prompts/MigrationPrompts.cs | Generates v4 to v5 migration guidance with breaking changes and component updates |
| src/Tools/McpServer/Prompts/ExplainComponentPrompts.cs | Explains component functionality at basic, intermediate, or advanced detail levels |
| src/Tools/McpServer/Prompts/CreateFormPrompts.cs | Generates form implementation guidance with validation and data binding |
| src/Tools/McpServer/Prompts/CreateDrawerPrompts.cs | Creates drawer/panel components with configurable position and modal behavior |
| src/Tools/McpServer/Prompts/CreateDialogPrompts.cs | Generates dialog implementations for simple, form, confirmation, and custom scenarios |
| src/Tools/McpServer/Prompts/CreateDataGridPrompts.cs | Creates DataGrid with sorting, pagination, selection, and virtualization features |
| src/Tools/McpServer/Prompts/ConfigureThemingPrompts.cs | Provides theming configuration guidance including custom colors and dark mode |
| src/Tools/McpServer/Prompts/ConfigureLocalizationPrompts.cs | Generates localization setup instructions with resource files or inline translations |
| src/Tools/McpServer/Prompts/CompareComponentsPrompts.cs | Compares components by features, performance, accessibility, or all aspects |
| src/Tools/McpServer/Prompts/AccessibilityPrompts.cs | Generates accessibility implementation guidance with WCAG compliance levels |
| src/Tools/McpServer/Extensions/ServiceCollectionExtensions.cs | Updated to register prompts from assembly alongside tools and resources |
| tests/Tools/McpServer.Tests/Prompts/*.cs | 13 test classes with comprehensive test coverage for each prompt class |
| tests/Tools/McpServer.Tests/Models/GetStartedInfoTests.cs | Removed obsolete test file for renamed or removed model class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dvoituron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To discuss...
I'm annoyed with your code in your latest PR. Because you're hardcoding examples of code that may be wrong tomorrow. And we won't have the time or resources to check where the code needs to be corrected.
Why not use code examples (in FluentUI.Demo.Client / Documentation) as a basis?
They are in .razor and are always checked and adapted in case of code changes;
and you have the .txt file containing the code if necessary.
- Implemented TroubleshootPrompts class to generate troubleshooting guidance for common Fluent UI Blazor issues. - Added unit tests for TroubleshootPrompts to validate functionality and ensure comprehensive coverage. - Created additional test classes for various prompt functionalities including Accessibility, CompareComponents, ConfigureLocalization, ConfigureTheming, CreateDataGrid, CreateDialog, CreateDrawer, CreateForm, ExplainComponent, Migration, SetupProject, SuggestComponent, and their respective tests. - Each test class includes multiple test cases to verify the expected behavior of the prompt methods.
…e size parameter processing and enhance explanation detail levels
…larity and usability, replacing code snippets with concise descriptions and emphasizing the use of MCP tools for implementation guidance.
a0c1cf2 to
ec1982c
Compare
Pull Request
📖 Description
This pull request introduces new prompt classes to the MCP server, expanding its capabilities to generate guidance for accessibility, localization, and component comparison in Fluent UI Blazor applications. It also updates the service registration to include these new prompts.
Prompt Feature Additions:
AccessibilityPromptsclass with a prompt for generating accessibility implementation guidance in Fluent UI Blazor, including best practices, component-specific advice, and testing checklists.ConfigureLocalizationPromptsclass to generate prompts for setting up localization, supporting multiple languages and both resource file and inline translation approaches.CompareComponentsPromptsclass, enabling prompts to compare two or more Fluent UI Blazor components by features, performance, accessibility, or all aspects, using documentation data.Service Registration Enhancement:
ServiceCollectionExtensions.csto register prompts from the current assembly, ensuring the new prompt types are discoverable and usable by the MCP server.🎫 Issues
👩💻 Reviewer Notes
📑 Test Plan
✅ Checklist
General
Component-specific
⏭ Next Steps