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

Don't send displayModel to "rendering" components on server side #4518

Closed cmdcolin closed 3 months ago

cmdcolin commented 3 months ago

In the past, the displayModel was snapshotted and only 'selectedFeatureId' was sent to the backend. This was with the 'intent' to make the server side render the 'selected' feature border, or highlight.

However, this was found to result in hydration mismatch errors, so was removed, but displayModel is still forwarded to the server side. This changes it to nullify the displayModel attribute, and then corrects typescript attributes in the "rendering" components to make this more clear

this PR is made because the no-unnecessary-condition rule benefits from correct knowledge of the types