Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 15:49
· 18 commits to main since this release
Immutable release. Only release title and notes can be modified.
147b26c

Kanban boards keep a manual card order, read their cards through one
filterable query, broadcast every change as an id-only board event, take
per-instance card widget settings, and edit columns through one service, so
the board satellites need no kanban logic of their own.

Added

  • Manual card order on kanban boards (#198). ecommerce_order_board_assignments gains a position (existing cards are numbered in the order they reached their column). KanbanBoardService::move() takes an optional Kanban\KanbanCardPlacement (top(), bottom(), before( $orderId ), after( $orderId )); a same-column move with a placement reorders the card without a status change, WIP check, or automations, and fires ap.ecommerce.kanban.cardReordered and Events\KanbanCardReordered. ap.ecommerce.kanban.cardMoving receives the placement as placement and may change it.
  • artisanpack.ecommerce.kanban.new_card_position (bottom / top, env ECOMMERCE_KANBAN_NEW_CARD_POSITION): where cards that join a board land in their column (#198).
  • REST POST kanban/cards/{order}/move accepts position (top / bottom), before_order_id, or after_order_id; card resources expose position (#198).
  • Kanban\KanbanCardQuery (its filter() and column() return a narrowed copy, so one query can be reused) and Kanban\KanbanCardFilters: a board's cards filtered by search (order number, email, billing / shipping / customer name), customer, tags (any / all), products (and their variants), placed date range, stale cards, and payment and fulfillment status, in manual order, cursor-paginated, with filtered and total counts per column. Satellites add filters through ap.ecommerce.kanban.cardQuery (#199).
  • Kanban\KanbanCardTags::forBoard(): the distinct tags on a board's cards, for a filter bar's options (#199).
  • Order::kanbanCardRelations() (filterable through ap.ecommerce.kanban.cardRelations): what card widgets read, eager-loaded with the cards (#199).
  • REST GET kanban/boards/{board}/cards accepts the card filters as filter[...]; GET kanban/boards/{board} adds filtered_card_count to each column when they are passed (#199).
  • Board events on private-ecommerce.kanban.board.{board} (#200): with kanban.broadcast on, cards added, removed, moved, reordered, and updated, board and column configuration changes, and automations that fired or failed are broadcast as kanbanBoardEvent (Broadcasting\KanbanBoardBroadcast) with an id-only payload: { type, board_id, order_id, column_id, from_column_id, to_column_id, position, actor_user_id, occurred_at }. Broadcasts go out after commit on kanban.broadcast_connection / kanban.broadcast_queue (env ECOMMERCE_KANBAN_BROADCAST_CONNECTION / _QUEUE); a broadcaster failure is logged and never fails the write. The existing kanbanCardMoved broadcast stays.
  • Events\KanbanBoardConfigChanged and Events\KanbanAutomationFailed (#200).
  • Kanban\KanbanCardRefresher::refresh( $order, ?$widgetKey ) broadcasts card-updated to each active board an order is on, after commit and debounced per request (#201). The core calls it when an order's payment or fulfillment status, totals, or meta.tags change, on order edits, and on new shipments; satellites call it for their own widgets.
  • Per-instance card widget config (#202): column card_widgets and board settings.card_widgets accept { key, config } entries next to plain keys (Kanban\KanbanWidgetList), validated against the widget's configSchema() with undeclared keys rejected (lists hold at most 50 entries and each config at most 50 settings). Widgets opt in with Contracts\ConfigurableKanbanCardWidget::renderWithConfig(); AbstractKanbanCardWidget implements it and exposes $this->config(). Config merges as schema defaults → kanban_card_widgets.default_config → instance config, and a stored kanban_card_widgets.label replaces the widget's label. days-in-column takes stale_after_days and tags takes max_tags.
  • Services\KanbanCardWidgetService: a board's default widget list and the store-wide widget overrides; REST PUT / DELETE kanban/widgets/{key}; a change tells every active board to refresh and fires ap.ecommerce.kanban.widgetOverrideSaved / widgetOverrideReset (#202). An override stores a label only when one is given (an empty label clears it), so a config-only override keeps the widget's own translated label; ecommerce_kanban_card_widgets.label becomes nullable, and widget resources add label_override (null when the widget's own label is used). KanbanCardRenderer::widgetEntries(), widgetSource() (column / board / default), and config().
  • Services\KanbanColumnService with create(), update(), reorder(), and delete() (#203): the column rules in one place, a bulk reorder in one transaction (REST PUT kanban/boards/{board}/columns/order), deleting a column with cards refused with Exceptions\KanbanColumnNotEmptyException (carrying the card count) or its cards moved to a named column first (REST DELETE kanban/columns/{column} takes move_cards_to, which also needs kanbanCard.move; at most KanbanColumnService::MAX_CARDS_MOVED_ON_DELETE cards), and ap.ecommerce.kanban.column{Created,Updated,Reordered,Deleted} actions.

Changed

  • REST GET kanban/boards/{board}/cards lists cards in their manual order (position, then when they joined the board) by default; pass sort=assigned_at for the old order (#198).
  • KanbanBoardService and KanbanRoutingService take a Kanban\KanbanCardPositions constructor argument, and KanbanBoardService::filteredTarget() returns the target column and placement as a pair. Card moves now lock the source and target columns before the card (#198).
  • KanbanCardMoved, KanbanCardReordered, KanbanBoardAssignmentAdded, and KanbanBoardAssignmentRemoved carry an optional actorUserId (#200).
  • The REST column endpoints write through KanbanColumnService; their behavior is unchanged (#203). Column resources keep card_widgets as a list of widget keys and add card_widget_entries ({ key, config } pairs, GraphQL [JSON!]!) (#202).
  • KanbanCardRenderer is bound scoped, so widget overrides load once per request (#202).
  • A broadcaster failure while broadcasting kanbanCardMoved is logged instead of failing the move (#200).