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 about dialog with version number for embedded components #3162

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

cmdcolin
Copy link
Collaborator

This writes a version.js file to the embedded components "postversion" in the build cycle, and allows the component to access the version number while running

Clicking on the "Logo" in the top right of the viewcontainer then pops up a small about dialog

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Aug 25, 2022
@cmdcolin
Copy link
Collaborator Author

ex screenshot

Screenshot from 2022-08-25 16-24-28

@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 Aug 25, 2022
@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #3162 (a858a23) into main (a18afa8) will decrease coverage by 0.03%.
The diff coverage is 48.14%.

❗ Current head a858a23 differs from pull request most recent head f51a006. Consider uploading reports for the commit f51a006 to get more accurate results

@@            Coverage Diff             @@
##             main    #3162      +/-   ##
==========================================
- Coverage   58.72%   58.68%   -0.04%     
==========================================
  Files         668      672       +4     
  Lines       29139    29161      +22     
  Branches     7088     7091       +3     
==========================================
+ Hits        17111    17113       +2     
- Misses      11650    11669      +19     
- Partials      378      379       +1     
Impacted Files Coverage Δ
...-genome-view/src/createModel/createSessionModel.ts 10.13% <0.00%> (ø)
...e-view/src/JBrowseLinearGenomeView/AboutDialog.tsx 0.00% <0.00%> (ø)
...-genome-view/src/createModel/createSessionModel.ts 18.00% <0.00%> (ø)
...ew/src/JBrowseCircularGenomeView/ViewContainer.tsx 63.63% <50.00%> (-1.89%) ⬇️
...view/src/JBrowseLinearGenomeView/ViewContainer.tsx 61.11% <55.55%> (-5.56%) ⬇️
...view/src/JBrowseCircularGenomeView/AboutDialog.tsx 80.00% <80.00%> (ø)
.../jbrowse-react-circular-genome-view/src/version.js 100.00% <100.00%> (ø)
...ts/jbrowse-react-linear-genome-view/src/version.js 100.00% <100.00%> (ø)
...svg/src/SvgFeatureRenderer/components/Segments.tsx 85.71% <0.00%> (-7.15%) ⬇️
...src/SvgFeatureRenderer/components/FeatureLabel.tsx 80.55% <0.00%> (-5.56%) ⬇️
... and 6 more

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

@cmdcolin
Copy link
Collaborator Author

any thoughts on this? could potentially allow it to be user customizable too perhaps

@cmdcolin
Copy link
Collaborator Author

I changed the code a little so that it only runs the bundler (generating the UMD bundles) in the postversion step, so the right version gets bundled then (if it is bundled in the build step, the predecessor version will get bundled since version is made after build)

@cmdcolin cmdcolin merged commit 8a12788 into main Sep 1, 2022
@cmdcolin cmdcolin deleted the version_embedded branch September 1, 2022 17:08
cmdcolin added a commit that referenced this pull request Sep 14, 2022
* Output version

* Add version

* Use IconButton

* Update snaps

* Only bundle after postversion so that we get the proper version bundled in the app
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.

None yet

1 participant