Decouple the UserInterface object from the Screens (and Tabs)
Currently, all screen and tab objects are dependent on the UserInterface object. The UserInterface is a massive object with many large imports and a long complicated initialization (it's basically the master controller of the interface). Furthermore, it requires the FrontendClient as an input to its init method. The FrontendClient is arguably an even larger object that does stuff like calling the gtk and clutter main loop. Since these objects are so complex and costly to initialize, it is virtually impossible to get the screens and tabs under unit test.
The main problem is that the screens are making direct calls to UI object rather than telling the UI object to do the work itself. It's really a scenario of bad separation of concerns and some overzealous introspection of the UI object. Most of the screens only use the UI object for some positioning calls (the x() and y() methods) or for calling the creation of a new screen.
Blueprint information
- Status:
- Complete
- Approver:
- Matt Layman
- Priority:
- Medium
- Drafter:
- Matt Layman
- Direction:
- Approved
- Assignee:
- Matt Layman
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- entertainer-0.4
- Started by
- Matt Layman
- Completed by
- Matt Layman
Related branches
Related bugs
Sprints
Whiteboard
This refactoring will be available in the 0.4 release.