Skip to content
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

Add @jbrowse/react-app embedded component #3531

Merged
merged 3 commits into from
May 22, 2023
Merged

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Feb 21, 2023

This is a proof of concept to show we can embed the whole jbrowse-web app as a react component, which I call @jbrowse/react-app

There are still many things that need improving, but it does work at a base level.

The storybook works as a good live demo of this. Most of the stories are not wired up to automatically load a particular view yet, but can be clicked anyways
https://jbrowse.org/storybook/app/main_webapp_component/

Right now, this essentially copies and pastes the entire jbrowse-web src directory, which is a fairly large code duplication, but as we have seen with desktop, it may be that embedded has significantly different needs than web, so having it separate (for now) could be ok

@cmdcolin cmdcolin marked this pull request as draft February 21, 2023 17:53
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Feb 21, 2023
@cmdcolin cmdcolin force-pushed the main_webapp_component branch from 51b2833 to 3fa78a1 Compare March 7, 2023 02:47
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Mar 15, 2023
@cmdcolin cmdcolin force-pushed the main_webapp_component branch from 3fa78a1 to f52fc07 Compare March 15, 2023 20:24
@cmdcolin cmdcolin force-pushed the main_webapp_component branch 3 times, most recently from a419aed to 159eaf9 Compare April 12, 2023 21:18
@cmdcolin cmdcolin force-pushed the main_webapp_component branch 7 times, most recently from 6f03ae5 to 172eebb Compare May 20, 2023 07:19
@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Merging #3531 (d1e609a) into main (7c1ce5c) will decrease coverage by 0.36%.
The diff coverage is 38.10%.

@@            Coverage Diff             @@
##             main    #3531      +/-   ##
==========================================
- Coverage   64.66%   64.30%   -0.36%     
==========================================
  Files         945      961      +16     
  Lines       29786    29959     +173     
  Branches     7171     7190      +19     
==========================================
+ Hits        19261    19266       +5     
- Misses      10361    10529     +168     
  Partials      164      164              
Impacted Files Coverage Δ
packages/app-core/src/ui/App/App.tsx 96.55% <ø> (ø)
packages/app-core/src/ui/App/AppToolbar.tsx 53.84% <0.00%> (ø)
...ckages/product-core/src/RootModel/BaseRootModel.ts 32.00% <ø> (ø)
...owse-react-app/src/JBrowseWebApp/JBrowseWebApp.tsx 0.00% <0.00%> (ø)
...wse-react-app/src/components/PreferencesDialog.tsx 0.00% <0.00%> (ø)
products/jbrowse-react-app/src/createModel.ts 0.00% <0.00%> (ø)
products/jbrowse-react-app/src/createViewState.ts 0.00% <0.00%> (ø)
products/jbrowse-react-app/src/jbrowseConfig.ts 0.00% <0.00%> (ø)
products/jbrowse-react-app/src/loadPlugins.ts 0.00% <0.00%> (ø)
products/jbrowse-react-app/src/rpc.worker.ts 0.00% <0.00%> (ø)
... and 14 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin cmdcolin force-pushed the main_webapp_component branch 12 times, most recently from f100d9d to db445c4 Compare May 22, 2023 17:21
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented May 22, 2023

we could consider merging this as-is, but mark it as private:true until ready to publish. I'll mark this as ready for review

@cmdcolin cmdcolin marked this pull request as ready for review May 22, 2023 17:22
@cmdcolin cmdcolin force-pushed the main_webapp_component branch 3 times, most recently from ed80094 to a8608ab Compare May 22, 2023 19:57
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented May 22, 2023

now does not attempt to store session data in sessionStorage or localStorage, nor does it have undo/redo, or theme changing...could try to modularize those out into an optional mixins and document how to add them in a storybook but it may be reasonable default to leave our be default

@cmdcolin cmdcolin force-pushed the main_webapp_component branch from a8608ab to 0c66bc7 Compare May 22, 2023 20:46
@cmdcolin cmdcolin force-pushed the main_webapp_component branch from 0c66bc7 to d1e609a Compare May 22, 2023 21:41
@cmdcolin cmdcolin merged commit ebe7e87 into main May 22, 2023
@cmdcolin cmdcolin deleted the main_webapp_component branch May 22, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant