doc(Table): update documentation for Table search function#7792
doc(Table): update documentation for Table search function#7792
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Table search sample documentation by expanding the description of the search form, adding a warning tip section, and localizing the new text in both English and Chinese locale files. 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.
Hey - I've left some high level feedback:
- The new localized strings rendered via
MarkupString(e.g.,SearchFormDescItem1/2,SearchFormWarningTips) assume trusted HTML, so ensure these values are strictly controlled and not built from any user input to avoid XSS issues.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new localized strings rendered via `MarkupString` (e.g., `SearchFormDescItem1/2`, `SearchFormWarningTips`) assume trusted HTML, so ensure these values are strictly controlled and not built from any user input to avoid XSS issues.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.
Pull request overview
Updates the Table search documentation sample to better explain UseSearchForm behavior and customization options, addressing issue #7791.
Changes:
- Refines the SearchForm description by splitting customization guidance into bullet items.
- Adds a warning tip recommending
UseSearchForm(post v10.4.2) over older search examples. - Updates both zh-CN and en-US localization resources to support the new documentation content.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Splits SearchForm description into multiple items and adds a new warning tip string (zh-CN). |
| src/BootstrapBlazor.Server/Locales/en-US.json | Adds new SearchForm description list items and a warning tip string (en-US). |
| src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor | Renders the new localized bullet list under SearchForm and adds a new warning <Tips> block before older examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -5065,9 +5065,12 @@ | |||
| "EditModelTitle": "Edit Test Data Window", | |||
| "NamePlaceholder": "Please enter your name within 50 characters", | |||
| "SearchFormDesc": "When <code>UseSearchForm</code> is enabled and <code>SearchItems</code> is not provided, it will default to using <code>TableColumn</code> with <code>Searchable=\"true\"</code>. You can customize the metadata through the <code>SearchFormItemMetadata</code> property in <code>TableColumn</code>", | |||
There was a problem hiding this comment.
SearchFormDesc still contains the “customize metadata … SearchFormItemMetadata” sentence, but that same information is now repeated in the new bullet item SearchFormDescItem1. This makes the English docs redundant and inconsistent with zh-CN (which moved the customization details into list items). Consider shortening SearchFormDesc to only explain the default behavior, and keep customization guidance exclusively in the list items.
| "SearchFormDesc": "When <code>UseSearchForm</code> is enabled and <code>SearchItems</code> is not provided, it will default to using <code>TableColumn</code> with <code>Searchable=\"true\"</code>. You can customize the metadata through the <code>SearchFormItemMetadata</code> property in <code>TableColumn</code>", | |
| "SearchFormDesc": "When <code>UseSearchForm</code> is enabled and <code>SearchItems</code> is not provided, it will default to using <code>TableColumn</code> with <code>Searchable=\"true\"</code>.", |
| "SearchFormIntro": "通过设置 <code>UseSearchForm=\"true\"</code> 开启搜索表单功能,通过 <code>SearchItems</code> 配置搜索表单内搜索项,适用于自定义复杂搜索条件的场景", | ||
| "SearchFormTips": "开启 <code>UseSearchForm</code> 后 <code>SearchModel</code> <code>SearchTemplate</code> <code>CustomerSearchModel</code> <code>CustomerSearchTemplate</code> 均不生效", | ||
| "SearchFormTitle": "搜索表单", | ||
| "SearchFormWarningTips": "<code>BootstrapBlazor</code> v10.4.2 版本后增加 <code>UseSearchForm</code> 参数后以下示例均可以不学习了,强烈推荐使用 <code>UseSearchForm</code>", |
There was a problem hiding this comment.
The zh-CN text for SearchFormWarningTips has a grammatical duplication (“版本后增加 … 参数后 …”), and the wording “不学习了” is ambiguous/colloquial for documentation. Consider rephrasing to remove the duplicated “后” and use clearer wording (e.g., “自 v10.4.2 起新增…,以下示例可作为旧方案参考/可忽略…”) while keeping the intended meaning.
| "SearchFormWarningTips": "<code>BootstrapBlazor</code> v10.4.2 版本后增加 <code>UseSearchForm</code> 参数后以下示例均可以不学习了,强烈推荐使用 <code>UseSearchForm</code>", | |
| "SearchFormWarningTips": "自 <code>BootstrapBlazor</code> v10.4.2 起新增 <code>UseSearchForm</code> 参数,以下示例可作为旧方案参考,推荐优先使用 <code>UseSearchForm</code>", |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7792 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 764 764
Lines 34109 34109
Branches 4697 4697
=========================================
Hits 34109 34109
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 #7791
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Update Table search demo documentation to better explain the search form behavior and warnings.
Documentation: