Skip to content

Add persistentHighlight option and clearHighlight() API #91

@andypalmi

Description

@andypalmi

Description

When using compare(), highlighted nodes and tabs auto-clear after 10 seconds. There is no way for consumers to keep highlights persistent or to clear them programmatically.

Changes

  • Add persistentHighlight render option: when true, node and tab glows stay until the next highlight() or clearHighlight() call
  • Extract clearHighlight() from highlightChangeItem and expose it on the comparison object
  • Gate both the tab glow timeout and node glow timeout on !persistentHighlight

Context

Needed by FlowFuse's snapshot diff viewer (FlowFuse/flowfuse#7062), which navigates between changes and needs highlights to persist until the user moves to the next change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions