Simplify AMP/Bento Class Hierarchies
See original GitHub issueObjectives
- Simplify the class hierarchies of AMP 1.0 and Bento Components
- Ensure proper layering of AMP/Bento s.t. the Bento side is devoid of AMP concepts
Current
- AMP Hierarchy: AmpFitText.js > FitTextBaseElement > PreactBaseElement > AMP.BaseElement
- Bento Hierarchy: FitTextBaseElement > PreactBaseElement > CeBaseElement
Proposed State
changes
- We can remove
CeBaseElement
from Bento by extracting the CustomElement function and also moving all of the HTMLElement CE Mappings into PreactBaseElement. - We can extract all of the AMP-specific logic from PreactBaseElement into AMPPreactBaseElement.
new hierarchies
- AMP Hierarchy: AmpFitText > AMPPreactBaseElement > setSuperClass(PreactBaseElement, AMP.BaseElement)
- Bento Hierarchy: BentoFitText > PreactBaseElement
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Lesson 6: Class Hierarchies - Studio Code.org
Lesson 6: Class Hierarchies. 45 minutes. Overview. How can I create hierarchies of classes to simplify program code? Students learned about inheritance ...
Read more >[2112.01187] Computing Class Hierarchies from Classifiers
In this paper, we propose a novel algorithm for automatically acquiring a class hierarchy from a classifier which is often a large neural ......
Read more >Simplifying complex class hierarchy - python - Stack Overflow
I.e., I can move some code to a different object but it needs to refer back to the big complex hierarchy to get...
Read more >Simpler Kotlin class hierarchies using class delegation
This class can be mapped to a hierarchy, a different class can be chosen based on the value of the type field (it...
Read more >Recovery of Class Hierarchies and Composition ...
Abstract. We present a reverse-engineering tool, called Lego, which recovers class hierarchies and composition relationships from stripped binaries.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kvchari: makes sense to me! Ridiculous number of layers on the AMP side of things, but I don’t see a way to avoid it. So it goes.
Closing as the hierarchy has been solved. Remaining clarity improvements are being tracked by https://github.com/ampproject/amphtml/issues/37538