-
Notifications
You must be signed in to change notification settings - Fork 8
Known Mirador Plugins
aeschylus edited this page Jan 16, 2019
·
6 revisions
https://github.com/ProjectMirador/mirador-awesome#plugins
Download Menu
Canvas Ruler
Keyboard Controls
Save Button
Annotation Sidebar (external)
Annotation System (internal/"core")
- Subscribe to application state
- Easy to read state at any given time through
getState()
- How to only subscribe to updates that matter to my plugin? (connect? lifecycle context?)
- Update application State
- Easy through redux actions on external API
- How to enable adding new fields to application state?
- Add and update DOM content
- Add DOM content as react elements in render methods, or through
ref.appendChild()
- Update when props change (changing pages, moving the window around, closing window, etc.)
- Integrate (somehow) with redux connect/provider, for automatic re-rendering
- require overrides to didMount and didUpdate to be given, with access to the state given to the plugin somehow, forcing them to manage updates manually
-
External
Plugins that can use thedispatch()
andgetState()
methods to update mirador's state and read the current state, without modifying what kind of state is stored. The UI would have to live outside or next to the mirador instance, and is never dependent on the lifecycle methods or render system of the react hierarchy. Examples would include:
- Save button (external)
- Simple keyboard controls (depending on what context information is made core)
- State from URL (when the parent page has a certain url, it opens to a given canvas/manifest, etc., Workspace state restoration)
- Analytics tracking (when subscribing to default events)
-
"Classic"
Simple additions, such as a save button or "screenshot" button, that use existing Mirador state types, but need to appear in the viewer UI. Author needs the same capabilities as above, but must also be able to place some DOM elements inside the react hierarchy.
- Ruler
- "Screenshot"
- Download Menu
- Image Cropper
- Share Buttons
- Analytics tracking (if specific mouse events on specific elements are required)
-
Feature Plugins
Extensive features that integrate with the application. These may require adding reducers for new types of state, actions for new types of updates, and multiple UI components in multiple locations. "Core" plugins will probably be of this type. Examples might be:
- Annotation System (side panel tab + canvas regions + actions, etc.)
- More involved keyboard plugin that tracks the focus of the user ("next" page of this window, or that other window?)
- Collection Management/Custom Catalogue/Integrated Discovery function