mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[GH-ISSUE #267] Refactor: Modularize src/ui_components.py into a dedicated src/ui package #57
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @OdysseasKalaitsidis on GitHub (Mar 31, 2026).
Original GitHub issue: https://github.com/IAmTomShaw/f1-race-replay/issues/267
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.
@OdysseasKalaitsidis commented on GitHub (Mar 31, 2026):
I have a local branch ready with these changes. Would you like me to submit a PR for this refactor?