question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-select default block when there is only one option in StreamField

See original GitHub issue

Issue Summary

A StreamField with only one block looks like this: image

Instead, the default block should be selected automatically the same way it happens when removing all content and pressing the (+) button.

This issue leads to bad user experience.

Steps to Reproduce

A StreamField with only one block.

Technical details

  • Wagtail version: 1.13

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mihowcommented, Aug 17, 2022

Fantastic, thanks for the update. Best of luck implementing this change.

0reactions
thibaudcolascommented, Aug 18, 2022

Assigning this to myself as we’re currently revisiting how the “Add” block picker works in StreamField, and I’d like to make sure we give this proper thought.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default blocks for wagtail's StreamField when a new Page is ...
A StreamField field definition accepts a default argument that consists of a list of (block_name, value) tuples. So, for a StreamField whose ...
Read more >
StreamField block reference - Wagtail's documentation
This document details the block types provided by Wagtail for use in StreamField, and how they can be combined into new block types....
Read more >
wagtail Changelog - pyup.io
Allow setting default attributes on image tags (Jake Howard) ... Switch StreamField blocks to use a `<section>` element so screen reader users can...
Read more >
Release 4.1.1 Torchbox - Wagtail Documentation
Note: This tutorial covers setting up a brand new Wagtail project. ... StreamField - A block-based content field (see: Freeform page content ...
Read more >
Wagtail for Beginners | Kalob Taulien - Skillshare
We don't know what this is and by default, Wag Tail and Django and Python. ... Not every editor has this feature, by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found