Skip to content

Conversation

@thkruz
Copy link
Owner

@thkruz thkruz commented Nov 15, 2025

This pull request introduces a major refactor and expansion of the application's settings system, improving organization, extensibility, and clarity for both developers and users. It adds new structured settings classes for core, camera, and color configuration, updates documentation and examples for overriding settings, and makes minor compatibility improvements in the rendering logic. The most important changes are grouped below:

Settings System Refactor and Expansion

  • Added new settings classes: CameraSettings, ColorSettings, and CoreSettings in the src/settings/ directory, each with comprehensive documentation, typed properties, and default exports for use throughout the application. These cover camera movement, color schemes, and core/global flags respectively. [1] [2] [3]
  • Updated the settings override example in public/settings/settingsOverride.js to document both flat and nested syntax for overriding settings, including available categories and improved organization.

Rendering and Engine Compatibility

  • Updated the createSatRicFrame method in LineManager to accept OemSatellite objects, improving compatibility with new satellite types.

Submodule Updates

  • Updated the src/engine/ootk and src/plugins-pro submodules to their latest commits, ensuring compatibility with the new settings structure and other improvements. [1] [2]

These changes collectively make the application's configuration more robust, maintainable, and easier to extend for future features.

thkruz and others added 6 commits October 29, 2025 16:58
…dules

- Split monolithic settings.ts (1565 lines) into 8 category files:
  * graphics-settings.ts - Rendering, textures, visual effects
  * ui-settings.ts - Interface, menus, display settings
  * camera-settings.ts - Camera movement, FOV, zoom
  * orbital-settings.ts - Orbit calculations, propagation
  * data-settings.ts - Data sources, catalogs, servers
  * performance-settings.ts - Optimization and limits
  * color-settings.ts - Color schemes and object colors
  * core-settings.ts - Core settings, plugins, filters

- Refactored SettingsManager to use category instances with programmatic
  property accessors for 100% backward compatibility

- Enhanced settingsOverride.js to support both:
  * Flat syntax (backward compatible): isDrawSun: true
  * Nested syntax (recommended): graphics: { isDrawSun: true }

- Updated deepMerge to handle partial nested overrides while preserving
  defaults for unspecified properties

- Maintained all existing methods and functionality
- All property access patterns remain unchanged for consuming code

Breaking Changes: None - fully backward compatible
… checking

- Added interface SettingsManager that extends all category classes
- Uses TypeScript's declaration merging to expose all properties
- Fixes 'property does not exist' TypeScript errors
- Runtime behavior unchanged - properties still delegated via getters/setters
@thkruz thkruz self-assigned this Nov 15, 2025
Copilot AI review requested due to automatic review settings November 15, 2025 15:16
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ thkruz
❌ claude
You have signed the CLA already but the status is still pending? Let us recheck it.

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 refactors the settings system by splitting the monolithic SettingsManager class into smaller, domain-specific setting classes organized by category (graphics, UI, camera, orbital, data, performance, color, and core). The refactor maintains backward compatibility through programmatic property accessors while enabling both flat and nested configuration syntax for settings overrides.

Key changes:

  • Introduces category-based settings classes with dedicated default exports
  • Implements property accessor pattern for backward compatibility
  • Updates documentation and examples to demonstrate both flat and nested override syntax

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/settings/ui-settings.ts New UI-specific settings class with display, splash screen, and label configuration
src/settings/settings.ts Refactored to delegate properties to category instances via accessors and PROPERTY_CATEGORY_MAP
src/settings/performance-settings.ts New performance settings class for resource limits and FPS throttling
src/settings/orbital-settings.ts New orbital mechanics settings class for orbit rendering and propagation
src/settings/graphics-settings.ts New graphics settings class for rendering, textures, and visual effects
src/settings/data-settings.ts New data settings class for catalogs, servers, and external sources
src/settings/core-settings.ts New core settings class for plugins, global flags, and application state
src/settings/color-settings.ts New color settings class for color schemes and object colors
src/settings/camera-settings.ts New camera settings class for movement, zoom, and FOV configuration
public/settings/settingsOverride.js Updated documentation demonstrating flat and nested override syntax
src/settings/parse-get-variables.ts Added type assertions for texture quality settings
src/settings/presets/*.ts Added type assertions and import reordering for preset configurations
.gitignore Added pattern to exclude note files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

1 similar comment
@sonarqubecloud
Copy link

@thkruz thkruz merged commit e79136d into develop Nov 16, 2025
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants