- Issue created by @wim leers
- ๐บ๐ธUnited States mglaman WI, USA
+++++++1 for default value being a placeholder. I've placed a paragraph component so many times and starting typing only to start adding letters after the example content.
However, that's really hard for non-text inputs. In that case I think it's fine to render the example as the default but leave the form empty.
- ๐ฌ๐งUnited Kingdom f.mazeikis Brighton
wim leers โ credited f.mazeikis โ .
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
It is hard for non-textual prop shapes .
But even for some textual ones, like date and time. Let alone images.
For images, @lauriii has been saying that we need to make XBenhance what coreโs image widget and media library widget do, precisely to show the default as a kind of placeholder.
No designs exist for it yet to my knowledge.
Given your +1, assigning to @lauriii.
- ๐บ๐ธUnited States effulgentsia
wim leers โ credited effulgentsia โ .
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Given a meeting last night surfaced this as a challenge/stable blocker for code components, and @effulgentsiaโs firm +1 to label default value as โinitial valueโ in the UI, to set clear expectations for content authors, bumping to Critical.
- ๐ซ๐ฎFinland lauriii Finland
My experience is that most page builders treat default values exactly the way Experience Builder does now: if thereโs text in a field, thatโs what will be saved. This matches how forms typically behave: when you see prefilled text, you expect it to be submitted unless you overwrite it.
That said, we need to decide whether to rely on default or examples in JSON Schema for this. Personally, I donโt have a strong preference either way.
Additionally, we may want to consider supporting both a placeholder value which is purely a form display concern and a true fallback value which is a rendering concern (i.e. fallback value determined at render time). I donโt think these should block the stable release.
- ๐ซ๐ฎFinland lauriii Finland
FWIW, this is called "Default value" in the Field UI module today and it behaves the same way as XB.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
@lauriii in #10:
FWIW, this is called "Default value" in the Field UI module today and it behaves the same way as XB.
You dropped from the call with @f.mazeikis, @jessebaker, @effulgensia and others, in which they explained that precisely this behavior has actually led to a LOT of support requests for Acquia Site Studio. Short version: users expected that changing the default would make the new default appear in all component instances where the default had not been modified.
Hence my proposal from #7.
#8 is a very narrow reading/interpretation of the problem described with nuance in the issue summary, which @f.mazeikis had nothing to add to, and @mglaman added #2 to.
Crucially, #8's ignores that it cannot work like that for SDC's default images โ otherwise they'd end up being saved into Drupal's Media Library. Or is that what you're implying? ๐ค That'd be counter to what you said before.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
From slack via @heyyo
The first example is used as default, but not the default property itself. What's the purpose of default as?
i.e. if a default is provided, we're ignoring it and using the example value. That feels like a bug and we should address it here or open a separate issue - thoughts on which you'd prefer?