-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(CodeEditor): add sample cdoe for CodeEditor #6488
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
Conversation
Reviewer's GuideThis PR enriches the CodeEditor demo with default sample code snippets, replaces nullable properties with initialized private fields, streamlines selection handlers, and updates the markup to bind the new fields and render a live editor preview. Class diagram for updated CodeEditors componentclassDiagram
class CodeEditors {
- string _code = "sample code"
- string _language = "CSharp"
- string _theme = "vs"
+ Task OnSelectedItemChanged(SelectedItem item)
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor.Server/Components/Samples/CodeEditors.razor:30` </location>
<code_context>
</div>
<div class="col-12">
- <Pre><CodeEditor Value="@@Code" Language="@@Language" Theme="@@Theme" OnValueChanged="OnValueChanged" /></Pre>
+ <Pre><CodeEditor Value="@@_code" Language="@@_language" Theme="@@_theme" /></Pre>
+ </div>
+ <div class="col-12">
</code_context>
<issue_to_address>
The Pre block now uses the new backing fields, but the double @ may be unnecessary.
Ensure that using @@_code, @@_language, and @@_theme achieves the intended output. Use a single @ for interpolation, or verify proper escaping if displaying as a string.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| </div> | ||
| <div class="col-12"> | ||
| <Pre><CodeEditor Value="@@Code" Language="@@Language" Theme="@@Theme" OnValueChanged="OnValueChanged" /></Pre> | ||
| <Pre><CodeEditor Value="@@_code" Language="@@_language" Theme="@@_theme" /></Pre> |
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.
nitpick: The Pre block now uses the new backing fields, but the double @ may be unnecessary.
Ensure that using @@_code, @@_language, and @@_theme achieves the intended output. Use a single @ for interpolation, or verify proper escaping if displaying as a string.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6488 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 714 714
Lines 31383 31383
Branches 4431 4431
=========================================
Hits 31383 31383
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6487
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Update the CodeEditor sample to provide initial code snippets, simplify state handling with bindable selects, and display a live editor demo
Enhancements: