-
-
Notifications
You must be signed in to change notification settings - Fork 374
doc(Labels): update localizer content #7617
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 Labels sample component to render localized descriptive content inside Blazor section elements (with selective use of the Sequence diagram for Labels component rendering with sectionssequenceDiagram
actor User
participant Browser
participant BlazorRenderer
participant LabelsComponent
participant SectionManager
participant LayoutComponent
User->>Browser: Navigate to /label
Browser->>BlazorRenderer: Request Labels page
BlazorRenderer->>LabelsComponent: Instantiate and render
loop Render localized descriptive sections
LabelsComponent->>LabelsComponent: Render section with localized content
alt Section without ignore attribute
LabelsComponent->>SectionManager: Register section content
SectionManager->>LayoutComponent: Provide section content for placement
LayoutComponent->>BlazorRenderer: Render section in layout regions
else Section with ignore attribute
LabelsComponent->>BlazorRenderer: Render section inline in component
end
end
BlazorRenderer->>Browser: Send rendered HTML
Browser-->>User: Display Labels demo with section-aware layout
Flow diagram for section-aware documentation layout handlingflowchart TD
A[Start rendering Labels.razor] --> B[Render DemoBlock component]
B --> C[Render localized description as section]
C --> D{Does section have ignore attribute?}
D -- Yes --> E[Render section content inline in Labels component]
E --> F[Continue rendering forms and controls]
D -- No --> G[Register section with SectionManager]
G --> H[LayoutComponent queries SectionManager]
H --> I[LayoutComponent injects section into layout regions]
I --> F
F --> J[Finish rendering Labels page]
J --> K[Section-aware documentation layout displayed]
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:
- Replacing
<p class="mt-3">with<section>drops themt-3spacing class; if the visual spacing is still desired in the samples, consider preserving the margin class on the new elements. - The mix of
<section>with and without theignoreattribute (e.g.,EditorFormLabelAlignRightvs other descriptions) stands out; it may be worth double-checking that all sections are markedignoreor not according to a clear, consistent rule.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Replacing `<p class="mt-3">` with `<section>` drops the `mt-3` spacing class; if the visual spacing is still desired in the samples, consider preserving the margin class on the new elements.
- The mix of `<section>` with and without the `ignore` attribute (e.g., `EditorFormLabelAlignRight` vs other descriptions) stands out; it may be worth double-checking that all sections are marked `ignore` or not according to a clear, consistent rule.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7617 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 749 749
Lines 33007 33007
Branches 4580 4580
=========================================
Hits 33007 33007
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:
|
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 updates the Labels component documentation by refactoring HTML markup in localization files and the corresponding Razor component. The changes improve the HTML structure by wrapping bold text elements with paragraph tags and replacing paragraph elements with semantic section elements in the Razor view.
Changes:
- Updated HTML structure in localization strings to wrap
<b>tags with<p>tags for better semantic markup - Added CSS class
mb-3to some bold elements for consistent spacing - Replaced
<p>elements with<section>elements in the Labels.razor component - Added
@using Microsoft.AspNetCore.Components.Sectionsdirective
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Updated Chinese localization strings with improved HTML structure, wrapping bold elements in paragraph tags and adding margin-bottom classes |
| src/BootstrapBlazor.Server/Locales/en-US.json | Updated English localization strings with improved HTML structure, wrapping bold elements in paragraph tags and adding margin-bottom classes |
| src/BootstrapBlazor.Server/Components/Samples/Labels.razor | Replaced paragraph elements with section elements and added using directive for Sections namespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7616
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Documentation: