Skip to content

Solve the spooky empty field issue - #365

Open
jgonggrijp wants to merge 10 commits into
developfrom
feature/bugfix
Open

jgonggrijp wants to merge 10 commits into
developfrom
feature/bugfix

Conversation

@jgonggrijp

Copy link
Copy Markdown
Contributor

This addresses #363. The issue emerged when the original record had a field with an empty string value. There were two places in the frontend code where a wrong branch was taken because a truthyness check was performed instead of a nullishness check. I also added some hacks so that "empty" values are recognizable as such for the user.

This was a good debugging lesson for myself. I needed the debugger and regression tests and manual functional testing to get a complete picture of what was going wrong; with only one or two of those ingredients, I would not have been able to fix it.

Empty string value with correction and deletion, before the fix:

Schermafdruk_20261015_214259

Empty string value with correction, after the fix:

Schermafdruk_20261015_214337

Empty string value with deletion, after the fix:

Schermafdruk_20261015_214400

I also remembered to take care of the dangling edit relink picker:

Schermafdruk_20261015_214428

If you want to play around with it, #363 details how to find a record with this problem. I have cherry-picked the commit with the shift-click hack that lets you simulate dangling edits. I will revert that again before merging.

I have not addressed the more profound questions:

  • Should records have empty string values?
  • Should the frontend show empty string field values, or should it consider them equivalent to missing values?

Those might deserve a discussion, but I figured the frontend should have a meaningful way to display and manipulate empty strings, anyway.

@jgonggrijp jgonggrijp moved this to In Progress in EDPOP Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant