Repository navigation
v1.2.0
·
18 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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_assignmentsgains aposition(existing cards are numbered in the order they reached their column).KanbanBoardService::move()takes an optionalKanban\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 firesap.ecommerce.kanban.cardReorderedandEvents\KanbanCardReordered.ap.ecommerce.kanban.cardMovingreceives the placement asplacementand may change it. artisanpack.ecommerce.kanban.new_card_position(bottom/top, envECOMMERCE_KANBAN_NEW_CARD_POSITION): where cards that join a board land in their column (#198).- REST
POST kanban/cards/{order}/moveacceptsposition(top/bottom),before_order_id, orafter_order_id; card resources exposeposition(#198). Kanban\KanbanCardQuery(itsfilter()andcolumn()return a narrowed copy, so one query can be reused) andKanban\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 throughap.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 throughap.ecommerce.kanban.cardRelations): what card widgets read, eager-loaded with the cards (#199).- REST
GET kanban/boards/{board}/cardsaccepts the card filters asfilter[...];GET kanban/boards/{board}addsfiltered_card_countto each column when they are passed (#199). - Board events on
private-ecommerce.kanban.board.{board}(#200): withkanban.broadcaston, cards added, removed, moved, reordered, and updated, board and column configuration changes, and automations that fired or failed are broadcast askanbanBoardEvent(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 onkanban.broadcast_connection/kanban.broadcast_queue(envECOMMERCE_KANBAN_BROADCAST_CONNECTION/_QUEUE); a broadcaster failure is logged and never fails the write. The existingkanbanCardMovedbroadcast stays. Events\KanbanBoardConfigChangedandEvents\KanbanAutomationFailed(#200).Kanban\KanbanCardRefresher::refresh( $order, ?$widgetKey )broadcastscard-updatedto 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, ormeta.tagschange, on order edits, and on new shipments; satellites call it for their own widgets.- Per-instance card widget config (#202): column
card_widgetsand boardsettings.card_widgetsaccept{ key, config }entries next to plain keys (Kanban\KanbanWidgetList), validated against the widget'sconfigSchema()with undeclared keys rejected (lists hold at most 50 entries and each config at most 50 settings). Widgets opt in withContracts\ConfigurableKanbanCardWidget::renderWithConfig();AbstractKanbanCardWidgetimplements it and exposes$this->config(). Config merges as schema defaults →kanban_card_widgets.default_config→ instance config, and a storedkanban_card_widgets.labelreplaces the widget's label.days-in-columntakesstale_after_daysandtagstakesmax_tags. Services\KanbanCardWidgetService: a board's default widget list and the store-wide widget overrides; RESTPUT/DELETE kanban/widgets/{key}; a change tells every active board to refresh and firesap.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.labelbecomes nullable, and widget resources addlabel_override(null when the widget's own label is used).KanbanCardRenderer::widgetEntries(),widgetSource()(column/board/default), andconfig().Services\KanbanColumnServicewithcreate(),update(),reorder(), anddelete()(#203): the column rules in one place, a bulk reorder in one transaction (RESTPUT kanban/boards/{board}/columns/order), deleting a column with cards refused withExceptions\KanbanColumnNotEmptyException(carrying the card count) or its cards moved to a named column first (RESTDELETE kanban/columns/{column}takesmove_cards_to, which also needskanbanCard.move; at mostKanbanColumnService::MAX_CARDS_MOVED_ON_DELETEcards), andap.ecommerce.kanban.column{Created,Updated,Reordered,Deleted}actions.
Changed
- REST
GET kanban/boards/{board}/cardslists cards in their manual order (position, then when they joined the board) by default; passsort=assigned_atfor the old order (#198). KanbanBoardServiceandKanbanRoutingServicetake aKanban\KanbanCardPositionsconstructor argument, andKanbanBoardService::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, andKanbanBoardAssignmentRemovedcarry an optionalactorUserId(#200).- The REST column endpoints write through
KanbanColumnService; their behavior is unchanged (#203). Column resources keepcard_widgetsas a list of widget keys and addcard_widget_entries({ key, config }pairs, GraphQL[JSON!]!) (#202). KanbanCardRendereris bound scoped, so widget overrides load once per request (#202).- A broadcaster failure while broadcasting
kanbanCardMovedis logged instead of failing the move (#200).