diff --git a/frontend/apps/web/src/pages/DetailPage.tsx b/frontend/apps/web/src/pages/DetailPage.tsx index c9680d0..ebc97a6 100644 --- a/frontend/apps/web/src/pages/DetailPage.tsx +++ b/frontend/apps/web/src/pages/DetailPage.tsx @@ -237,30 +237,40 @@ export function DetailPage({ return (
- {/* Header (#572): the title is the page's most important element - and gets as much horizontal space as it needs (`flex-1 - min-w-0`); the toolbar is `shrink-0` and only pushes the title - when it genuinely can't fit on its row. `justify-end` on the - toolbar's flex-wrap keeps wrapped button rows flush right to - the page padding, instead of left-aligned within their column. */} -
-
- ( - - {label} - - )} - /> -

{data.label}

-
+ {/* Header (#572 / #658): three stacked full-width rows so the + title never shares horizontal space with the toolbar — the + old side-by-side layout collapsed long single-token titles + (filenames, slugs, UUIDs) into one-word-per-line at full H1 + size, AND let an 8+ action toolbar push the title clean off + the viewport. Each concern now owns its own row: + + row 1: breadcrumb (full width, truncates on tight viewports) + row 2: H1 (full width, `overflow-wrap: anywhere` so a + single long token wraps inside the container) + row 3: toolbar (full width, `flex-wrap` so 8+ actions flow + to new lines; primary actions Edit/Delete + sit at the trailing edge via `ml-auto`) */} +
+ ( + + {label} + + )} + /> + {/* `break-words` (Tailwind's overflow-wrap: anywhere) keeps a + very long single-token title wrapping inside the container + at H1 size, instead of forcing each hyphen segment onto its + own line. `text-balance` rebalances the wrap for shorter + multi-word titles too. */} +

{data.label}

{!editing && ( -
+
- )} - {canDelete && ( - fetchDeletePreview({ client, appLabel, modelName, pk })} - onConfirm={async () => { - await deleteObject({ client, appLabel, modelName, pk }); - toast.success(`Deleted “${data.label}”.`); - navigate(listPath); - }} + {/* Primary-actions cluster (Refresh + Edit + Delete) is + grouped with ``ml-auto`` so it floats to the trailing + edge of the toolbar row even when the leading + ``@admin.action`` cluster wraps onto multiple lines. + ``flex-wrap`` on the cluster itself keeps Edit / Delete + together if the row is too narrow for the whole group + — destructive Delete stays adjacent to the constructive + Edit, never orphaned. */} +
+ {/* Refresh (#592): refetch the object + inlines + history + with no full page reload. */} + } /> - )} + {canChange && ( + + )} + {canDelete && ( + fetchDeletePreview({ client, appLabel, modelName, pk })} + onConfirm={async () => { + await deleteObject({ client, appLabel, modelName, pk }); + toast.success(`Deleted “${data.label}”.`); + navigate(listPath); + }} + /> + )} +
)}
diff --git a/pyproject.toml b/pyproject.toml index 30dc194..c0a8c1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "django-admin-react" -version = "1.8.0" +version = "1.8.1" description = "A drop-in React single-page admin for Django, driven entirely by ModelAdmin." authors = ["django-admin-react contributors"] license = "MIT"