Skip to content

Widgets should be (more) self contained #107

@azaroth42

Description

@azaroth42

When starting to update my local, modified mirador to the latest github version, the interdependence of different files becomes apparent. It would be advantageous (IMO) to reduce the dependencies, such that developers have to touch as few files as possible in the core mirador code to add additional widgets.

As the project progresses, a widget library of contributed code will likely build up, and this should be kept as easy to maintain as possible.

For example:

  • templates.js could be exploded out to the files that otherwise call it rather than keeping all of the templates together. This would mean that imageView.js maintains its own templates, and newWidget.js can thus look after its templates.
  • If every widget had the same invocation, even if it never used the extra information, then widget.js render*View functions could be reduced to a single render() function.
  • abstract features to a configuration file that can be kept separate from the core. Including the function to call when the load window canvas item is clicked, the features in mirador.js that aren't widget dependent, etc.
  • A standard navbar builder would be useful rather than having to always use a template. Perhaps either included or excluded widgets (other than itself) could be an argument.
  • etc :)

Rob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions