Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions apps/shopify-app/app/routes/app.routes.$routeId.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -879,25 +879,6 @@ const childRouteDisclosureEmptyStyle = {
color: "#6d7175",
};

const childRouteActionsHeaderCellStyle = {
...childRouteOrderHeaderCellStyle,
background: "#f7f7f7",
boxShadow: "-8px 0 12px rgba(255, 255, 255, 0.92)",
position: "sticky",
right: 0,
zIndex: 3,
};

const childRouteActionsCellStyle = {
...childRouteOrderCellStyle,
background: "#ffffff",
boxShadow: "-8px 0 12px rgba(255, 255, 255, 0.92)",
overflow: "visible",
position: "sticky",
right: 0,
zIndex: 2,
};

const childStopActionsButtonStyle = {
...routeActionButtonStyle,
minHeight: "28px",
Expand Down Expand Up @@ -1700,6 +1681,25 @@ const childRouteOrderCellStyle = {
textAlign: "center",
};

const childRouteActionsHeaderCellStyle = {
...childRouteOrderHeaderCellStyle,
background: "#f7f7f7",
boxShadow: "-8px 0 12px rgba(255, 255, 255, 0.92)",
position: "sticky",
right: 0,
zIndex: 3,
};

const childRouteActionsCellStyle = {
...childRouteOrderCellStyle,
background: "#ffffff",
boxShadow: "-8px 0 12px rgba(255, 255, 255, 0.92)",
overflow: "visible",
position: "sticky",
right: 0,
zIndex: 2,
};

const childRouteStopCellStyle = {
...childRouteOrderCellStyle,
padding: "8px 0",
Expand Down
12 changes: 12 additions & 0 deletions apps/shopify-app/tests/route-detail-child-presentation.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@ test("child timeline and order table share explicit centered alignment axes", ()
assert.match(routeDetailSource, /style=\{column\.key === "actions" \? childRouteActionsHeaderCellStyle : childRouteOrderHeaderCellStyle\}/);
});

test("child action cell styles initialize after the shared styles they extend", () => {
const orderHeaderIndex = routeDetailSource.indexOf("const childRouteOrderHeaderCellStyle");
const orderCellIndex = routeDetailSource.indexOf("const childRouteOrderCellStyle");
const actionsHeaderIndex = routeDetailSource.indexOf("const childRouteActionsHeaderCellStyle");
const actionsCellIndex = routeDetailSource.indexOf("const childRouteActionsCellStyle");

assert.ok(orderHeaderIndex >= 0);
assert.ok(orderCellIndex >= 0);
assert.ok(actionsHeaderIndex > orderHeaderIndex);
assert.ok(actionsCellIndex > orderCellIndex);
});

test("child timeline keeps breathing room and stop digits share a browser-neutral optical correction", () => {
assert.match(routeDetailSource, /const childRouteTimelineStyle = \{[\s\S]*padding: "8px 8px 16px"/);
assert.match(routeDetailSource, /aria-label="Child route stop timeline"[\s\S]*style=\{childRouteTimelineStyle\}/);
Expand Down