Skip to content

Document Creator 0.4.5: Sortable columns and a row action menu

Document Creator 0.4.5 makes the documents and templates lists sortable and tidies the actions on each row.

The Name, Status, Created and Modified headers can now be clicked to sort; a second click reverses the order. The default is newest Modified first. The sort is kept in the page address, so it survives a reload or the Back button and can be bookmarked, and changing it returns to the first page. Dates sort by time, not as text, and Status puts files that need attention first: unfiled, then lost, then published.

The separate action buttons on each row and card are replaced with one ellipsis (⋯) menu holding the same actions as before, such as Export PDF, Restore and Delete.

Full release notes: Document Creator 0.4.5

0.4.5 · 31 May 2026

Added

  • Sortable Documents/Templates columns. The Name / Status / Created / Modified headers are now sortable via PhoenixKit’s sort_header_cell (default Modified ↓); a click toggles the column, a second click flips direction. Sorting is applied in memory before pagination and a whitelisted field parser guards the toggle_sort payload.
  • Ellipsis (⋯) row-action menu. The per-row action buttons (Edit/View, Export PDF, Restore/Delete) are replaced with PhoenixKit’s table_row_menu dropdown in both the table and card views, preserving the per-status actions and their phx-disable-with guards.

Changed

  • Sort state is URL-driven. toggle_sort now push_patches sort_by / sort_dir into the URL (read back in handle_params) like every other piece of table state, so the active sort is bookmarkable, shareable, and survives reload/back; the change also resets page=1 in the URL so the page param can no longer go stale. Pagination links carry the sort params too.
  • Date columns sort chronologically. Created / Modified now compare parsed DateTime values via DateTime.compare/2 (timezone-aware, naive values read as UTC) instead of lexicographic ISO-8601 strings, so rows order correctly across differing offsets and textual precision.
  • Status column sorts by rank. The Status column orders by a fixed rank (unfiled → lost → published) rather than alphabetically, surfacing the attention-needing states first; unknown/nil statuses still sort last in both directions.
  • Dependencies refreshed. phoenix_kit 1.7.125 → 1.7.126, swoosh 1.25.3 → 1.26.0.

Document Creator 0.4.5. Install or update: {:phoenix_kit_document_creator, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.