-
Notifications
You must be signed in to change notification settings - Fork 401
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
Refactor: Extract rule window UI into a module #2462
base: master
Are you sure you want to change the base?
Conversation
06ee777
to
10274a3
Compare
Further splits up the diversion rules module and updates the interfaces as, necessary. @pfps Please review this |
b379175
to
239fb01
Compare
There are some conflicts that need to be addressed. |
Yeah, that's still WIP currently. Needs a little more work until it's ready. I've accidentally overridden the first commits, which were ready for merging. |
Why are there seven new files? |
f54e201
to
22e88f1
Compare
That's because it's a refactoring, which once more moves 600 lines of code from the diversion rules module into smaller modules, which do one thing and already became quite close to unit testable. This leads to a clearer structure and maintenance easier. |
efd8f61
to
d297aca
Compare
Extract the rule window related code in order to simplify and shrink the diversion rule module.
Removes global clipboard variable.
Replace global rules variable by testable class.
Handle permanent storage of rules with a class. Remove the need for global variable and introduce testable code.
Discard and reopening rules, didn't show the previous rules.
- Checks builtin rules - Checks loading from YAML file
This change further splits up the huge diversion rules module and creates a hierarchy. The aim are self-contained modules, which are testable. Avoid hard dependencies on e.g. GTK to enable lightweight unit tests of UI related code. Also aim for a common code base to share business logic between CLI and UI. The interface is only an add-on, which connects to the provided interface.
|
Without changes like that, nobody will ever be able to work on the UI without owning a huge amount of supported Logitech devices. |
Extract the rule window related code in order to simplify and shrink the diversion rule module.
Related #2390