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

Save user settings from LGV #2677

Merged
merged 4 commits into from
Jan 27, 2022
Merged

Save user settings from LGV #2677

merged 4 commits into from
Jan 27, 2022

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Jan 27, 2022

Saves the "show center line", "track labels", and "show cytobands" settings in localStorage

Note: This requires adding a "polyfill" for doing localstorage on the worker, because the model types for e.g. lgv are created on the worker. The LGV definitely doesn't need to exist in the worker bundle but it does

Fixes #2530

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jan 27, 2022
@codecov
Copy link

codecov bot commented Jan 27, 2022

Codecov Report

Merging #2677 (db008cf) into main (7a24a88) will increase coverage by 0.01%.
The diff coverage is 81.81%.

❗ Current head db008cf differs from pull request most recent head 9cd6815. Consider uploading reports for the commit 9cd6815 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2677      +/-   ##
==========================================
+ Coverage   60.73%   60.74%   +0.01%     
==========================================
  Files         561      561              
  Lines       26270    26280      +10     
  Branches     6394     6397       +3     
==========================================
+ Hits        15955    15964       +9     
- Misses       9988     9989       +1     
  Partials      327      327              
Impacted Files Coverage Δ
products/jbrowse-web/src/workerPolyfill.js 13.33% <ø> (ø)
.../linear-genome-view/src/LinearGenomeView/index.tsx 83.84% <80.00%> (-0.07%) ⬇️
packages/core/rpc/BaseRpcDriver.ts 84.76% <100.00%> (ø)
...ckages/core/pluggableElementTypes/RpcMethodType.ts 85.41% <0.00%> (+2.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a24a88...9cd6815. Read the comment docs.

@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 Jan 27, 2022
@cmdcolin
Copy link
Collaborator Author

no longer need polyfill because it evaluates the localstorage in a types.optional callback initializer, which is better anyways because it allows the saved setting to be used in a single session rather than across sessions

@cmdcolin cmdcolin merged commit d8dec92 into main Jan 27, 2022
@cmdcolin cmdcolin deleted the save_defaults_lgv branch January 27, 2022 14:27
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.

make some LGV settings be "sticky"
1 participant