Skip to content

Add DisplayManager utility for improved display handling#1621

Merged
hovancik merged 3 commits intotrunkfrom
refactor-display
Jul 17, 2025
Merged

Add DisplayManager utility for improved display handling#1621
hovancik merged 3 commits intotrunkfrom
refactor-display

Conversation

@hovancik
Copy link
Owner

No description provided.

@hovancik hovancik requested a review from Copilot July 17, 2025 07:33

This comment was marked as outdated.

@hovancik hovancik requested a review from Copilot July 17, 2025 09:03

This comment was marked as outdated.

@hovancik hovancik requested a review from Copilot July 17, 2025 09:20
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 introduces a new DisplayManager utility class to improve display handling in Stretchly by consolidating scattered display-related functions. The refactoring extracts complex display logic from the main.js file into a dedicated utility class that provides a cleaner API for window positioning and display management.

Key changes:

  • Creates a new DisplayManager utility class with comprehensive test coverage
  • Replaces multiple duplicated display functions in main.js with DisplayManager methods
  • Changes Math.ceil to Math.floor for display calculations to improve positioning accuracy

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
app/utils/displayManager.js New utility class providing centralized display management methods
test/displayManager.js Comprehensive test suite covering all DisplayManager functionality
app/main.js Refactored to use DisplayManager instead of inline display functions

@hovancik hovancik merged commit dbb1350 into trunk Jul 17, 2025
9 checks passed
@hovancik hovancik deleted the refactor-display branch July 17, 2025 09:29
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