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

Fix the RefNameAutocomplete displaying a stale value for chromosome names #3306

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Nov 1, 2022

Fix the refnameautocomplete displaying a stale value for refname in some cases e.g. could see this visiting config_dotplot.json and then launching a lineargenomeview on the import form: it displayed peach in the assembly selector but with grape chromosome names

Affected released versions of jb2 e.g. v2.1.7, v2.1.0, and probably further back

The cause boils down to the "useState" being sticky when we want it to reset it's state when assembly changes

…ome cases e.g. could see this visiting config_dotplot.json and then launching a lineargenomeview on the import form: it displayed peach in the assembly selector but with grape chromosome names
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 1, 2022
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 1, 2022

I made a silly blogpost about this issue with stick useState's that need to be reset recently. It's a hard issue to catch/be aware of except just to be careful with useState's https://cmdcolin.github.io/posts/2022-10-10-reactstate

@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #3306 (058dc85) into main (6c639ac) will decrease coverage by 0.00%.
The diff coverage is 52.94%.

@@            Coverage Diff             @@
##             main    #3306      +/-   ##
==========================================
- Coverage   59.45%   59.45%   -0.01%     
==========================================
  Files         735      735              
  Lines       28980    28981       +1     
  Branches     7011     7009       -2     
==========================================
  Hits        17231    17231              
- Misses      11503    11504       +1     
  Partials      246      246              
Impacted Files Coverage Δ
packages/core/ui/AssemblySelector.tsx 100.00% <ø> (ø)
plugins/dotplot-view/src/DotplotView/model.ts 59.07% <0.00%> (-0.26%) ⬇️
...iew/src/LinearGenomeView/components/ImportForm.tsx 80.76% <56.25%> (+0.24%) ⬆️
products/jbrowse-web/src/util.ts 48.33% <0.00%> (ø)

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

@cmdcolin cmdcolin added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Nov 1, 2022
@cmdcolin cmdcolin merged commit d085813 into main Nov 1, 2022
@cmdcolin cmdcolin deleted the fix_refnameautocomplete_stale_values branch November 1, 2022 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant