Skip to content

Create Hoverifier component

Warren Gifford requested to merge tj/hoverifier-component into main

Created by: tjkandala

Create a Hoverifier component that manages a hoverifier instance. Like the new Decorator component, which handles setting and clearing line decorations, it enables us to write simple function components that only concern themselves with React state; these components handle any other DOM manipulation. We'd have to liberally use refs to recreate this functionality in function components.

TODO:

  • Fix URL update bug. Some clicks don't trigger click events since the ref is occasionally set to null. Two possible strategies to stabilize ref:
  1. Find a way to make ref callback stable. Possibly extract function child to a component and memoize callback.
  2. Don't emit elements on null

Merge request reports

Loading