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 issue where collapsed categories were not remembered after toggling a track #2208

Merged
merged 2 commits into from
Aug 11, 2021

Conversation

cmdcolin
Copy link
Collaborator

The title of this PR somewhat underestimates the issue scope but it is what the end user experiences

The collapsed category state was not stored in the widget model properly, and it was causing the code to forget the collapsed categories after a track is toggled (which causes the tree to get rerendered)

Note: Technically it might be somewhat expensive/not the best way to do things for for the tree to get recalculated after things like a track toggle or category collapse, but it seems to work fine afaik

This change is also good because it is nice for the collapsed categories to also be remembered in state e.g. across page refreshes

Fixes #2207

@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 10, 2021
@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 Aug 10, 2021
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #2208 (2fbf4c6) into main (bd3b7b1) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2208      +/-   ##
==========================================
+ Coverage   62.50%   62.56%   +0.05%     
==========================================
  Files         484      484              
  Lines       22707    22709       +2     
  Branches     5152     5154       +2     
==========================================
+ Hits        14194    14208      +14     
+ Misses       8243     8231      -12     
  Partials      270      270              
Impacted Files Coverage Δ
...ement/src/HierarchicalTrackSelectorWidget/model.js 61.41% <ø> (+1.57%) ⬆️
...ctorWidget/components/HierarchicalTrackSelector.js 61.39% <100.00%> (+0.49%) ⬆️
packages/core/util/index.ts 79.84% <0.00%> (ø)
...nts/src/SNPCoverageRenderer/SNPCoverageRenderer.ts 87.65% <0.00%> (+7.40%) ⬆️
packages/core/util/when.ts 54.05% <0.00%> (+10.81%) ⬆️

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 bd3b7b1...2fbf4c6. Read the comment docs.

@rbuels rbuels merged commit 3d3cac7 into main Aug 11, 2021
@rbuels rbuels deleted the vtree_collapse_fix branch August 11, 2021 17:35
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.

Collapsed categories don't stay collapsed when selecting a track
2 participants