📌 Description
NotificationRow (src/features/settings/components/notifications/NotificationRow.tsx) toggles email/weekly preferences with no pending state and no error feedback if the save fails, and its aria-label lacks the "notification preference" context.
💡 Why it matters: Users can't tell whether a preference change saved or failed.
🧩 Requirements and context
- Disable the toggle and show a pending indicator while saving.
- Surface an error (and revert) if the save fails.
- Improve the toggle
aria-label to describe the preference being changed.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b feat/notificationrow-feedback
2. Implement changes
- Write/modify the relevant source:
src/features/settings/components/notifications/NotificationRow.tsx
- Write comprehensive tests:
src/features/settings/components/notifications/NotificationRow.test.tsx
- Add documentation: inline TSDoc
- Include TSDoc doc comments
- Validate security assumptions: n/a
3. Test and commit
- Cover edge cases: save success, save failure + revert, pending disable
- Include test output and security notes in the PR description.
Example commit message
feat(notifications): pending + error feedback on toggle row
✅ Acceptance criteria
🔒 Security notes
None.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
NotificationRow(src/features/settings/components/notifications/NotificationRow.tsx) toggles email/weekly preferences with no pending state and no error feedback if the save fails, and itsaria-labellacks the "notification preference" context.🧩 Requirements and context
aria-labelto describe the preference being changed.Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
src/features/settings/components/notifications/NotificationRow.tsxsrc/features/settings/components/notifications/NotificationRow.test.tsx3. Test and commit
npm run testExample commit message
✅ Acceptance criteria
aria-labeldescribes the preference🔒 Security notes
None.
📋 Guidelines