Skip to content

Add shapes to help with breathing#17

Merged
LindseyB merged 1 commit into
mainfrom
shapes
Aug 21, 2025
Merged

Add shapes to help with breathing#17
LindseyB merged 1 commit into
mainfrom
shapes

Conversation

@LindseyB

Copy link
Copy Markdown
Owner

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

  • Bug fix
  • New breathing technique
  • UI/UX improvement
  • Documentation update
  • Other (please specify):

Testing

  • I have tested these changes locally
  • The app runs without errors
  • All breathing techniques work as expected

Screenshots (if applicable)

Screenshot 2025-08-21 at 2 53 23 PM Screenshot 2025-08-21 at 2 53 27 PM Screenshot 2025-08-21 at 2 53 32 PM Screenshot 2025-08-21 at 2 53 36 PM Screenshot 2025-08-21 at 2 53 44 PM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread src/App.tsx
// Add current phase progress
const currentPhaseDuration = currentExercise.phaseDurations[phase];
if (currentPhaseDuration > 0) {
const phaseWeight = 100 / phasesInOrder.filter(p => currentExercise.phaseDurations[p] > 0).length;

Copilot AI Aug 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
const phaseWeight = 100 / phasesInOrder.filter(p => currentExercise.phaseDurations[p] > 0).length;
if (currentPhaseDuration > 0 && positivePhaseCount > 0) {
const phaseWeight = 100 / positivePhaseCount;

Copilot uses AI. Check for mistakes.
Comment thread src/App.tsx
Comment thread src/App.tsx
@LindseyB LindseyB merged commit a90fde0 into main Aug 21, 2025
1 of 2 checks passed
@LindseyB LindseyB deleted the shapes branch August 21, 2025 22:56
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.

2 participants