0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00

Ensure StreamField panels validation errors are visible (#10673)

...by rendering panels as expanded, regardless of the collapse
setting specified by the Wagtail implementor.

Fixes #8990 partially.
This commit is contained in:
Storm B. Heg 2023-07-13 10:23:03 +02:00 committed by Matt Westcott
parent bebbcfb48d
commit fef8c4ac3c
3 changed files with 7 additions and 0 deletions

View File

@ -62,6 +62,7 @@ Changelog
* Fix: Take user's permissions into account for image / document counts on the admin dashboard (Sage Abdullah)
* Fix: Avoid N+1 queries in users index view (Tidiane Dia)
* Fix: Use a theme-agnostic color token for read-only panels support in dark mode (Thibaud Colas)
* Fix: Ensure collapsible StreamBlocks expand as necessary to show validation errors (Storm Heg)
* Docs: Document how to add non-ModelAdmin views to a `ModelAdminGroup` (Onno Timmerman)
* Docs: Document how to add StructBlock data to a StreamField (Ramon Wenger)
* Docs: Update ReadTheDocs settings to v2 to resolve urllib3 issue in linkcheck extension (Thibaud Colas)

View File

@ -349,6 +349,11 @@ export class BaseSequenceChild extends EventEmitter {
setError(error) {
this.block.setError(error);
// If there is an error, the panel should be expanded always so the error is not obscured
if (error) {
toggleCollapsiblePanel(this.toggleElement, true);
}
}
focus(opts) {

View File

@ -119,6 +119,7 @@ This feature was developed by Aman Pandey as part of the Google Summer of Code p
* Take user's permissions into account for image / document counts on the admin dashboard (Sage Abdullah)
* Avoid N+1 queries in users index view (Tidiane Dia)
* Use a theme-agnostic color token for read-only panels support in dark mode (Thibaud Colas)
* Ensure collapsible StreamBlocks expand as necessary to show validation errors (Storm Heg)
### Documentation