GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
208 stars 62 forks source link

Fix sequence type choice displaying wrong info #4449

Closed cmdcolin closed 5 months ago

cmdcolin commented 5 months ago

1) Currently the "Open dialog" on the sequence feature panel changes the users mode choice (e.g. showing protein or cds sequence). This updates it to keep the state of the users choice

2) The choice can actually revert, and then display the wrong info

Seen on main branch, it says it is displaying protein, but is displaying CDS. this was only a bug added after #4448 image

cmdcolin commented 5 months ago

codewise, the fix was mainly done by leaning the MST state more heavily instead of a mix of useState and MST state and using autorun to update the mode only when needed