Skip to content

chore(release): v1.0.2 — filter-row wrap, detail-page actions + header (#570 #571 #572)#573

Merged
MartinCastroAlvarez merged 1 commit into
mainfrom
chore/release-v1.0.2
May 28, 2026
Merged

chore(release): v1.0.2 — filter-row wrap, detail-page actions + header (#570 #571 #572)#573
MartinCastroAlvarez merged 1 commit into
mainfrom
chore/release-v1.0.2

Conversation

@MartinCastroAlvarez
Copy link
Copy Markdown
Owner

v1.0.2 — three SPA polish fixes

Three concrete bugs reported against 1.0.1, all addressed here. Patch-only — no API, schema, or contract change.

#570 — Filter-row wrap (FilterBar trailing slot)

Symptom: when filter pills wrap onto a second line, "Clear all" + "Customize" break off into their own visual row, divorced from the pills.

Cause: the trailing slot wrapped its children in a sub-<div> with ml-auto flex flex-wrap. That sub-wrapper behaved as one flex item; when pills wrapped, the wrapper wrapped to the new line as a unit, and ml-auto pushed it right — creating "a second toolbar row."

Fix: render trailing children as direct siblings of the pills (no sub-wrapper). React.Children.toArray + cloneElement injects ml-auto on the first non-null trailing child. The trailing buttons now participate in the same flex-wrap pass as the pills and stay glued to the end of the last pill row.

#571 — Per-object actions on detail page

Symptom: detail page shows the changelist (bulk) actions with selected files / selected items wording; the per-object actions from django-object-actions (change_actions) don't render.

Cause: PR #562 (closing #555) wired the detail page to the changelist actions endpoint with [pk] — wrong primitive. The per-object endpoint already exists (the JS client has runObjectAction, the API exposes data.object_actions), but the bulk buttons crowded out the right ones.

Fix: drop the changelist-actions rendering on the detail page entirely. <ObjectActionButton> (already wired to POST <app>/<model>/<pk>/action/<name>/) remains as the only action source. Side effect: ~1.4 kB SPA bundle reduction from removing the unused useList, runAction, confirm-modal, and runner code paths.

#572 — Detail header layout

Symptom: title gets squeezed by the action toolbar even on wide viewports; toolbar's wrapped rows are left-aligned within their column instead of flush-right to the page.

Cause: the header used sm:justify-between with no width hint on either side, so the two blocks split horizontally ~50/50 regardless of content. The toolbar's inner flex flex-wrap lacked justify-end.

Fix:

  • Title block → min-w-0 flex-1 (claims all available width, truncates only when it must).
  • Toolbar block → shrink-0 flex-wrap justify-end.
  • Toolbar only pushes the title when its content genuinely needs the room; wrapped button rows hug the right edge.

Test plan

  • Backend: poetry run pytest -q45 passed, 88% coverage.
  • Frontend: pnpm -w test145 tests passed across 22 files (incl. FilterBar's 11 tests).
  • Frontend: tsc --noEmit on @dar/web → clean.
  • Frontend: pnpm -w build → clean; bundle drops from 263.48 kB → 262.07 kB (1.4 kB removed).

Publish plan

Same as 1.0.1 — manual set -a; . ./.env; set +a && poetry publish using POETRY_PYPI_TOKEN_PYPI from .env. Tag v1.0.2 + GitHub Release after the PyPI upload succeeds. The release.yml workflow's idempotency guard (PR #569) will detect the version is already on PyPI and short-circuit the upload step — deployment goes green without ever needing OIDC.

Closes

🤖 Generated with Claude Code

Three SPA polish bugs reported against v1.0.1, all addressed in this PR;
no API / contract / schema change.

#570 — list filter row wrap (FilterBar trailing slot)
-----------------------------------------------------
The trailing slot rendered its children inside a sub-wrapper
"<div className=ml-auto flex flex-wrap>" — which behaved as one
flex item in the outer container. When the filter pills wrapped
onto a second line, the trailing wrapper wrapped as a unit and
ml-auto pushed it to the right edge of the new (empty) line —
producing the visually-separate "second toolbar row" the pilot
reported.

Fix: render the trailing children as DIRECT siblings of the
pills, no sub-wrapper. React.Children.toArray + cloneElement
injects ml-auto on the first non-null trailing child to push the
cluster right; flex-wrap then keeps the trailing buttons glued
to the end of the last pill row, never on a separate line.

#571 — per-object actions on detail (single-pk semantics)
---------------------------------------------------------
PR #562 (closing #555) wired the detail page to the CHANGELIST
actions endpoint with a one-pk array. That was the wrong
primitive: bulk-action verbs (selected files, selected items)
are list semantics and confused the operator on a single-object
page, and the per-object change_actions from
django-object-actions (which the API already surfaces as
data.object_actions) were visually buried.

Fix: drop the changelist-actions rendering from DetailPage
entirely. ObjectActionButton (already wired to runObjectAction
→ POST app/model/pk/action/name/) remains; it is the correct
single-pk primitive. Side effect: ~1.4 kB drop in the SPA
bundle from removing the unused useList, runAction,
confirm-modal, and runner code paths.

#572 — detail header layout (title squeezed, toolbar not right-aligned)
-----------------------------------------------------------------------
The header used sm:justify-between with no width hint on either
side, so the title block + toolbar block split horizontal space
roughly 50/50 even when the title needed more and the toolbar
would fit in less. The toolbar block had flex flex-wrap but no
justify-end, so wrapped button rows were left-aligned within the
right column — reading as "centered between title and viewport"
rather than "right-aligned to the page".

Fix: title block → min-w-0 flex-1 (claims all available width,
truncates only when it has to). Toolbar block →
shrink-0 flex-wrap justify-end. Toolbar only pushes the title
when its content genuinely needs the room, and wrapped button
rows hug the right edge.

Closes #570, #571, #572.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants