diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcf783..a83fad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.9.0] — 2026-06-01 + +### Added + +- **Change-form parity via the rest-api form-spec endpoint (#659).** The + change form is now driven by `GET ///form-spec/` + (django-admin-rest-api 1.4.0+, #59) instead of discovering fields + client-side from the model serializer. The SPA now honours the + **ModelAdmin layer**: request-aware `get_form(request, obj)` / + `get_fieldsets(request, obj)` / `get_readonly_fields(request, obj)`, + `formfield_overrides`, custom `Form` classes, and the admin relation + widgets — resolved server-side and mapped through the closed + `widget.kind` enum. The original change-form querystring is forwarded, + so a `get_form` that swaps the `Form` on `?variant=…` renders the same + fields the legacy `/admin/` does. When the backend can't render the + form from JSON (a `change_form_template` override → `renderer: + "legacy-iframe"`), the SPA embeds the legacy admin page in an iframe + inside the SPA shell instead of silently dropping the customisation + (closes part of #624). A spec-fetch failure (older backend) degrades + gracefully to the previous detail-payload-driven form. New API client + method `formSpec()` + `useFormSpec` hook; the existing `FieldInput` + renders the adapted fields unchanged (one control set, no drift). + ### Changed - **Split DetailPage/ListPage into focused modules (no behavior change) diff --git a/README.md b/README.md index ffca9aa..1add217 100644 --- a/README.md +++ b/README.md @@ -646,7 +646,8 @@ issues link the work to close each gap. | Stock-Django hook | SPA behaviour | Tracked | |---|---|---| -| `change_form_template` / `change_list_template` / `add_form_template` / `change_password_template` / `object_history_template` overrides | Silently ignored — the SPA renders entirely from the JSON wire. | [#624](https://github.com/MartinCastroAlvarez/django-admin-react/issues/624) | +| `change_form_template` / `add_form_template` overrides | **Embedded in an iframe** (since 1.9.0, #659): the change/add form-spec endpoint returns a `legacy-iframe` pointer and the SPA embeds the legacy admin page inside the SPA shell (breadcrumb / sidebar / toolbar stay SPA-rendered). Port the form to documented ModelAdmin hooks at your own pace. | [#624](https://github.com/MartinCastroAlvarez/django-admin-react/issues/624) | +| `change_list_template` / `change_password_template` / `object_history_template` overrides | Silently ignored — those surfaces render entirely from the JSON wire. | [#624](https://github.com/MartinCastroAlvarez/django-admin-react/issues/624) | | `formfield_overrides = {Field: {"widget": CustomWidget}}` | Custom widget invisible — the SPA picks its own control from the field's `type`. No React-side widget-registration API yet. | [#625](https://github.com/MartinCastroAlvarez/django-admin-react/issues/625) | | `raw_id_fields` | Falls back to the autocomplete picker (same as `autocomplete_fields`). Defeats the purpose for FKs with 10M+ rows where autocomplete `get_search_results` is too expensive. | [#626](https://github.com/MartinCastroAlvarez/django-admin-react/issues/626) | | `radio_fields = {"status": admin.HORIZONTAL}` | Renders a `