The ReferencesDrawer extends the Drawer. It does this for several reasons:
- To disable scroll via the closeOnScroll property
- Override a template
- To override the show method (but not actually do anything) 😂
- To add a class drawer-enabled to the body tag when open and remove it when closed
- Define events showNestedReference
- Expose a method showReference which Minerva uses to display the reference.
Working across the MobileFrontend and Minerva codebase, we will look to disect this.
- closeOnScroll is a parameter to Drawer not a property on the class
- The template of ReferencesDrawer is generalised and moved to the Drawer class (implementor should note that things extending Drawer already provide their own templates, so it would be useful to look at CtaDrawer's template when generalizing)
- Events are passed in as properties
- The drawer-enabled class is no longer necessary (T214049)
- Keep Minerva stable throughout these changes!
- Move the showReference method to the new factory function
- defaults are passed directly into the Drawer