-
-
Notifications
You must be signed in to change notification settings - Fork 368
doc(Editor): update EditorUploadFile docmentation #7397
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 guide (collapsed on small PRs)Reviewer's GuideUpdates the Editors sample page to document the EditorUploadFile-based OnFileUpload callback and adds corresponding localized description strings; project metadata is touched but without behavioral changes. 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 - I've left some high level feedback:
- The localized description rendered via
@((MarkupString)Localizer["EditorsUploadDesc2"].Value)will treat the resource string as HTML, so if it doesn’t actually need markup consider dropping theMarkupStringcast to avoid accidental XSS risk and make the localization text simpler to maintain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The localized description rendered via `@((MarkupString)Localizer["EditorsUploadDesc2"].Value)` will treat the resource string as HTML, so if it doesn’t actually need markup consider dropping the `MarkupString` cast to avoid accidental XSS risk and make the localization text simpler to maintain.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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 PR updates the documentation for the Editor component's file upload functionality. It adds descriptions for the OnFileUpload callback and the EditorUploadFile class in both Chinese and English locales, displays this documentation in the Editors sample component, and updates the BootstrapBlazor.SummerNote package dependency to version 10.0.2.
- Adds bilingual documentation for the file upload callback feature
- Updates the Editors sample page to display the new documentation
- Upgrades BootstrapBlazor.SummerNote package from 10.0.1 to 10.0.2
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Adds Chinese documentation strings for file upload callback functionality |
| src/BootstrapBlazor.Server/Locales/en-US.json | Adds English documentation strings for file upload callback functionality |
| src/BootstrapBlazor.Server/Components/Samples/Editors.razor | Displays the new documentation for the file upload callback on the sample page |
| src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj | Updates BootstrapBlazor.SummerNote package dependency to version 10.0.2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "EditorsDescription": "Convert the entered text into <code>html</code> code snippets", | ||
| "EditorsTips": "The <code>Editor</code> component is a secondary package of <a href='https://summernote.org/' target='_blank'><code>Summernote component</code></a>, such as If you need to use the localization function, please download the corresponding language pack from the official website and quote it by yourself. <code>zh-CN</code> <code>en-US</code> has been built in the required <code>css</code> <code>JavaScript</code> dynamically loaded on demand. If you edit too much content, <code>signalR</code> communication interruption may be triggered. Please adjust the <code>HubOptions</code> configuration.", | ||
| "EditorsUploadDesc": "Upload File Callback", | ||
| "EditorsUploadDesc2": "After the component sets a callback, when a file is selected for upload within the component, it will be returned to the caller as an instance of <code>EditorUploadFile</code>. The <code>Stream</code> property allows saving to the server or directly storing to Cloud Object Storage (OSS). The callback return value is the <b>Url</b> used for previewing the stored file.", |
Copilot
AI
Dec 23, 2025
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.
The English documentation could be clearer. Consider rephrasing "The Stream property allows saving to the server" to "The Stream property allows you to save to the server" or "Through the Stream property, you can save to the server" for better grammatical flow.
| "EditorsUploadDesc2": "After the component sets a callback, when a file is selected for upload within the component, it will be returned to the caller as an instance of <code>EditorUploadFile</code>. The <code>Stream</code> property allows saving to the server or directly storing to Cloud Object Storage (OSS). The callback return value is the <b>Url</b> used for previewing the stored file.", | |
| "EditorsUploadDesc2": "After the component sets a callback, when a file is selected for upload within the component, it will be returned to the caller as an instance of <code>EditorUploadFile</code>. The <code>Stream</code> property allows you to save to the server or directly store to Cloud Object Storage (OSS). The callback return value is the <b>Url</b> used for previewing the stored file.", |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7397 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 748 748
Lines 32793 32793
Branches 4551 4551
=========================================
Hits 32793 32793
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 #7396
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Document the editor file upload callback in the sample editors page and update related localized descriptions.
Enhancements:
Documentation: