Skip to content

Conversation

@meganrm
Copy link
Contributor

@meganrm meganrm commented Aug 28, 2025

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.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. bun dev
  2. click on the second module (third module isn't enabled on this branch )

Screenshots (optional):

Screenshot 2025-08-28 at 3 01 12 PM Screenshot 2025-08-28 at 3 01 20 PM

@meganrm meganrm requested a review from a team as a code owner August 28, 2025 22:01
@meganrm meganrm requested review from ShrimpCryptid and interim17 and removed request for a team August 28, 2025 22:01
let toReturn = -1;
map(moduleNames, (name, index) => {
if (name === title) {
toReturn = Number(index);
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Comment on lines +84 to +92
<Progress
className={styles.progressBar}
size={["100%", 4]}
percent={getModulePercent(
isActiveModule,
moduleIndex
)}
showInfo={false}
/>
Copy link
Contributor

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?

@meganrm meganrm marked this pull request as draft September 4, 2025 18:53
@meganrm meganrm marked this pull request as ready for review November 19, 2025 02:42
@meganrm meganrm requested a review from Copilot November 19, 2025 02:42
Copy link
Contributor

Copilot AI left a 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={() => {}}
Copy link

Copilot AI Nov 19, 2025

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.

Suggested change
onCancel={() => {}}

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@ShrimpCryptid ShrimpCryptid left a 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!

@meganrm meganrm merged commit 9793ab1 into main Nov 21, 2025
3 checks passed
@meganrm meganrm deleted the feature/navigation branch November 21, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants