Skip to content

Text diff transition highlighting #1896

@bevacqua

Description

@bevacqua

Something like https://elastic.github.io/eui/#/utilities/highlight but which supports transitions e.g. instead of highlighting the part of input that's included in corpus, I want to highlight the diff between inputNow and inputBefore for a few ms
you have AAAAA and type in a B, so you have AAAAAB where the B is highlighted, and then the highlighting fades away

Proposed API: where children is compared when componentDidUpdate or similar and we highlight differences by (e.g.) adding a yellow background for a few ms, etc.

<EuiHighlightUpdates>{ children }</EuiHighlightUpdates>

Ideally this would work fine together with EuiCodeBlock or other hljs enabled things

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions