Skip to content

Conversation

@william-gr
Copy link
Member

Changes:

Always show SMB restart dialog when making smb share changes.
Be more explicit about why.

image

Testing:

Just edit a smb share and see the dialog.

Downstream

Affects Reasoning
Documentation Dialog when changes are made to a smb share.
Testing

@bugclerk bugclerk changed the title Show SMB restart dialog for any share changes with improved messaging NAS-139133 / 26.04 / Show SMB restart dialog for any share changes with improved messaging Dec 31, 2025
@bugclerk
Copy link
Contributor

@claude
Copy link

claude bot commented Dec 31, 2025

Claude finished @william-gr's task —— View job


Code Review: SMB Restart Dialog Improvements

Great work on improving the SMB restart dialog experience! 🎉 The changes effectively address the need for clearer messaging about why and when to restart the SMB service. The implementation is clean, well-tested, and follows Angular best practices.

Positive aspects

The PR successfully consolidates logic by moving restart-related functionality into the dialog component, reducing complexity in the parent SMB form component (77 fewer lines!). The new expandable "Learn more" section provides excellent user education without cluttering the initial dialog view. Test coverage is comprehensive with proper use of harnesses and accessibility attributes.

Areas for improvement

1. Accessibility: Keyboard navigation for "Learn more" link

The "Learn more" link uses role="button" and handles keydown.enter, but it's missing keydown.space handling. Buttons should respond to both Enter and Space keys per WCAG guidelines.

src/app/pages/sharing/smb/smb-form/restart-smb-dialog/restart-smb-dialog.component.html:13-14

// Missing keydown.space handler
(keydown.enter)="toggleLearnMore()"

Suggestion: Add space key handling:

(keydown.enter)="toggleLearnMore()"
(keydown.space)="$event.preventDefault(); toggleLearnMore()"

The preventDefault() is important to prevent page scrolling.

2. Test: Add keyboard space bar test

While there's a test for Enter key (line 97), there should also be a test for the Space bar to match the suggested accessibility improvement.

src/app/pages/sharing/smb/smb-form/restart-smb-dialog/restart-smb-dialog.component.spec.ts:97-104

3. Helptext organization consideration

The helptext file grew by 9 new translation keys (lines 244-257). While this is fine, consider whether these detailed explanations might be better suited as documentation links rather than inline text, especially since they're hidden by default in the "Learn more" section. This is a minor point - the current approach works well.

Testing verification

The test coverage is excellent:

  • ✅ Dialog rendering and content display
  • ✅ Button presence and functionality
  • ✅ Learn more expand/collapse with proper ARIA attributes
  • ✅ Icon state changes (chevron up/down)
  • ✅ Enter key navigation
  • ✅ Decline path testing in parent component

Overall assessment

This is a solid, well-implemented improvement that enhances user experience with better guidance on SMB service restarts! 👍

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.73%. Comparing base (3847e8f) to head (5c67c4d).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13054      +/-   ##
==========================================
+ Coverage   86.69%   86.73%   +0.03%     
==========================================
  Files        1847     1847              
  Lines       69413    69365      -48     
  Branches     8584     8556      -28     
==========================================
- Hits        60180    60162      -18     
+ Misses       9233     9203      -30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Add role, tabindex, aria-expanded for accessibility
- Add unit tests for RestartSmbDialog component
- Use idiomatic signal pattern in toggleLearnMore
@william-gr william-gr marked this pull request as ready for review January 5, 2026 17:12
@william-gr william-gr requested a review from a team as a code owner January 5, 2026 17:12
@william-gr william-gr requested review from AlexKarpov98 and removed request for a team January 5, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants