minimap
minimap copied to clipboard
Block decorations not appearing
Block decorations have been introduced in v1.6.0. Is this something I need to support in my plugin? If so is there support for block decorations?
For split-diff, I am updating to use block decorations for the spacing between diff chunks:
I'm still wondering if and how I should support block decorations. There're a lot of implications both in terms of logic and performances and there's currently no simple API I can use to access this information (which line has a block decoration, which size is the decoration, etc.) except by using pixelPositionForScreenPosition
for every line, every time I need to render anything in the minimap, which will probably make the rendering slower and the code really brittle.
As for rendering block decorations, it'll be clearly a huge burden in the minimap render routine (rendering html to canvas is complex, slow and hits a lot of sandbox issues). Initially I wanted to draw a placeholder, but since I still haven't settled on supporting them I put a hold on my developments on that front.
Given that this issue hasn't received much attention over the past year, I want add my +1 here.
I would really find it useful to have the minimap take into account vertical space used up by decorators (in my case, the decorators are coming from the hydrogen package).