Better error messaging when a Streamfield fails block_counts restriction #11239
enzedonline
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Is this related to #10395 ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, if a page or snippet withstreamfield that fails a block_counts restriction, there's a generic error banner displayed at the top of the page but no indicator to say where the error is, no indicator in the mini-map.
For example, the following StreamBlock:
A 2nd SearchMenuBlock has been added to the stream and the editor attempts to save a draft:
The editor doesn't know what the error is or where to look for it and needs to scroll down the page to look for any error messages.
At the top of the Streamfield, there is a banner indicating the error. It's formatted with the critical message (help-critical) style:
This doesn't really stand out to me, particularly on light mode and particularly if the streamfield error message is below the first fold. I tried a bit of ux testing with editors - they were all a bit confused and failed to find the error without some lengthy search.
1st improvement would be to mark the streamfield with the error on the minimap as per standard field errors:
Red is the colour used for other error messages, it's the colour the editor associates with errors when scanning the page.
I think the error message should have the error banner styling to stand out and make the message more identifiable. Not sure if this means the critical message style needs a review, or if this is a case for an extra style.
Beta Was this translation helpful? Give feedback.
All reactions