-
Notifications
You must be signed in to change notification settings - Fork 523
[AITT-1319] [Snapshot] Wire up the next/previous student buttons #70010
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
base: staging-next
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR implements student navigation functionality in the Student Snapshot header by wiring up the "Previous student" and "Next student" buttons. It replaces placeholder alert calls with actual navigation logic that updates the selected student based on the selectedStudents array from Redux state.
Key changes:
- Implemented navigation handlers that traverse the selectedStudents array and update the selected student ID
- Added disabled state logic to buttons based on student position and array availability
- Moved
useAppSelectorhook earlier in the component to support the new navigation logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const handlePreviousStudent = () => { | ||
| alert('Previous student clicked!'); | ||
| if (previousStudent) { | ||
| setSelectedStudentId(previousStudent.id); | ||
| } | ||
| }; | ||
|
|
||
| const handleNextStudent = () => { | ||
| alert('Next student clicked!'); | ||
| if (nextStudent) { | ||
| setSelectedStudentId(nextStudent.id); | ||
| } | ||
| }; |
Copilot
AI
Dec 12, 2025
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.
The new navigation logic in handlePreviousStudent and handleNextStudent lacks test coverage. Since other components in the studentSnapshot directory have comprehensive tests (e.g., StudentRubricWidgetTest.tsx), this component should also have tests covering: (1) clicking previous/next buttons updates the selected student, (2) buttons are disabled at the boundaries (first/last student), (3) navigation works correctly with selectedStudents array changes.
Warning!!
We have entered Pixel Lock for Hour of AI! All merges to the
stagingbranch from Dec 2 through Dec 12 must go through live change review and be deemed critical for supporting the Hour of AI. External contributions will not be accepted at this time.For non-critical changes, please change your base to
staging-nextand delete this warning. We will mergestaging-nextintostagingon Dec 15, 2025.[AITT-1319] [Snapshot] Wire up the next/previous student buttons
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Creation Checklist: