-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/navigation #202
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
Feature/navigation #202
Conversation
| let toReturn = -1; | ||
| map(moduleNames, (name, index) => { | ||
| if (name === title) { | ||
| toReturn = Number(index); |
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.
Is index not a number?
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.
it is, typescript didn't believe it, I typed index instead
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.
it's actually not on further inspection
| <Progress | ||
| className={styles.progressBar} | ||
| size={["100%", 4]} | ||
| percent={getModulePercent( | ||
| isActiveModule, | ||
| moduleIndex | ||
| )} | ||
| showInfo={false} | ||
| /> |
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.
Is Progress tab focusable + clickable?
Co-authored-by: Peyton Lee <peytonalee@gmail.com>
…nding-sim-edu into feature/navigation
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 adds clickable navigation functionality to the module progress bar, allowing users to switch between modules with a confirmation dialog to prevent accidental navigation.
Key changes:
- Added tracking of completed modules using a Set stored in context
- Implemented click handlers with confirmation popups for module navigation
- Refactored module completion logic to mark modules as complete when quiz questions are answered correctly
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/simulation/context.tsx | Adds completedModules state and addCompletedModule handler to context |
| src/simulation/LiveSimulationData.ts | Refactors kds constant to static class property ESTIMATED_SOLUTIONS |
| src/components/quiz-questions/KdQuestion.tsx | Marks module as completed when quiz answer is correct |
| src/components/page-indicator.module.css | Adds hover and click target styles for interactive progress indicators |
| src/components/PageIndicator.tsx | Implements Popconfirm dialogs and click handlers for module navigation |
| src/App.tsx | Initializes completed modules state and clears analysis state on module change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| onConfirm={() => { | ||
| setModule(moduleIndex); | ||
| }} | ||
| onCancel={() => {}} |
Copilot
AI
Nov 19, 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.
Empty arrow function can be omitted. The onCancel prop is optional and doesn't need to be explicitly set to an empty function if no action is required.
| onCancel={() => {}} |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ShrimpCryptid
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.
Left some comments, looks good!
…nding-sim-edu into feature/navigation
Problem
Estimated review size: small
the navigation bar is supposed to be clickable
Solution
made it clickable with a pop confirm
Type of change
Please delete options that are not relevant.
Steps to Verify:
Screenshots (optional):