Skip to content

@chromatic-com/playwright - Using data-chromatic=ignore on an element that displays a date results in flaky diff checks #184

@ryan-case-ml

Description

@ryan-case-ml

Describe the bug
I have an element in my UI that i wrap with a span that has the data-chromatic=ignore attribute so that I don't get diffs on it since that value can change daily (it displays a date). The problem is, since this date can change, so can the width of the element, causing Chromatic to flag it as a diff. According to chromatic docs, this is intended functionality:

It’s important to ensure the calculated bounding rectangle fully covers the changing content and maintains the exact dimensions as the baseline (e.g., width, height, and relative positioning). If the dimensions change, Chromatic will capture the incoming changes.

This is pretty frustrating to deal with. There has to be a better way to handle ignoring elements of varying widths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions