The original implementation of Stylesheets and Themes, while very nice from a Swift perspective, made it unavailable in objective-c; protocol extensions were to blame as they are unavailable to the objective-c runtime. This required a rather extensive refactor and also yielded an additional ticket to go through and check the rest of our swift-based protocols to make sure everything works correctly.
Proposed Changes
Remove Theme as a separate protocol and merge into StyleSheet protocol
Create BaseStyle class that includes the protocol extension code
Remove protocol extensions
Move all styles to be subclasses of BaseStyle and refactor accordingly
Add some additional Objective-c specific tests.
Refactor tests to take into account all the refactoring :)
Overview
The original implementation of Stylesheets and Themes, while very nice from a Swift perspective, made it unavailable in objective-c; protocol extensions were to blame as they are unavailable to the objective-c runtime. This required a rather extensive refactor and also yielded an additional ticket to go through and check the rest of our swift-based protocols to make sure everything works correctly.
Proposed Changes
Theme
as a separate protocol and merge intoStyleSheet
protocolBaseStyle
class that includes the protocol extension codeBaseStyle
and refactor accordingly