Skip to content

Refactor: Modularize src/ui_components.py into a dedicated src/ui package #267

Description

@OdysseasKalaitsidis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions