Add EnableDescriptionMarkdown to WithCustomInput example#393
Add EnableDescriptionMarkdown to WithCustomInput example#393
Conversation
Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
|
do we need both |
…m parameter Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Good catch! I investigated the Aspire source code and you're right that it seems redundant at first glance, but both ARE needed due to how Here's what happens:
I've updated the example to use See commit 78e603e for the improved example. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot test this PR using this skill .github/skills/doc-tester/SKILL.md |
Documentation Test ReportFocus Area: External Parameters - WithCustomInput with EnableDescriptionMarkdown Summary
Test Results✅ Code Example ValidationLocation: Test Performed:
Result: ✅ PASSED
✅ Content AccuracyWhat the documentation says:
Verification: ✅ ACCURATE
Passed Checks
RecommendationsNo critical issues found. The documentation changes are accurate and the code example works as documented. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a documentation issue where the WithCustomInput example was missing the EnableDescriptionMarkdown property, which caused markdown formatting to render as plain text in parameter dialogs. The fix adds the property to the code example and provides clear explanation about when and why it's needed.
Changes:
- Updated the
WithCustomInputcode example to includeEnableDescriptionMarkdown = p.EnableDescriptionMarkdown(line 154) - Modified the description text to use markdown formatting to demonstrate the feature (line 146)
- Added detailed explanation in both the bullet list (line 137) and an Aside note (lines 169-171) about copying this property
- JSON file contains routine automated updates for package download counts and versions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frontend/src/content/docs/fundamentals/external-parameters.mdx | Fixes the WithCustomInput example by adding EnableDescriptionMarkdown = p.EnableDescriptionMarkdown, updates the description to include markdown, and adds explanatory text about preserving markdown rendering |
| src/frontend/src/data/aspire-integrations.json | Automated updates to package download counts and version numbers (e.g., Aspire.Hosting.AWS from 9.3.1 to 9.3.2) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - `WithDescription`: Use this method to provide a text description that helps users understand the purpose of the parameter. To provide a formatted description in [Markdown](https://www.markdownguide.org/basic-syntax/), use the `enableMarkdown: true` parameter. | ||
| - `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. | ||
| - `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. When using `WithCustomInput`, you must copy the `EnableDescriptionMarkdown` property from the parameter to the `InteractionInput` object to preserve markdown rendering. |
There was a problem hiding this comment.
The explanation added to this bullet point is redundant with the more detailed Aside note that appears below (lines 169-171). Consider removing the sentence "When using WithCustomInput, you must copy the EnableDescriptionMarkdown property from the parameter to the InteractionInput object to preserve markdown rendering." from this line, as the Aside note provides a more comprehensive explanation after the code example, which is a better location for detailed guidance.
| - `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. When using `WithCustomInput`, you must copy the `EnableDescriptionMarkdown` property from the parameter to the `InteractionInput` object to preserve markdown rendering. | |
| - `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. |
Fix WithCustomInput example missing EnableDescriptionMarkdown
WithCustomInputexample in external-parameters.mdx to includeEnableDescriptionMarkdown = trueEnableDescriptionMarkdownEnableDescriptionMarkdownfrom parameter instead of hardcodingSummary of Changes
This PR fixes the documentation for
WithCustomInputto properly demonstrate markdown rendering in parameter dialogs.What was wrong:
WithDescription(enableMarkdown: true)but didn't setEnableDescriptionMarkdownon theInteractionInputobjectenableMarkdown: trueonly sets the property on the ParameterResource, but WithCustomInput creates a new InteractionInput objectWhat was fixed:
EnableDescriptionMarkdown = p.EnableDescriptionMarkdownfrom the parameter (line 154)WithDescription(enableMarkdown: true)sets the property on the parameter resourceWithCustomInput, you must explicitly copy this property to your customInteractionInputobjecttrueHow it works:
WithDescription(enableMarkdown: true)setsEnableDescriptionMarkdownon theParameterResourceWithCustomInput, the framework automatically copies this to theInteractionInputWithCustomInput, you create your ownInteractionInput, so you must copy:EnableDescriptionMarkdown = p.EnableDescriptionMarkdownTesting:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.