-
-
Notifications
You must be signed in to change notification settings - Fork 331
fix(Layout): missing route handler when url has # #5795
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 focuses on improving navigation handling in the Sequence diagram for route handling in Layout componentsequenceDiagram
participant LayoutComponent as Layout
participant NavigationManager as NavManager
participant RouteTableFactory as Factory
participant AuthenticationHandler as Handler
Layout->>NavManager: Get Navigation.Uri
NavManager-->>Layout: Returns Navigation.Uri
Layout->>NavManager: Call ToAbsoluteUri(Navigation.Uri)
NavManager-->>Layout: Returns Absolute Uri
Layout->>Factory: Create RouteTable with uri.LocalPath
Factory-->>Layout: Returns RouteContext
Layout->>Handler: IsAuthorizedAsync(ServiceProvider, AuthenticationStateTask, Resource)
Handler-->>Layout: Returns IsAuthenticated
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 - here's some feedback:
Overall Comments:
- The summary mentions improvements to navigation handling and enhancements to the tab component, but it doesn't explicitly state the problem being solved in issue bug(Layout): missing route handler when url has # #5794.
- The change in
Layout.razor.cs
usesuri.LocalPath
, consider adding a comment explaining whyToBaseRelativePath
was not sufficient.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5795 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 658 658
Lines 30062 30062
Branches 4244 4244
=========================================
Hits 30062 30062 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5794
Summary By Copilot
This pull request includes several changes to the
BootstrapBlazor
project, focusing on improving navigation handling and enhancing the robustness of the tab component. The most important changes include updating the URL handling in theLayout.razor.cs
file and adding a null check in theTab.razor.js
file.Improvements to navigation handling:
src/BootstrapBlazor/Components/Layout/Layout.razor.cs
: Changed the URL handling in theOnInitializedAsync
method to useNavigation.ToAbsoluteUri
anduri.LocalPath
for creating the route context.Enhancements to tab component:
src/BootstrapBlazor/Components/Tab/Tab.razor.js
: Added a null check foractiveTab
in theactive
function to prevent errors when no active tab is present.src/BootstrapBlazor/Components/Tab/Tab.razor.js
: Removed an unnecessary comment and ensured the calculation of the right position for the active tab item.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Improve URL handling and tab navigation robustness in the BootstrapBlazor component library
Bug Fixes:
Enhancements: