Problem/Motivation
The module doesn't support the ComponentTextStyle object, and is missing various properties for the TextStyle object. This makes it hard to use all the features supported by Apple News. (ComponentTextStyle objects were introduced with v1.7 of Apple News).
For example, the styling to be used for the title can be defined by a ComponentTextStyle object named "default-title" - so it is handy to be able to define such a ComponentTextStyle object. If we want the title to use a bolder version of the default font, we'd ideally want to specify the fontWeight property - but that property isn't currently included in the ApplenewsTextStyle object (presumably because the Apple News format specification has evolved since this module was first written).
Steps to reproduce
n/a
Proposed resolution
I have written some code to add in many of the missing features.
Remaining tasks
The code I've written is provides some additional features and capabilities, but due to time constraints, I have not been able to do everything. The following tasks remain, and should be addressed in separate issues:
- Add support for remaining properties for TextStyle/ComponentTextStyle objects (i.e. orderedlistitems, unorderedlistitems, conditional).
- Verify that pre-existing TextStyle properties can actually be used as intended (e.g. textShadow).
- Provide a GUI interface for editing the ComponentTextStyle linkStyle and dropCapsStyle properties.
User interface changes
The main change is that on the Apple News configuration page there's now an additional Component Text Styles tab.
API changes
These changes require an updated version of the AppleNewsAPI library. See https://github.com/chapter-three/AppleNewsAPI/pull/31 and https://github.com/chapter-three/AppleNewsAPI/pull/32.
Data model changes
There's a new applenews_component_text_style config entity. The existing applenews_text_style config entity has some properties added, some removed, and the data type of some properties is revised.