Elektrine lite

← Feed

@glyph@mastodon.social

Post #2430693

2026-04-28 19:55 UTC

@davidism@mas.to oh man there is a huge load-bearing "it depends" on this one. if it's user input from something standard-HTML-form-like where there's no semantic distinction between null and empty then not nullable, no default, but take the empty string from the input (no need to create an "empty" draft in this case, the browser does it for us). if there's a way to indicate the null-ness of the field to the user, then nullable default null because insert-empty-accept-defaults is a convenient draft

Replies (1)

  • @glyph@mastodon.social 2026-04-28 19:58

    @davidism@mas.to basically whenever I am trying to make this decision I am looking hard at the UI and the user's mental model and trying to match it as closely as possible. if a user cannot look at a UI element and distinguish, visually, the difference between "empty" and "null" then it is really important not to let the data model reflect that difference. if the user *can* see that, then it's very important to accurately reflect it structurally and to avoid heuristics or guesses to infer emptiness

    Open ##2430694