sanity-io/sanity

Change markers remain visible, devoid of actual changes

Closed this issue · 1 comments

Describe the bug

Custom components that leverage the <FormBuilderInput /> component will have ChangeBar icons and color-coded markers permanently visible after an initial change (eg. non-empty value). Even if the document has already been published, or when switching to a particular document.

I've observed both the blue as well as the yellowish variations sticking around. This happens with the example BarcodeInput as well as my own components that are similarly constructed.

I'm also seeing these particular fields being focussed whenever the document loads.

To Reproduce

Steps to reproduce the behavior:

  1. sanity init
  2. Select project template E-commerce (schema + sample data)
  3. sanity start
  4. Add a sample EAN-13 barcode: 978020137962
  5. Publish - observe that the markers are still visible
  6. Reload Studio or navigate away & back to the document
  7. Observe that the markers are still visible

Expected behavior

The markers should reflect the actual state of the document, and not show unless there are indeed changes.

Screenshots

The stock BarcodeInput input, provided by the e-commerce Studio (clean install):

image

image

image

My custom component, similar to BarcodeInput:

image

Hovering over these fields/markers logs the following error repeatedly:

image

Which versions of Sanity are you using?

@sanity/cli 2.10.0 (up to date)
@sanity/base 2.10.0 (up to date)
@sanity/components 2.2.6 (up to date)
@sanity/core 2.10.0 (up to date)
@sanity/default-layout 2.10.0 (up to date)
@sanity/default-login 2.8.0 (up to date)
@sanity/desk-tool 2.10.1 (up to date)
@sanity/vision 2.10.0 (up to date)

I can't reproduce this bug, so I believe we have shipped a fix for this.