-
Notifications
You must be signed in to change notification settings - Fork 4.1k
♻️ [Amp story shopping] Attachment as element child #36989
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
♻️ [Amp story shopping] Attachment as element child #36989
Conversation
|
Hey @gmajoulet! These files were changed: Hey @newmuis! These files were changed: |
|
Out of curiosity, how does this refactor reduce the bundle size? Also, is there a technical concern about using inheritance here? This PR takes the existing structure of |
|
It reduces the bundle size by removing the import of It can be implemented either way but the idea behind this approach is to favor composition over inheritance. |
Refactor to use an element child instead of class inheritance.
This reduces bundle size by removing the import of
AmpStoryPageAttachentas well as potential technical debt from a third level of inheritance.(draggable-drawer > page-attachment > shopping-attachment).