-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor linear genome view storybook #3646
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3646 +/- ##
=======================================
Coverage 63.06% 63.07%
=======================================
Files 877 877
Lines 30167 30167
Branches 7272 7277 +5
=======================================
+ Hits 19026 19027 +1
+ Misses 10956 10955 -1
Partials 185 185
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
5b41653
to
d4d6691
Compare
d4d6691
to
711850b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be relevant to include a section, maybe in Getting Started about data limitations, how JBrowse handles large files with Range Requests, and how to configure the limit;
If we want to have the page in our Storybook, we could also consider constructing an API for the LGV methods like addTrack with this PR
<div> | ||
<JBrowseLinearGenomeView viewState={state} /> | ||
<a href="https://github.com/gmod/jbrowse-components/blob/main/products/jbrowse-react-linear-genome-view/stories/HumanExomeExample.stories.tsx"> | ||
source code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of instances where the capitalization of "Source code" isn't consistent...
I think adding a link to the source code is a good idea overall though in the spirit of a more "complete" example.
We might be able to present it more cleanly using this addon: https://storybook.js.org/addons/storybook-source-code-addon .. haven't investigated it fully but may look better than the hyperlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed capitalization, good catch. that add-on looks interesting. might be ok to have hyperlink though for now. with the add-on looks like you can have one source per story (we sometimes, even with my modularization, have multiple sometimes), then it is either in a template string (MyComponent.code.js) so might not have good type checking, or linked via url which the hyperlink essentially gives us
<Canvas> | ||
<Story id="linear-view--using-loc-object" name="Using loc object" /> | ||
</Canvas> | ||
<Story id="linear-view--using-loc-object" name="Using loc object" /> | ||
|
||
## Additional resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the guide for creating default sessions has a broken link now?
maybe clarify that "code example" is "Code example embedding react-linear-genome-view into a React page"..or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed link for default sessions, added your clarification text, and also added link out to https://jbrowse.org/jb2/docs/embedded_components/
a1d592d
to
e5ab621
Compare
products/jbrowse-react-linear-genome-view/stories/NextstrainDemo.stories.mdx
Outdated
Show resolved
Hide resolved
products/jbrowse-react-linear-genome-view/stories/Theming.stories.mdx
Outdated
Show resolved
Hide resolved
04dbc68
to
acc06f6
Compare
acc06f6
to
0caede6
Compare
new sidebar organization now has less 'blue links'...idea from pairing with @garrettjstevens to simplify the sidebar |
This 'modularizes' many of the storybook examples, and adds a 'source code' link so that users browsing documentation can find the source code for examples. We had used the 'Canvas' component which can sort of show the source code for an example, but it only shows code inside that single 'function component' where this change aims to show the whole file used to create an example.