feat(19.3-04): pact.ReorderAfterSave hook inside cabana's reorder transaction

- optional ReorderAfterSave(ctx, partition) runs after the new order is
  written; an error rolls the reorder back through lifecycleFailure
- reorderPost runs in lagoon.Transaction so lagoon.AfterCommit work a hook
  registers (a site-cache purge) runs only after the commit
- pact and cabana READMEs, admin hook table, tree reorder docs
This commit is contained in:
Jakub Zych
2026-10-15 18:27:07 +02:00
parent 0bc390f39f
commit af9dad634c
7 changed files with 28 additions and 6 deletions

View File

@@ -156,7 +156,7 @@ func (c articlesController) FormAfterUpdate(ctx context.Context, model any) erro
}
```
A nil purger (no purge configured) does nothing, so the hooks need no configuration check.
A nil purger (no purge configured) does nothing, so the hooks need no configuration check. A tree or sortable list's reorder save runs `pact.ReorderAfterSave` the same way; see [Tree reorder](../backend/lists-and-filters.md#tree-reorder).
### The site side