davidfateh / repeater-app

The Repeater App creates a repeatable list of key-value pairs.
MIT License
30 stars 22 forks source link

Broken Locale Fallback Behavior #8

Open grantglidewell opened 2 years ago

grantglidewell commented 2 years ago

I see this library has not been updated in 15 Months at the time of filing this issue, this is to document for other potential users.

There are issues with this field application when it comes to localizing at a field level. What is returned from this field in some cases is an empty array for the value and not null. Contentful's fallback logic is weak and evaluates the empty array as a useful value and therefore does not fall back. This is a problem as there are unknown variables that go into when this field produces an empty array for a value. It is somehow related to how field level localization works. One does not have to directly edit and save a field to produce an empty array, but I suspect the field being visible for a locale (ie editing multiple locales in the contentful UI) has some impact.

If this app were to write empty values for keys as null I believe that would mitigate the issue and allow the field level fallback behavior to work as expected.

A tangentially related issue: https://github.com/contentful/contentful.js/issues/1000