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 positioning of scalebar tooltips, overview scalebar plotting, and refName label positioning when displaying many regions #1587

Merged
merged 20 commits into from
Jan 5, 2021

Conversation

cmdcolin
Copy link
Collaborator

With this change

#1556
#1532
Also see refname label positioning issue (X not flush with boundary) in #1556

I also make the minimum block width smaller to make it so realistically human sized chromosomes such as 20-22 of human are displayed even when zoomed out

The refname label positioning was fixed by updates to calculateStaticBlocks/calculateDynamicBlocks: only needs to add interregionpaddingwidth when it is a content block

This PR also adds ellided blocks to the overview bar so that we avoid rainbow-of-small-displayed regions, and changes it from paper with margins to exact width divs

localhost_3000__config=test_data%2Fconfig_demo json session=local-Mj1xyxkZX (2)

Note that this is still not perfect: it is visible from the screenshot that the chr1 overview scale bar polygon does not match up perfectly with the end of the display and the chr1 displays some negative offsets in an actually visible region

However, these changes do improve the general situation

@cmdcolin
Copy link
Collaborator Author

To test, here is a share URL with lots of displayed regions http://localhost:3000/?config=test_data%2Fconfig_demo.json&session=share-BZ3qCPhTw6&password=lq7S7

@codecov
Copy link

codecov bot commented Dec 28, 2020

Codecov Report

Merging #1587 (c36e624) into master (5d3419e) will decrease coverage by 0.09%.
The diff coverage is 75.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1587      +/-   ##
==========================================
- Coverage   59.40%   59.31%   -0.10%     
==========================================
  Files         434      434              
  Lines       19612    19613       +1     
  Branches     4591     4595       +4     
==========================================
- Hits        11651    11633      -18     
- Misses       7667     7686      +19     
  Partials      294      294              
Impacted Files Coverage Δ
plugins/dotplot-view/src/DotplotView/model.ts 45.23% <0.00%> (-1.28%) ⬇️
.../src/BaseLinearDisplay/components/LinearBlocks.tsx 88.88% <ø> (ø)
...c/LinearGenomeView/components/LinearGenomeView.tsx 79.16% <ø> (ø)
packages/core/util/Base1DViewModel.ts 71.54% <21.05%> (-2.63%) ⬇️
...s/linear-genome-view/src/LinearGenomeView/index.ts 80.87% <84.21%> (-3.23%) ⬇️
packages/core/util/blockTypes.ts 87.30% <85.71%> (+15.87%) ⬆️
...c/LinearGenomeView/components/OverviewScaleBar.tsx 93.05% <91.66%> (-1.14%) ⬇️
packages/core/util/calculateDynamicBlocks.ts 96.15% <100.00%> (-1.93%) ⬇️
packages/core/util/calculateStaticBlocks.ts 100.00% <100.00%> (ø)
packages/core/util/index.ts 84.01% <100.00%> (+0.05%) ⬆️
... and 8 more

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 5d3419e...c36e624. Read the comment docs.

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Jan 4, 2021

This one is maybe at a good place now. There is a fair amount of logic to make sure to carefully account for inter region padding blocks,etc. it's tricky but must be taken into account when zoomed out. I made some tests to check some of the expectations of this inter region padding block being taken into account when both zoomed out far and zoomed in close in various regions of hg38 which includes ellided blocks in the middle

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Jan 4, 2021

Standardize on the beforeFirst and afterLast interregionpaddingblocks

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Jan 5, 2021

following discussion in meeting, I restored the "boundary" blocks to calculateDynamicBlocks (matching calculateStaticBlocks) and then make a special calculation to avoid them in dd76c3e

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Jan 5, 2021

I think this is probably good to go.. if anyone is interested in reviewing feel free but might merge soon

@cmdcolin cmdcolin merged commit 6a3b345 into master Jan 5, 2021
@cmdcolin cmdcolin deleted the fix_tooltips_etc branch January 5, 2021 20:53
@cmdcolin cmdcolin added the bug Something isn't working label Jan 6, 2021
@cmdcolin cmdcolin changed the title Updates to improve scalebar tooltips, overview scalebar plotting, and refName label positioning Fix positioning of scalebar tooltips, overview scalebar plotting, and refName label positioning Jan 6, 2021
@cmdcolin cmdcolin changed the title Fix positioning of scalebar tooltips, overview scalebar plotting, and refName label positioning Fix positioning of scalebar tooltips, overview scalebar plotting, and refName label positioning when displaying many regions Jan 6, 2021
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