jbrowse-site-specific-help
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

jbrowse-site-specific-help

A JBrowse 2 plugin to make a site specific help widget

Install

For use in JBrowse Web

No installation required; this plugin can be installed from the JBrowse plugin store though the documentation is written with a "WormBase slant"; that is, while non-WormBase users may find the documentation useful, all of the examples pertain to WormBase. This plugin does serve as a useful example of creating plugins that modify menu items.

Production

Add to the "plugins" of your JBrowse Web config:

{
  "plugins": [
    {
      "name": "JBrowseSiteSpecificHelp",
      "url": "https://wormbase.org/tools/genome/jbrowse2/plugins/JBrowseSiteSpecificHelp/jbrowse-site-specific-help.umd.development.js"
    }
  ]
}

Development

This plugin is relatively straightforward and serves as a good example of how to add items to menus. You can find the repo at https://github.com/scottcain/jbrowse-site-specific-help.

While this plugin is WormBase specific, generalizing it to your own site should not be difficult. Basically, find references to WormBase in the code and change them. I think these items are limited to:

  • Change the menu label in src/index.ts from WormBase Help to something else.
  • Edit src/WBHelpWidget/components/WBHelpWidget.tsx to change the label from JBrowse 2 @ WormBase to something else, and change the links and labels to what you want.
  • If you want to run the cypress tests, you'll also have to update the contents of the tests.

After running yarn and yarn build place jbrowse-site-specific-help.umd.development.js and jbrowse-site-specific-help.umd.development.js.map in a web-accessible place and modify the plugin json code above to point at it.

Testing

This plugin also has the infrastructure to run cypress tests. To run these test, first you have to have the test server running:

  yarn start
  yarn browse

which will start the test instance of JBrowse on http://localhost:8999/. Then you can run either yarn cypress:run to run the tests in a headless state, or run yarn cypress:open to open the cypress app and run the tests interactively.

Package Sidebar

Install

npm i jbrowse-site-specific-help

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

277 kB

Total Files

30

Last publish

Collaborators

  • scottcain