GMOD / jbrowse-plugin-msaview

multiple sequence alignment browser plugin for JBrowse 2
Apache License 2.0
3 stars 0 forks source link

Factor out lib/app/plugin #22

Closed cmdcolin closed 3 years ago

cmdcolin commented 3 years ago

This creates

this makes the code more reusable by 3rd party devs (they can install our NPM package)

Note: have to do a little bit of gymnastics to make this all work in a single repo, including SKIP_PREFLIGHT_CHECK=true in .env to make the jest version compatibility between cra and tsdx get ignored

rbuels commented 3 years ago

Is the library package an embeddable component similar to the embeddable LGV?

cmdcolin commented 3 years ago

basically yes. it currently doesn't embed itself in a viewcontainer (purple frame) but is otherwise the same

cmdcolin commented 3 years ago

Open to ideas about what to publish it as. The package name msaview is taken, but could be @jbrowse/msaview if we want to keep it in our namespace, or @jbrowse/react-msaview to keep the react prefix similar to @jbrowse/react-linear-genome-view

ihh commented 3 years ago

There is a react-msa-viewer

Guess you could call it abrowse ;)

cmdcolin commented 3 years ago

This code branch ran into this issue https://stackoverflow.com/questions/51860043/javascript-es6-typeerror-class-constructor-client-cannot-be-invoked-without-ne

If I make my plugin not extend from base class Plugin it works though, and our current code allows this

Since the base class is a unused stub, do you think this is ok

cmdcolin commented 3 years ago

Summary of that issue: This plugin is compiled down to ES5, and when testing, the base class Plugin is still a proper es6 base class, and it says my Plugin cannot extend from it....

Not sure why that is triggered especially on this branch but it could be something to do with runtime vs load time imports

CC @garrettjstevens

cmdcolin commented 3 years ago

I might be possible that to do this PR properly, msaview as an NPM library should split into a new repo, with the jbrowse-plugin-msaview using that library

There are some confusing conflicts in this repo

cmdcolin commented 3 years ago

@rbuels I think it might be worthwhile to split this into two repos as noted above

Could have these two repos

GMOD/react-msaview GMOD/jbrowse-plugin-msaview

could go over during pairing if interested

cmdcolin commented 3 years ago

Split out into react-msaview here

Can be used standalone app separate from jbrowse

Will add some docs shortly

https://github.com/GMOD/react-msaview