Text-previews have disappeared from collapsed ‘Text, Single Column’ blocks – Most (if not all) other blocks have some sort of preview when they are collapsed. Without this feature, it can be difficult to efficiently edit some pages, especially those that are more complex.
When we first switched over to DATO in March, this feature was available, but at some point in June or July, this changed.
Thanks for reading,
Hey @mphofer! Happy new year
Is the “class” single-line text field in that block new?
It seems like where a block contains both a multi-paragraph text field and a single-line string, we’ll get the preview from the single-line string instead, with no option to override it
This – the ability to choose which specific field gets used for a block preview – might be a nice feature request? ✋ Feature requests - DatoCMS community ?
Otherwise, there is also a workaround you can do:
If you convert the “class” field to a multi-paragraph text field instead, then it won’t have priority anymore, and the block preview should go back to the text field instead. There shouldn’t be any data loss when you do that, and the API response for the developers should still be the same.
(You can test this on a forked sandbox environment first if you’d like!)
Does that help?
Hope you all are doing well there
All I know is that the preview text used to appear without having to do anything extra. The “class” may have popped up when something else was fixed/changed. I don’t really work in that part of the site too much. This comes up when I edit more complicated pages, as it’s easier to see a bit of the text than to have to keep opening & closing the blocks.
I will run this by Kate & Pete, as they’re more familiar with this.
It’s possible that field was added by somebody, and this was an unintended consequence (on our part) Sorry about that!
It should work, but feel free to have them get in touch with me too if that’s easier! Sorry for the hassle
@kwebbink: Hi! Good to hear from you both
PS in devspeak, the Preview algorithm will prefer single-line text strings over multi-line fields. If you make the
class field a multi-line one, that shouldn’t change the API output, but should allow the other field (
text) to be used in the Preview again. Sorry for the hassle.
Good to hear from you, too, @roger !
Thanks for suggestions – we’re checking into it.
& had a related feature request here: Ability to choose multi- or single-line text field for Block preview
Awesome, thanks! I’d vote for that too if I could Not doing dev yet here so not something I can implement myself, but hopefully in the future…