Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: technical debt #303

Merged
merged 13 commits into from
Mar 11, 2024
Merged

chore: technical debt #303

merged 13 commits into from
Mar 11, 2024

Conversation

Pho3niX90
Copy link
Contributor

@Pho3niX90 Pho3niX90 commented Mar 11, 2024

  • Major refactor. Move all consts related to inverters, to their own individual managed classes. This improves the overall readability, as well as making it easier to add new ones.
  • split out cards to their own classes, for better readability, maintenance, and to reduce IDE memory footprint.

Description

Motivation and Context

  • Reduces overall code debt

  • Improves ease of adding new support for inverters.

  • Improves IDE memory overhead

  • This will also make it easier to componentize the 2 cards into smaller components going forward, where there is an overlap of HTML logic. Reduction of similar variable names, and refactoring all variable names into a singular coding standard and naming convention.

How has this been tested

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

- Major refactor. Move all consts related to inverters, to their own individual managed classes. This improves the overall readability, as well as making it easier to add new ones.
- split out cards to their own classes, for better readability, maintenance, and to reduce IDE memory footprint.
@Pho3niX90 Pho3niX90 changed the title chore: code debt chore: technical debt Mar 11, 2024
@Pho3niX90
Copy link
Contributor Author

Pho3niX90 commented Mar 11, 2024

fixes: #226 & #91

Pho3niX90 and others added 9 commits March 11, 2024 18:53
The inverter files are moved to a new 'brands' folder for better organization. The Singleton pattern is implemented in the 'inverter-factory.ts' for efficient instance management. The transformation from inverter settings as an interface to class is also included in this change.
The inverter files are moved to a new 'brands' folder for better organization. The Singleton pattern is implemented in the 'inverter-factory.ts' for efficient instance management. The transformation from inverter settings as an interface to class is also included in this change.
…code_dept

# Conflicts:
#	dist/sunsynk-power-flow-card.js
The battery icon generation and management code has been refactored. The code has been moved to a helper class minimizing redundant code in the main file and allowing for easier future adjustments.
@slipx06
Copy link
Owner

slipx06 commented Mar 11, 2024

Thanks for all the improvements

@slipx06 slipx06 merged commit 03e9624 into slipx06:master Mar 11, 2024
2 checks passed
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