-
Notifications
You must be signed in to change notification settings - Fork 358
NAS-138487 / 26.04 / fix: prevent iSCSI target details from closing on navigation #13007
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
|
Claude finished @mattwyatt-ix's task —— View job Code Review Complete ✅Tasks
Review FindingsGreat fix! 🎉 The implementation correctly addresses the issue where clicking the "Target" navigation link would inappropriately close the details pane on desktop view. The solution is clean, well-tested, and the unrelated SMB tests have been properly removed. ✅ What's Working WellThe fix properly delegates to the 🔍 Code Quality Observationssrc/app/pages/sharing/iscsi/target/all-targets/all-targets.component.ts:78-80 isMobileView(): boolean {
return this.masterDetailView().isMobileView();
}This wrapper method works, but creates an unnecessary indirection. Since // In onMobileDetailsClosed():
if (this.masterDetailView().isMobileView()) {
this.dataProvider.expandedRow = null;
}
// If used in template, can do:
this.masterDetailView().isMobileView()This would eliminate the wrapper method entirely. However, the current approach is also reasonable if you prefer the abstraction for readability. src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.spec.ts:46-52 The use of
For this specific case, the approach is acceptable given the constraints, and the explanatory comment is helpful. 📝 Minor NoteLine 59: The check ✅ TestingTest coverage is appropriate for the scope of the change:
The tests properly mock the 🎯 SummarySolid fix that correctly addresses the navigation bug! The implementation is clean, follows Angular patterns, and includes good test coverage. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #13007 +/- ##
==========================================
+ Coverage 86.61% 86.67% +0.06%
==========================================
Files 1842 1844 +2
Lines 69157 69261 +104
Branches 8525 8540 +15
==========================================
+ Hits 59898 60033 +135
+ Misses 9259 9228 -31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…m test (#13012) Co-authored-by: Aaron Ervin <aaron.ervin@truenas.com>
aervin
left a comment
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.
works well. there are some unrelated smb tests though
that was from when i pulled ac2485f in to fix some failing tests i inherited from master. removed the extras! |
|
This PR has been merged and conversations have been locked. |
Changes:
on the iSCSI shares page, clicking the
Targetnavigation link when already on that section of the component would cause the target details to disappear due to us not checking if we were on mobile layout or not. this was breaking some automated tests.Testing:
Targetsnavigation tab at the top and observe that the details pane doesn't disappear.Screen recordings:
Downstream