Skip to content

Fix LGV block API usage after upstream rename to displayedRegionIndex#802

Open
cmdcolin wants to merge 1 commit into
mainfrom
fix/displayed-region-index-rename
Open

Fix LGV block API usage after upstream rename to displayedRegionIndex#802
cmdcolin wants to merge 1 commit into
mainfrom
fix/displayed-region-index-rename

Conversation

@cmdcolin

Copy link
Copy Markdown

This addresses some breaking changes from jbrowse-components. Upstream jbrowse-components webgl-poc refactor removed block.parentRegion and changed it to just store 'displayedRegionIndex'. This concept was then applied broadly across several APIs. Instead of storing parentRegion, users can manually lookup view.displayedRegions[displayedRegionIndex]. This was try to to simplify and optimize the block generation code: it was running getSnapshot frequently on the region objects, etc.

Sort of similarly, we renamed bpToPx's regionNumber attribute to displayedRegionIndex.
We could potentially add backcompat for the bpToPx thing, but it may not be worth it to add backcompat for parentRegion.

If it is desirable to maintain compat with v4 and v5 of jbrowse though in apollo, we could add backcompat layer for 1 or both these issues and close this PR

jbrowse-components renamed block.parentRegion to a displayedRegionIndex
lookup and bpToPx's regionNumber param to displayedRegionIndex. Update
all call sites to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant