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

Remove on hover highlight for annotations #4771

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Remove on hover highlight for annotations #4771

merged 2 commits into from
Jun 19, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jun 19, 2023

This pull request removes the the highlighting of the code marking when the related annotation is hovered.

This rather minor feature is the cause of browser hanging on pages with a lot of annotations. Improving the speed is not trivial, so I sugget removing the feature until we have a better fix of the speed.

In the most ideal case this feature would be redone using css :has selector, but because this would involve dynamic class names this is non-trivial.

I have identified the following key issues to speed up the javascript case:

  • limit the number of marking elements in the html. (This example has more then 900) This could be achieved by wrapping higher ancestors instead of each separate text-node. Which would also fix the non continuous wavy underline in a lot of cases.
  • speed up the re render of a single marking element. This can be done by not recreating the tooltip every time. I tried this first, but this was rather finicky because updating instead of destroying the old tooltip led to some inconsistency in the triggering of mouse related events. I can probably fix this by spending some more time on it.

Closes #4749.

@jorg-vr jorg-vr added the bug Something isn't working label Jun 19, 2023
@jorg-vr jorg-vr requested a review from a team as a code owner June 19, 2023 11:58
@jorg-vr jorg-vr self-assigned this Jun 19, 2023
@jorg-vr jorg-vr requested review from bmesuere and niknetniko and removed request for a team June 19, 2023 11:58
@jorg-vr jorg-vr merged commit 59c5b61 into main Jun 19, 2023
12 of 13 checks passed
@jorg-vr jorg-vr deleted the fix/browser-hang branch June 19, 2023 13:34
@jorg-vr jorg-vr temporarily deployed to naos June 19, 2023 13:34 — with GitHub Actions Inactive
@jorg-vr jorg-vr temporarily deployed to production June 19, 2023 13:38 — with GitHub Actions Inactive
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.

Some submissions cause the browser to crash or hang
3 participants