Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new collapsible settings menu with visualization mode toggle functionality that allows users to switch between shape-based animations and the traditional circle animation for breathing exercises. It also includes responsive styling improvements and updates TypeScript-related dependencies.
- Adds shape-based visualizations (box, triangle, line, and Reuleaux triangle) for different breathing techniques
- Implements a collapsible settings menu with toggle controls for visualization modes
- Updates TypeScript dependencies to more recent versions
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/App.tsx | Adds shape rendering logic, settings state management, and new UI components for visualization mode selection |
| src/App.css | Implements responsive styling for the new collapsible settings menu and visualization toggle controls |
| package.json | Updates TypeScript-related dependencies to newer versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // Add current phase progress | ||
| const currentPhaseDuration = currentExercise.phaseDurations[phase]; | ||
| if (currentPhaseDuration > 0) { | ||
| const phaseWeight = 100 / phasesInOrder.filter(p => currentExercise.phaseDurations[p] > 0).length; |
There was a problem hiding this comment.
This filter operation runs on every animation frame. Consider memoizing this calculation or moving it outside the frequently called getAnimationPosition function to avoid redundant computations during animations.
| const phaseWeight = 100 / phasesInOrder.filter(p => currentExercise.phaseDurations[p] > 0).length; | |
| if (currentPhaseDuration > 0 && positivePhaseCount > 0) { | |
| const phaseWeight = 100 / positivePhaseCount; |
What does this PR do?
This pull request introduces a new collapsible settings menu with a visualization mode toggle, along with responsive styling improvements for these new UI components. It also updates TypeScript-related dependencies in the project.
There are also new visualization modes for breathing with shapes that give folks an option for how they want to visualize the different breathing techniques.
Type of change
Testing
Screenshots (if applicable)