Currently, src/ui_components.py is a monolithic file with over 2,300 lines of code, making it difficult to maintain and navigate. To improve the project's long-term health and facilitate easier collaboration, I suggest modularizing it.
Proposed Changes: I've already started working on a local refactor that does the following:
Creates a src/ui/ package.
Moves BaseComponent to src/ui/base.py.
Groups related components into dedicated files: leaderboard.py, weather.py, driver_info.py, controls.py, progress_bar.py, etc.
Keeps src/ui_components.py as a wrapper for backward compatibility.
This change reduces the primary UI file's size significantly and allows for easier unit testing of individual components.
Currently, src/ui_components.py is a monolithic file with over 2,300 lines of code, making it difficult to maintain and navigate. To improve the project's long-term health and facilitate easier collaboration, I suggest modularizing it.
Proposed Changes: I've already started working on a local refactor that does the following:
Creates a src/ui/ package.
Moves BaseComponent to src/ui/base.py.
Groups related components into dedicated files: leaderboard.py, weather.py, driver_info.py, controls.py, progress_bar.py, etc.
Keeps src/ui_components.py as a wrapper for backward compatibility.
This change reduces the primary UI file's size significantly and allows for easier unit testing of individual components.