-
-
Notifications
You must be signed in to change notification settings - Fork 364
doc(DockView): add auto switch theme sample #5713
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 by SourceryThis pull request removes the manual theme switching logic from the DockView samples and ThemeMode component. The ThemeProvider now directly triggers theme changes. Additionally, the TreeNodeConverter method was refactored for performance, and collection initializer syntax was used for generating TreeFoo objects. Sequence diagram for theme change eventsequenceDiagram
participant ThemeMode Component
participant ThemeProvider Service
ThemeMode Component->>ThemeProvider Service: TriggerThemeChanged(themeName)
activate ThemeProvider Service
ThemeProvider Service-->>ThemeMode Component: Notifies subscribers
deactivate ThemeProvider Service
File-Level Changes
Assessment against 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 - here's some feedback:
Overall Comments:
- The removal of ThemeProviderService and Theme properties from several components suggests a shift in how themes are managed, which might impact other parts of the application.
- Consider if the TreeNodeConverter and GenerateFoos methods should be extension methods.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Link issues
fixes #5712
Summary By Copilot
This pull request includes various updates and refactorings to the
BootstrapBlazor.Serverproject. The changes focus on updating package versions, removing unused dependencies, and refactoring components for better performance and maintainability.Package Updates:
BootstrapBlazor.DockViewto version9.1.8inBootstrapBlazor.Server.csproj.BootstrapBlazor.Mermaidto version9.0.4inBootstrapBlazor.Server.csproj.Component Refactoring:
JSObjectReferenceattribute fromThemeMode.razor.IThemeProviderdependency and related methods fromThemeMode.razor.cs. [1] [2]initfunction inThemeMode.razor.jsby removing unused parameters. [1] [2]DockView Components:
Themeparameter from variousDockViewV2components to streamline their usage. [1] [2] [3] [4] [5] [6] [7] [8] [9]_themeprivate field toDockViewNest.razor.cs.General Improvements:
BaseDockView.csto useListinstead ofIEnumerablefor better performance. [1] [2] [3] [4]ThemeChangedevent inThemeProvider.razor.csinstead of setting the theme directly.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge