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

Experimental: new floating labels implementation #4870

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Mar 4, 2025

The current floating labels implementation, which keeps the label on the left side of the screen even when zoomed in, is challenged due to block based rendering (hard to tell what block is the 'left most block', and even if you did know, it is required to render in multiple blocks if it crosses block boundaries, and the SVG text used for label rendering is strictly cut off at block boundaries due to blocks containing the SVG container) and server side rendering (can't float labels with server side rendering)

An alternative to the above described challenges is 'lifting up' the label rendering to the display level

This PR is an example of this

It renders the text as plain div elements in the BaseFeatureDisplayModel

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Mar 4, 2025

This style of label rendering was first demonstrated on the canvas rendering PR (#2671 )

One specific technical goal that this PR enable is collapsed introns. The labels render much better in this branch because it is not cut off at the small block boundaries used in collapse PR views

@cmdcolin cmdcolin force-pushed the new_floating_labels branch from 5f9c58e to 40b67f2 Compare March 4, 2025 19:01
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Mar 4, 2025

(potentially the canvas feature rendering approach could still be good to switch to entirely, but needs work...)

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