Skip to content

Custom React component for span annotation #63

@davidborland

Description

@davidborland

Custom React component

A custom component would:

  • Handle text selection natively in the browser (no clientside callbacks needed at all)
  • Render highlights as DOM manipulation rather than Dash component trees
  • Handle add/delete/hover interactions with zero round-trips
  • Only communicate with Python when the annotation data needs to be persisted — a single write to annotations-store on each change

The tradeoff is implementation cost. It's a meaningful project — you'd need the React component, a Dash component wrapper built with dash-component-boilerplate, and integration with the existing span data model. But it would completely solve the span latency problem and likely produce a better UX (native text selection behavior, no flicker on highlight, smoother hover/delete interactions).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions