Skip to content

Commit a695985

Browse files
authored
Match Timeline order view with matrix per-line actions (#6731)
* Improve order line matrix and bring Timeline view to parity Remove the confusing Needs action filter, share line row actions and refund callouts across both views, and extract shared row-action utilities so matrix and timeline stay in sync. * Scope Timeline row menus to shipment context Hide Return on returned and refunded fulfillment rows while keeping line-global actions in matrix, and limit Fulfill shortcuts to unfulfilled timeline cards. * Remove duplicate Fulfill button from unfulfilled card * Align order cog menu with model-type detail page pattern Move Return to the items header, put extensions and GraphiQL first with icons, and Cancel last as the destructive action. Remove dead menu helpers and the unused returnOrder message. * Fix order draft delete error and channel picker loading state * Add changeset * Extract messages
1 parent c3e83cc commit a695985

36 files changed

Lines changed: 491 additions & 804 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
*Timeline* now matches line matrix for day-to-day work: order-level refund callout, *Fulfill* and *Return* in the items section header, per-line row actions, and return/replace reasons on unfulfilled lines when present. *Return* and *Fulfill* on a timeline row apply only within that shipment's context — not on already returned, refunded, or replaced fulfillments.
6+
7+
Reorganized the order details cog menu: extension actions and GraphiQL (with icons) first, *Cancel order* last as the destructive action. *Return / Replace order* is in the items section header only.
8+
9+
Draft orders: deleting a draft no longer shows Internal Server Error notification. The *Select a channel* confirm button in *Create order* shows a loading state while the draft is created.

.changeset/order-line-matrix.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

locale/defaultMessages.json

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@
6262
"context": "Dry run dialog object title",
6363
"string": "Select object type to perform dry run on provided query"
6464
},
65-
"+RjQjs": {
66-
"context": "return button",
67-
"string": "Return / Replace order"
68-
},
6965
"+SYLEL": {
7066
"context": "refunded fulfillment, section header",
7167
"string": "Refunded"
@@ -292,10 +288,6 @@
292288
"context": "collection name",
293289
"string": "Name"
294290
},
295-
"/Xwjww": {
296-
"context": "button",
297-
"string": "Fulfill"
298-
},
299291
"/dnWE8": {
300292
"context": "products in collection",
301293
"string": "Products in {name}"
@@ -713,10 +705,6 @@
713705
"1Znp5B": {
714706
"string": "Be extra careful with taxes and payment extensions, ensure your configuration selects other extension to be used"
715707
},
716-
"1g1Hsn": {
717-
"context": "needs action help bullet for pending approval",
718-
"string": "Pending shipment approval"
719-
},
720708
"1lk/oS": {
721709
"context": "button",
722710
"string": "Add postal code range"
@@ -896,6 +884,10 @@
896884
"2atspc": {
897885
"string": "Drafts"
898886
},
887+
"2cFaF8": {
888+
"context": "fulfill a single order line from row menu",
889+
"string": "Fulfill this line"
890+
},
899891
"2dgbGR": {
900892
"string": "Those codes already exist"
901893
},
@@ -998,10 +990,6 @@
998990
"context": "filter range separator",
999991
"string": "and"
1000992
},
1001-
"34P9Lf": {
1002-
"context": "needs action help bullet for failed refunds",
1003-
"string": "Failed refund transfers"
1004-
},
1005993
"37IPJQ": {
1006994
"context": "return items table, edit reason button",
1007995
"string": "Edit reason"
@@ -1454,10 +1442,6 @@
14541442
"context": "acre-ft unit",
14551443
"string": "acre-ft"
14561444
},
1457-
"5YW/f6": {
1458-
"context": "fulfill a single order line from matrix row menu",
1459-
"string": "Fulfill this line"
1460-
},
14611445
"5ZYUn5": {
14621446
"context": "Filter and element text",
14631447
"string": "And"
@@ -3474,6 +3458,10 @@
34743458
"context": "label",
34753459
"string": "Shipping rate name"
34763460
},
3461+
"FkHonS": {
3462+
"context": "refund a single order line from row menu",
3463+
"string": "Refund this line"
3464+
},
34773465
"FkRNk+": {
34783466
"context": "field placeholder",
34793467
"string": "Description of a shipping zone."
@@ -3665,10 +3653,6 @@
36653653
"context": "configuration menu item title",
36663654
"string": "Product attributes"
36673655
},
3668-
"GTiyDh": {
3669-
"context": "filter matrix rows that need merchant attention",
3670-
"string": "Needs action"
3671-
},
36723656
"GUeIcq": {
36733657
"context": "edit structure, header",
36743658
"string": "Edit Item"
@@ -5455,10 +5439,6 @@
54555439
"context": "save preset, header",
54565440
"string": "Save view preset"
54575441
},
5458-
"PAqicb": {
5459-
"context": "button",
5460-
"string": "Cancel order"
5461-
},
54625442
"PBd/e+": {
54635443
"context": "dialog header",
54645444
"string": "Change address for order"
@@ -6532,10 +6512,6 @@
65326512
"context": "collection filter published",
65336513
"string": "Published"
65346514
},
6535-
"UZjdjP": {
6536-
"context": "aria label for needs action toggle above line matrix",
6537-
"string": "Highlight lines that need action"
6538-
},
65396515
"UcrXYE": {
65406516
"context": "Description for scheduled status when publication date is in the future",
65416517
"string": "Publication scheduled"
@@ -7785,6 +7761,10 @@
77857761
"context": "label",
77867762
"string": "Link type"
77877763
},
7764+
"ab8LMF": {
7765+
"context": "return a single order line from row menu",
7766+
"string": "Return this line"
7767+
},
77887768
"abTH5q": {
77897769
"context": "error message",
77907770
"string": "Email address is not set"
@@ -8988,10 +8968,6 @@
89888968
"context": "dialog content",
89898969
"string": "This customer doesn't have any addresses in the address book. Provide address for order."
89908970
},
8991-
"gpda9P": {
8992-
"context": "explains muted rows when needs action filter is on",
8993-
"string": "Stay visible in the list but appear faded."
8994-
},
89958971
"gr+oXW": {
89968972
"context": "page title",
89978973
"string": "Title"
@@ -9481,10 +9457,6 @@
94819457
"context": "bulk issue gift cards quantity section header",
94829458
"string": "Gift cards to issue"
94839459
},
9484-
"j9r+EY": {
9485-
"context": "section label for non-highlighted lines in needs action tooltip",
9486-
"string": "Other lines"
9487-
},
94889460
"jBl05c": {
94899461
"context": "Badge shown when channel has validation errors",
94909462
"string": "Error"
@@ -10378,10 +10350,6 @@
1037810350
"context": "staff members status active",
1037910351
"string": "Active"
1038010352
},
10381-
"nHOEZP": {
10382-
"context": "return a single order line from matrix row menu",
10383-
"string": "Return this line"
10384-
},
1038510353
"nIuKz3": {
1038610354
"context": "Refund status none",
1038710355
"string": "Draft"
@@ -11602,10 +11570,6 @@
1160211570
"context": "Shown while verification is in progress",
1160311571
"string": "Verifying..."
1160411572
},
11605-
"t53iRo": {
11606-
"context": "title for needs action filter help tooltip",
11607-
"string": "Needs action"
11608-
},
1160911573
"t7UwLY": {
1161011574
"context": "voucher status",
1161111575
"string": "Expired"
@@ -11693,10 +11657,6 @@
1169311657
"context": "variant stocks section subtitle",
1169411658
"string": "Assign this variant to a channel in the product channel manager to define warehouses allocation"
1169511659
},
11696-
"tcioFM": {
11697-
"context": "needs action help bullet for draft refunds",
11698-
"string": "Draft refunds not sent"
11699-
},
1170011660
"teWSsc": {
1170111661
"context": "assign warehouse dialog search label",
1170211662
"string": "Search warehouses"
@@ -12644,10 +12604,6 @@
1264412604
"context": "expand canceled shipments in line expanded panel",
1264512605
"string": "Show {count, plural, one {# canceled shipment} other {# canceled shipments}}"
1264612606
},
12647-
"xXlmYh": {
12648-
"context": "section label for lines included in needs action filter",
12649-
"string": "Highlighted lines"
12650-
},
1265112607
"xeMcID": {
1265212608
"string": "Warehouse created"
1265312609
},
@@ -12860,10 +12816,6 @@
1286012816
"yi1HSj": {
1286112817
"string": "({numberOfCharacters} of {maxCharacters} characters)"
1286212818
},
12863-
"yiJ6EO": {
12864-
"context": "refund a single order line from matrix row menu",
12865-
"string": "Refund this line"
12866-
},
1286712819
"yivxZJ": {
1286812820
"context": "order payment",
1286912821
"string": "Paid with Gift Card: ({link})"

playwright/pages/ordersPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class OrdersPage extends BasePage {
4444
readonly orderSummarySection = page.getByTestId("OrderSummaryCard"),
4545
readonly paymentSummarySection = page.getByTestId("payment-section"),
4646
readonly paymentStatusBadges = page.getByTestId("payment-status-badges"),
47-
readonly fulfillButton = page.getByTestId("fulfill-button"),
47+
readonly fulfillButton = page.getByTestId("order-items-fulfill-button"),
4848
readonly addProducts = page.getByTestId("add-products-button"),
4949
readonly orderTransactionsList = page.getByTestId("orderTransactionsList").locator("table"),
5050
readonly salesChannel = page.getByTestId("salesChannel"),

src/channels/components/ChannelPickerDialog/ChannelPickerDialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const ChannelPickerDialog = ({
6464
<DashboardModal.Inset>
6565
<DynamicCombobox
6666
data-test-id="channel-autocomplete"
67+
disabled={isSubmitting}
6768
label={intl.formatMessage(messages.channelName)}
6869
options={result}
6970
onInputValueChange={search}
@@ -79,7 +80,7 @@ export const ChannelPickerDialog = ({
7980
<BackButton disabled={isSubmitting} onClick={handleClose} />
8081
<ConfirmButton
8182
data-test-id="submit"
82-
disabled={isSubmitting}
83+
disabled={isSubmitting || !selectedOption?.value}
8384
onClick={() => onConfirm(selectedOption?.value ?? "")}
8485
transitionState={confirmButtonState}
8586
>

src/graphql/hooks.generated.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12215,13 +12215,9 @@ export const OrderDraftCancelDocument = gql`
1221512215
errors {
1221612216
...OrderError
1221712217
}
12218-
order {
12219-
...OrderDetails
12220-
}
1222112218
}
1222212219
}
12223-
${OrderErrorFragmentDoc}
12224-
${OrderDetailsFragmentDoc}`;
12220+
${OrderErrorFragmentDoc}`;
1222512221
export type OrderDraftCancelMutationFn = Apollo.MutationFunction<Types.OrderDraftCancelMutation, Types.OrderDraftCancelMutationVariables>;
1222612222

1222712223
/**

src/graphql/types.generated.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/orders/components/OrderDetailsDatagrid/OrderDetailsDatagrid.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const meta: Meta<typeof OrderDetailsDatagrid> = {
1414

1515
args: {
1616
lines: orderFixture.lines,
17+
order: orderFixture,
1718
loading: false,
1819
onOrderLineShowMetadata: fn(),
1920
},

0 commit comments

Comments
 (0)