-
Notifications
You must be signed in to change notification settings - Fork 149
[TASK] Add getArrayRepresentation() to Renderable
#1447
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
Conversation
This method will make it easier to test the parsing independently of the rendering. Placeholder implementations are currently all stubs that will throw an exception, confirmed by tests. They can be implemented as and when required, with the tests updated. Part of #1440.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also should have the stub implementation (plus tests) in the concrete subclasses of the (usually) abstract classes as the real implementations usually will be different for each class:
CSSList:KeyFrameCSSBlockList:AtRuleBlockListDocument
AtRuleBlockList
ValueList:CSSFunctionCalcFunctionColorLineNameRuleValueListCalcRuleValueList
PrimitiveValue:CSSStringURLSize
Selector:KeyframeSelector
(I hope I haven't missed any class.)
|
I'd also be fine with doing that in a follow-up PR. |
oliverklee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, let's merge this and add the methods to the subclasses in a separate PR:
I'm not sure that's necessary. We can just add the real implementations as and when they are needed. If a child class ends up inheriting a parent implementation, but should have a different implementation (probably extended with additional properties), it will be obvious when we come to use it in testing that the child class method needs to be implemented (and tested) first, since it will not return (all) the properties we want to check. |
This method will make it easier to test the parsing independently of the rendering.
Placeholder implementations are currently all stubs that will throw an exception, confirmed by tests.
They can be implemented as and when required, with the tests updated.
Part of #1440.