@stapel/listings-react 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @stapel/listings-react
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c8ee74: listings: the gated heart's reason survives the gesture that opened it, and the view count leaves the specs table
8
+
9
+ **The anonymous heart, seventh pass, and the first one with a timeline.** Six walker passes read "tap the heart, nothing happens". The disclosure was there and correct — a popover carrying "Sign in to do this" and the door — and it was, in fact, opening on the tap. The instrumented run on the deployed build says so to the millisecond: `click` at +0 ms, `ant-popover-hidden` dropped at +7 ms, the finger lifts and the emulated hover ends at +10 ms, antd's `mouseLeaveDelay` expires at +110 ms, the leave motion finishes and the overlay is hidden again at +260 ms. A quarter-second flash on a phone is not a disclosure.
10
+
11
+ The previous fix made activation MONOTONIC for the duration of the click's own dispatch — a flag set in the capture phase and dropped one microtask later. That is the right rule against the click's own toggle, which is the failure a synthetic click can reproduce, and it is blind to this one: the closer is not part of the gesture, it is a timer a fifth of a second behind it.
12
+
13
+ So an activated disclosure now PINS. Once a click, a tap, Enter or Space has opened it, hover-out, blur and the trigger's own toggle may no longer close it; only a dismissal does, and because refusing antd's close takes those away, the component listens for them itself — a pointer down outside both the control and the overlay, or `Escape`. A pointer down INSIDE the overlay does not dismiss, or the sign-in link would be gone between the press and the click that follows it. A hover that was never clicked keeps its old, unpinned behaviour, so a cursor crossing a grid of twenty-four cards does not leave a trail of open popovers behind it.
14
+
15
+ Five tests, and the first of them fails on the previous implementation with the deployed symptom.
16
+
17
+ **The view count is a fact about the page, not a property of the goods.** It rendered as a `Descriptions.Item` in the same table as the location and the stock — on the measured phone page that put "Views 6" between the colour attribute and "Where it is", roughly 1600px down, read as a characteristic of the phone (walker D106). It now reads on a meta line under the title and above the price, where a reader looks for how much company they have. `data-testid="listings-detail-views"` still holds the bare number; the line around it is `listings-detail-meta`.
18
+
19
+ Two consequences worth stating. The specs table renders nothing at all when the listing carries neither stock nor a location — the view count used to hide that empty table by almost always being present. And there is still no favourite COUNT anywhere, because the wire has none: `is_favorited` is a per-reader boolean and the schema carries no aggregate, which the existing contract test pins under all five spellings.
20
+
3
21
  ## 0.19.0
4
22
 
5
23
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"GateReasonPopover.d.ts","sourceRoot":"","sources":["../../src/default/GateReasonPopover.tsx"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;0DAC0D;AAC1D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;oDACgD;IAChD,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;6EACyE;IACzE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;kFAC8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,SAAS,CAAC;CACrE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAmE7E"}
1
+ {"version":3,"file":"GateReasonPopover.d.ts","sourceRoot":"","sources":["../../src/default/GateReasonPopover.tsx"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;0DAC0D;AAC1D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;oDACgD;IAChD,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;6EACyE;IACzE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;kFAC8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,SAAS,CAAC;CACrE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAqG7E"}
@@ -27,7 +27,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
27
27
  * screen (see `ListingCardBlockedReason`). The rule's disables below are the
28
28
  * documented decision §2.4 asks for, not a hole.
29
29
  *
30
- * ── Why the disclosure is CONTROLLED: hover opened it, the click shut it ───
30
+ * ── Why the disclosure is CONTROLLED, and why activation PINS it ──────────
31
31
  *
32
32
  * An uncontrolled popover triggered by hover AND click treats the click as a
33
33
  * TOGGLE, so the natural pointer gesture — rest on the control, then press it
@@ -36,24 +36,38 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
36
36
  * the one control that was supposed to explain itself and watched it go
37
37
  * blank. Reproduced in jsdom and gated by `test/favoriteGesture.test.tsx`.
38
38
  *
39
- * It needs the DELAY to reproduce, which is the interesting part: antd opens
40
- * a hover popover after 0.1s, so two events fired back to back (a thumb's
41
- * emulated `mouseenter` + `click`) land while nothing is open yet and the
42
- * click opens it correctly. A cursor that lingers is past the delay, and its
43
- * click closes what the hover opened. The suite was green throughout because
44
- * every existing test fired `click` alone — a synthetic click carries no
45
- * hover in front of it, so it exercised the one ordering that worked.
39
+ * So `open` is this component's own state. The first version of that made
40
+ * activation MONOTONIC for the duration of the click's own dispatch a flag
41
+ * set in the capture phase and dropped a microtask later and it closed the
42
+ * toggle, which was the half of the problem a synthetic click can show.
46
43
  *
47
- * So `open` is this component's own state and activation is MONOTONIC: a
48
- * click may only open the disclosure, never close it. Hover-out, blur and a
49
- * click outside still close it, because those arrive as an `onOpenChange`
50
- * that no activation is claiming.
44
+ * It was not the half a THUMB meets, and the deployed measurement (walker
45
+ * D72, pass 7, the whole timeline in `logs-fp8/fp8-d72-diag3.json`) is
46
+ * unambiguous about which half that is. A real tap DOES open this: the
47
+ * overlay loses `ant-popover-hidden` 7 ms after `click`. Then the emulated
48
+ * hover the tap carried ENDS — a finger that has lifted is hovering nothing —
49
+ * `mouseleave` arrives ~10 ms later, antd's `mouseLeaveDelay` runs its 0.1 s,
50
+ * the leave motion runs, and the overlay is hidden again ~260 ms after it
51
+ * appeared. A quarter-second flash on a phone is indistinguishable from a
52
+ * control that did nothing, which is exactly how six passes read it. The
53
+ * microtask flag could not see this: the closer is not the click's toggle,
54
+ * it is a TIMER two hundred milliseconds behind the gesture.
55
+ *
56
+ * A disclosure that a person deliberately opened therefore PINS: once
57
+ * activated it stays open until it is dismissed, and hover-out, blur and the
58
+ * trigger's own toggle may no longer close it. Dismissal is the two gestures
59
+ * that mean "I am done reading" — a pointer down outside the control and
60
+ * outside the overlay, or `Escape` — and this component listens for both
61
+ * itself, because refusing antd's close is what takes them away.
62
+ *
63
+ * Hover keeps its old, unpinned behaviour: a cursor that rests on the control
64
+ * opens it and a cursor that leaves closes it, with no click involved.
51
65
  *
52
66
  * Deliberately NOT exported from `src/default/index.ts`: it is how this
53
67
  * pair's own gated hearts speak, not a control a host composes with — the
54
68
  * same standing `favorite.tsx` has.
55
69
  */
56
- import { useCallback, useId, useRef, useState } from "react";
70
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
57
71
  import { Flex, Typography } from "antd";
58
72
  // eslint-disable-next-line stapel/no-tooltip-in-skin -- interaction disclosure, not a hover: opens on click/tap and focus too, anchored to a non-disabled control, with the reason kept in the a11y tree via aria-describedby (see this file's header)
59
73
  import { Popover } from "antd";
@@ -63,26 +77,57 @@ import { SignInLink } from "./SignInLink.js";
63
77
  export function GateReasonPopover(props) {
64
78
  const reasonId = useId();
65
79
  const [open, setOpen] = useState(false);
66
- // Set in the capture phase of a click, i.e. BEFORE the popover's own
67
- // handler runs on the same event, and dropped once that event is fully
68
- // dispatched. While it is set, "close" is the tap's own toggle and is
69
- // refused; see the file header.
70
- const activating = useRef(false);
80
+ // Set by an ACTIVATION and cleared only by a dismissal. While it is set,
81
+ // every close antd asks for the click's own toggle, the hover-out timer,
82
+ // a blur is refused; see the file header.
83
+ const pinned = useRef(false);
84
+ // The two regions a dismissing gesture must NOT land in: the control itself
85
+ // (pressing it again restates the refusal) and the overlay (the sign-in
86
+ // door lives in there, and closing on its own pointerdown would take the
87
+ // link away before the click that follows it).
88
+ const anchorRef = useRef(null);
89
+ const overlayRef = useRef(null);
90
+ const dismiss = useCallback(() => {
91
+ pinned.current = false;
92
+ setOpen(false);
93
+ }, []);
71
94
  const handleOpenChange = useCallback((next) => {
72
- if (!next && activating.current)
95
+ if (!next && pinned.current)
73
96
  return;
74
97
  setOpen(next);
75
98
  }, []);
76
99
  const activate = useCallback(() => {
77
- activating.current = true;
100
+ pinned.current = true;
78
101
  setOpen(true);
79
- // A microtask runs after the whole event dispatch, so the flag covers
80
- // exactly this gesture and no later hover-out.
81
- queueMicrotask(() => {
82
- activating.current = false;
83
- });
84
102
  }, []);
85
- return (_jsxs(_Fragment, { children: [_jsx("span", { id: reasonId, style: visuallyHidden, children: props.reason }), _jsx(Popover, { trigger: ["hover", "focus", "click"], open: open, onOpenChange: handleOpenChange, content: _jsxs(Flex, { vertical: true, gap: spacing[1], "data-testid": props.testId, children: [_jsx(Typography.Text, { children: props.reason }), _jsx(SignInLink, { cta: props.cta, testId: props.signInTestId })] }), children: _jsx("div", { onClickCapture: activate, onKeyDownCapture: (event) => {
103
+ // Antd closes an unpinned popover on an outside click of its own; a pinned
104
+ // one has to be given those gestures back, or it would be a panel with no
105
+ // way out on the one device that most needs the pin.
106
+ useEffect(() => {
107
+ if (!open)
108
+ return undefined;
109
+ const doc = anchorRef.current?.ownerDocument ?? document;
110
+ const outside = (target) => target instanceof Node &&
111
+ anchorRef.current?.contains(target) !== true &&
112
+ overlayRef.current?.contains(target) !== true;
113
+ const onPointerDown = (event) => {
114
+ if (outside(event.target))
115
+ dismiss();
116
+ };
117
+ const onKeyDown = (event) => {
118
+ if (event.key === "Escape")
119
+ dismiss();
120
+ };
121
+ // Capture, so a handler that stops propagation on its own container
122
+ // cannot leave this stuck open.
123
+ doc.addEventListener("pointerdown", onPointerDown, true);
124
+ doc.addEventListener("keydown", onKeyDown, true);
125
+ return () => {
126
+ doc.removeEventListener("pointerdown", onPointerDown, true);
127
+ doc.removeEventListener("keydown", onKeyDown, true);
128
+ };
129
+ }, [open, dismiss]);
130
+ return (_jsxs(_Fragment, { children: [_jsx("span", { id: reasonId, style: visuallyHidden, children: props.reason }), _jsx(Popover, { trigger: ["hover", "focus", "click"], open: open, onOpenChange: handleOpenChange, content: _jsx("div", { ref: overlayRef, children: _jsxs(Flex, { vertical: true, gap: spacing[1], "data-testid": props.testId, children: [_jsx(Typography.Text, { children: props.reason }), _jsx(SignInLink, { cta: props.cta, testId: props.signInTestId })] }) }), children: _jsx("div", { ref: anchorRef, onClickCapture: activate, onKeyDownCapture: (event) => {
86
131
  if (event.key === "Enter" || event.key === " ")
87
132
  activate();
88
133
  }, children: props.children({ "aria-describedby": reasonId }) }) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"GateReasonPopover.js","sourceRoot":"","sources":["../../src/default/GateReasonPopover.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,M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nB,oBAAoB;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;6BAEyB;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IACrC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC;6EACyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;sDAEkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAwiB7E"}
@@ -106,7 +106,7 @@ export function ListingDetailPane(props) {
106
106
  .filter((view) => !isRedactedValue(view.value))
107
107
  .map((view) => formatFeatureValue(view.feature, view.value, { t, locale }))
108
108
  .filter((text) => text !== undefined)
109
- .join(" · ") })) : null] }));
109
+ .join(" · ") })) : null, bag.viewCount !== undefined ? (_jsxs(Typography.Text, { type: "secondary", "data-testid": "listings-detail-meta", style: { display: "block" }, children: [t(LISTINGS_I18N_KEYS.detailViews), ":", " ", _jsx("span", { "data-testid": "listings-detail-views", children: bag.viewCount })] })) : null] }));
110
110
  /* In the split the price leads the buy column at level 2 — the
111
111
  measured page had it at 22px UNDER the title, smaller than the
112
112
  thing it prices, which is backwards on the one line a buyer
@@ -157,8 +157,12 @@ export function ListingDetailPane(props) {
157
157
  const specsSection = (_jsxs(_Fragment, { children: [_jsx(Typography.Title, { level: 5, children: t(LISTINGS_I18N_KEYS.detailSpecs) }), specs, bag.unreadableFeatures > 0 ? (_jsx(Typography.Text, { type: "warning", "data-testid": "listings-detail-unreadable", children: t(LISTINGS_I18N_KEYS.detailUnreadableFeatures, {
158
158
  count: bag.unreadableFeatures,
159
159
  }) })) : null] }));
160
- const meta = (_jsxs(Descriptions, { size: "small", column: 1, children: [listing.stock_quantity != null ? (_jsx(Descriptions.Item, { label: t(LISTINGS_I18N_KEYS.detailStock), children: _jsx("span", { "data-testid": "listings-detail-stock", children: listing.stock_quantity }) })) : null, listing.location_label !== undefined &&
161
- listing.location_label.length > 0 ? (_jsx(Descriptions.Item, { label: t(LISTINGS_I18N_KEYS.composeLocationLabel), children: listing.location_label })) : null, bag.viewCount !== undefined ? (_jsx(Descriptions.Item, { label: t(LISTINGS_I18N_KEYS.detailViews), children: _jsx("span", { "data-testid": "listings-detail-views", children: bag.viewCount }) })) : null] }));
160
+ const hasStock = listing.stock_quantity != null;
161
+ const hasPlace = listing.location_label !== undefined &&
162
+ listing.location_label.length > 0;
163
+ // Both rows absent draws an empty table, which the view count used
164
+ // to hide by almost always being there. Nothing is nothing.
165
+ const meta = !hasStock && !hasPlace ? null : (_jsxs(Descriptions, { size: "small", column: 1, children: [hasStock ? (_jsx(Descriptions.Item, { label: t(LISTINGS_I18N_KEYS.detailStock), children: _jsx("span", { "data-testid": "listings-detail-stock", children: listing.stock_quantity }) })) : null, hasPlace ? (_jsx(Descriptions.Item, { label: t(LISTINGS_I18N_KEYS.composeLocationLabel), children: listing.location_label })) : null] }));
162
166
  const aside = props.aside !== undefined ? (_jsx("div", { "data-testid": "listings-detail-aside", children: props.aside })) : null;
163
167
  if (!split) {
164
168
  // The single column, in the order it has always read — the
@@ -1 +1 @@
1
- {"version":3,"file":"ListingDetailPane.js","sourceRoot":"","sources":["../../src/default/ListingDetailPane.tsx"],"names":[],"mappings":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AClB,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;gDACf,SAAS,EAAE,OAAO;6CACnB,aAEA,KAAK,EACL,MAAM,EACN,WAAW,EACX,KAAK,IACD,IACH,IACL,CACJ,CAAC;oBACJ,CAAC;iBACF,CAAC,IACG,GACG,CACb,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ListingDetailPane.js","sourceRoot":"","sources":["../../src/default/ListingDetailPane.tsx"],"names":[],"mappings":";AAqDA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AACnF,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,SAAS,EACT,aAAa,EACb,OAAO,EACP,IAAI,GACL,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAA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AAY,EACb,8BACc,uBAAuB,EACnC,KAAK,EAAE;wCACL,OAAO,EAAE,MAAM;wCACf,uDAAuD;wCACvD,uDAAuD;wCACvD,0DAA0D;wCAC1D,uDAAuD;wCACvD,mBAAmB,EAAE,kBAAkB,kBAAkB,EAAE;wCAC3D,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;wCACf,UAAU,EAAE,OAAO;qCACpB,aAED,MAAC,IAAI,IAAC,QAAQ,QAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,aAC3B,OAAO,EACP,OAAO,EACR,KAAC,OAAO,KAAG,EACV,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,KAAK,CAAC,MAAM,IACR,EAMP,MAAC,IAAI,IACH,QAAQ,QACR,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,iBACH,4BAA4B,EACxC,KAAK,EAAE;gDACL,QAAQ,EAAE,QAAQ;gDAClB,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;gDACf,SAAS,EAAE,OAAO;6CACnB,aAEA,KAAK,EACL,MAAM,EACN,WAAW,EACX,KAAK,IACD,IACH,IACL,CACJ,CAAC;oBACJ,CAAC;iBACF,CAAC,IACG,GACG,CACb,CAAC;AACJ,CAAC"}
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @stapel/listings-react 0.19.0
1
+ # @stapel/listings-react 0.20.0
2
2
 
3
3
  Headless React flow pair for stapel-listings (contract >=0.17 <0.18) — business + state, zero visual opinion.
4
4
  Built on @stapel/core: typed client + StapelApiError envelope, auth token refresh,
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$generated": "by scripts/gen-manifest.mjs — do not edit; drift-gated (pnpm gen:manifest:check)",
3
3
  "package": "@stapel/listings-react",
4
- "version": "0.19.0",
4
+ "version": "0.20.0",
5
5
  "backend": {
6
6
  "module": "stapel-listings",
7
7
  "contract": ">=0.17 <0.18"
package/nav-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@stapel/listings-react",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "entries": [
5
5
  {
6
6
  "id": "listings.detail",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stapel/listings-react",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Headless React pair for stapel-listings: a typed client over the draft twin, the composer that turns a category schema into a submittable listing, and the owner's dashboard. Two independent axes are rendered as two — lifecycle `status` decides visibility and `moderation_status` decides nothing about it, so an edit to a live listing stays live and says 'under review' instead of vanishing. Feature values are drawn and mirrored by @stapel/attributes-react; photos arrive as an injected upload bag whose `refs` ARE `images_draft` and whose `settled` gates the submit; a publish refusal is routed onto the control that caused it by slug. Zero visual opinion in the main entry; an opt-in /default subpath ships the antd skin.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -102,7 +102,7 @@
102
102
  "size-limit": "^11.2.0",
103
103
  "typescript": "^5.8.3",
104
104
  "vitest": "^3.2.4",
105
- "@stapel/attributes-react": "^0.13.0",
105
+ "@stapel/attributes-react": "^0.14.1",
106
106
  "@stapel/core": "^0.23.1",
107
107
  "@stapel/currencies-react": "^0.3.0",
108
108
  "@stapel/image": "^0.4.2",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$generated": "by scripts/gen-events.mjs — do not edit; drift-gated (pnpm gen:events:check)",
3
3
  "package": "@stapel/listings-react",
4
- "version": "0.19.0",
4
+ "version": "0.20.0",
5
5
  "defined": [],
6
6
  "flows": []
7
7
  }
@@ -26,7 +26,7 @@
26
26
  * screen (see `ListingCardBlockedReason`). The rule's disables below are the
27
27
  * documented decision §2.4 asks for, not a hole.
28
28
  *
29
- * ── Why the disclosure is CONTROLLED: hover opened it, the click shut it ───
29
+ * ── Why the disclosure is CONTROLLED, and why activation PINS it ──────────
30
30
  *
31
31
  * An uncontrolled popover triggered by hover AND click treats the click as a
32
32
  * TOGGLE, so the natural pointer gesture — rest on the control, then press it
@@ -35,24 +35,38 @@
35
35
  * the one control that was supposed to explain itself and watched it go
36
36
  * blank. Reproduced in jsdom and gated by `test/favoriteGesture.test.tsx`.
37
37
  *
38
- * It needs the DELAY to reproduce, which is the interesting part: antd opens
39
- * a hover popover after 0.1s, so two events fired back to back (a thumb's
40
- * emulated `mouseenter` + `click`) land while nothing is open yet and the
41
- * click opens it correctly. A cursor that lingers is past the delay, and its
42
- * click closes what the hover opened. The suite was green throughout because
43
- * every existing test fired `click` alone — a synthetic click carries no
44
- * hover in front of it, so it exercised the one ordering that worked.
38
+ * So `open` is this component's own state. The first version of that made
39
+ * activation MONOTONIC for the duration of the click's own dispatch a flag
40
+ * set in the capture phase and dropped a microtask later and it closed the
41
+ * toggle, which was the half of the problem a synthetic click can show.
45
42
  *
46
- * So `open` is this component's own state and activation is MONOTONIC: a
47
- * click may only open the disclosure, never close it. Hover-out, blur and a
48
- * click outside still close it, because those arrive as an `onOpenChange`
49
- * that no activation is claiming.
43
+ * It was not the half a THUMB meets, and the deployed measurement (walker
44
+ * D72, pass 7, the whole timeline in `logs-fp8/fp8-d72-diag3.json`) is
45
+ * unambiguous about which half that is. A real tap DOES open this: the
46
+ * overlay loses `ant-popover-hidden` 7 ms after `click`. Then the emulated
47
+ * hover the tap carried ENDS — a finger that has lifted is hovering nothing —
48
+ * `mouseleave` arrives ~10 ms later, antd's `mouseLeaveDelay` runs its 0.1 s,
49
+ * the leave motion runs, and the overlay is hidden again ~260 ms after it
50
+ * appeared. A quarter-second flash on a phone is indistinguishable from a
51
+ * control that did nothing, which is exactly how six passes read it. The
52
+ * microtask flag could not see this: the closer is not the click's toggle,
53
+ * it is a TIMER two hundred milliseconds behind the gesture.
54
+ *
55
+ * A disclosure that a person deliberately opened therefore PINS: once
56
+ * activated it stays open until it is dismissed, and hover-out, blur and the
57
+ * trigger's own toggle may no longer close it. Dismissal is the two gestures
58
+ * that mean "I am done reading" — a pointer down outside the control and
59
+ * outside the overlay, or `Escape` — and this component listens for both
60
+ * itself, because refusing antd's close is what takes them away.
61
+ *
62
+ * Hover keeps its old, unpinned behaviour: a cursor that rests on the control
63
+ * opens it and a cursor that leaves closes it, with no click involved.
50
64
  *
51
65
  * Deliberately NOT exported from `src/default/index.ts`: it is how this
52
66
  * pair's own gated hearts speak, not a control a host composes with — the
53
67
  * same standing `favorite.tsx` has.
54
68
  */
55
- import { useCallback, useId, useRef, useState } from "react";
69
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
56
70
  import type { ReactElement, ReactNode } from "react";
57
71
  import { Flex, Typography } from "antd";
58
72
  // eslint-disable-next-line stapel/no-tooltip-in-skin -- interaction disclosure, not a hover: opens on click/tap and focus too, anchored to a non-disabled control, with the reason kept in the a11y tree via aria-describedby (see this file's header)
@@ -87,27 +101,58 @@ export interface GateReasonPopoverProps {
87
101
  export function GateReasonPopover(props: GateReasonPopoverProps): ReactElement {
88
102
  const reasonId = useId();
89
103
  const [open, setOpen] = useState(false);
90
- // Set in the capture phase of a click, i.e. BEFORE the popover's own
91
- // handler runs on the same event, and dropped once that event is fully
92
- // dispatched. While it is set, "close" is the tap's own toggle and is
93
- // refused; see the file header.
94
- const activating = useRef(false);
104
+ // Set by an ACTIVATION and cleared only by a dismissal. While it is set,
105
+ // every close antd asks for the click's own toggle, the hover-out timer,
106
+ // a blur is refused; see the file header.
107
+ const pinned = useRef(false);
108
+ // The two regions a dismissing gesture must NOT land in: the control itself
109
+ // (pressing it again restates the refusal) and the overlay (the sign-in
110
+ // door lives in there, and closing on its own pointerdown would take the
111
+ // link away before the click that follows it).
112
+ const anchorRef = useRef<HTMLDivElement | null>(null);
113
+ const overlayRef = useRef<HTMLDivElement | null>(null);
114
+
115
+ const dismiss = useCallback((): void => {
116
+ pinned.current = false;
117
+ setOpen(false);
118
+ }, []);
95
119
 
96
120
  const handleOpenChange = useCallback((next: boolean): void => {
97
- if (!next && activating.current) return;
121
+ if (!next && pinned.current) return;
98
122
  setOpen(next);
99
123
  }, []);
100
124
 
101
125
  const activate = useCallback((): void => {
102
- activating.current = true;
126
+ pinned.current = true;
103
127
  setOpen(true);
104
- // A microtask runs after the whole event dispatch, so the flag covers
105
- // exactly this gesture and no later hover-out.
106
- queueMicrotask(() => {
107
- activating.current = false;
108
- });
109
128
  }, []);
110
129
 
130
+ // Antd closes an unpinned popover on an outside click of its own; a pinned
131
+ // one has to be given those gestures back, or it would be a panel with no
132
+ // way out on the one device that most needs the pin.
133
+ useEffect(() => {
134
+ if (!open) return undefined;
135
+ const doc = anchorRef.current?.ownerDocument ?? document;
136
+ const outside = (target: EventTarget | null): boolean =>
137
+ target instanceof Node &&
138
+ anchorRef.current?.contains(target) !== true &&
139
+ overlayRef.current?.contains(target) !== true;
140
+ const onPointerDown = (event: Event): void => {
141
+ if (outside(event.target)) dismiss();
142
+ };
143
+ const onKeyDown = (event: KeyboardEvent): void => {
144
+ if (event.key === "Escape") dismiss();
145
+ };
146
+ // Capture, so a handler that stops propagation on its own container
147
+ // cannot leave this stuck open.
148
+ doc.addEventListener("pointerdown", onPointerDown, true);
149
+ doc.addEventListener("keydown", onKeyDown, true);
150
+ return () => {
151
+ doc.removeEventListener("pointerdown", onPointerDown, true);
152
+ doc.removeEventListener("keydown", onKeyDown, true);
153
+ };
154
+ }, [open, dismiss]);
155
+
111
156
  return (
112
157
  <>
113
158
  {/* The floor: the reason reaches AT without a pointer, popover or no
@@ -122,10 +167,12 @@ export function GateReasonPopover(props: GateReasonPopoverProps): ReactElement {
122
167
  open={open}
123
168
  onOpenChange={handleOpenChange}
124
169
  content={
125
- <Flex vertical gap={spacing[1]} data-testid={props.testId}>
126
- <Typography.Text>{props.reason}</Typography.Text>
127
- <SignInLink cta={props.cta} testId={props.signInTestId} />
128
- </Flex>
170
+ <div ref={overlayRef}>
171
+ <Flex vertical gap={spacing[1]} data-testid={props.testId}>
172
+ <Typography.Text>{props.reason}</Typography.Text>
173
+ <SignInLink cta={props.cta} testId={props.signInTestId} />
174
+ </Flex>
175
+ </div>
129
176
  }
130
177
  >
131
178
  {/* A plain wrapper takes the props Popover clones onto its direct
@@ -141,6 +188,7 @@ export function GateReasonPopover(props: GateReasonPopoverProps): ReactElement {
141
188
  `aria-disabled` in every engine. Capture, so they run before the
142
189
  popover's own toggle sees the same event. */}
143
190
  <div
191
+ ref={anchorRef}
144
192
  onClickCapture={activate}
145
193
  onKeyDownCapture={(event) => {
146
194
  if (event.key === "Enter" || event.key === " ") activate();
@@ -344,6 +344,33 @@ export function ListingDetailPane(props: ListingDetailPaneProps): ReactElement {
344
344
  .join(" · ")}
345
345
  </Typography.Text>
346
346
  ) : null}
347
+
348
+ {/* How many people opened it — the listing's own meta line,
349
+ under the title, where a reader looks for how much company
350
+ they have. It spent one release as a row of the
351
+ `<Descriptions>` below (walker D106): wedged between the
352
+ colour attribute and the location row, two screens down,
353
+ read as a PROPERTY OF THE GOODS rather than a fact about
354
+ the page. A view count is not a characteristic of a phone.
355
+
356
+ `bag.viewCount` is `undefined` when the response carries
357
+ no such field, and then there is no line at all — never a
358
+ zero standing in for an absence. There is no favourite
359
+ count beside it because the wire has none: the schema
360
+ carries `is_favorited`, a per-reader boolean, and no
361
+ aggregate anywhere (asserted in test/engagementState). */}
362
+ {bag.viewCount !== undefined ? (
363
+ <Typography.Text
364
+ type="secondary"
365
+ data-testid="listings-detail-meta"
366
+ style={{ display: "block" }}
367
+ >
368
+ {t(LISTINGS_I18N_KEYS.detailViews)}:{" "}
369
+ <span data-testid="listings-detail-views">
370
+ {bag.viewCount}
371
+ </span>
372
+ </Typography.Text>
373
+ ) : null}
347
374
  </>
348
375
  );
349
376
 
@@ -586,37 +613,35 @@ export function ListingDetailPane(props: ListingDetailPaneProps): ReactElement {
586
613
  </>
587
614
  );
588
615
 
589
- const meta = (
616
+ const hasStock = listing.stock_quantity != null;
617
+ const hasPlace =
618
+ listing.location_label !== undefined &&
619
+ listing.location_label.length > 0;
620
+
621
+ // Both rows absent draws an empty table, which the view count used
622
+ // to hide by almost always being there. Nothing is nothing.
623
+ const meta = !hasStock && !hasPlace ? null : (
590
624
  <Descriptions size="small" column={1}>
591
625
  {/* Label cell and value cell, which is what a `<Descriptions>`
592
626
  row IS: the label key carries no `{count}` (it did, and the
593
627
  page printed the placeholder), the quantity is the value. */}
594
- {listing.stock_quantity != null ? (
628
+ {hasStock ? (
595
629
  <Descriptions.Item label={t(LISTINGS_I18N_KEYS.detailStock)}>
596
630
  <span data-testid="listings-detail-stock">
597
631
  {listing.stock_quantity}
598
632
  </span>
599
633
  </Descriptions.Item>
600
634
  ) : null}
601
- {listing.location_label !== undefined &&
602
- listing.location_label.length > 0 ? (
635
+ {hasPlace ? (
603
636
  <Descriptions.Item
604
637
  label={t(LISTINGS_I18N_KEYS.composeLocationLabel)}
605
638
  >
606
639
  {listing.location_label}
607
640
  </Descriptions.Item>
608
641
  ) : null}
609
- {/* How many people opened it. `bag.viewCount` is `undefined`
610
- for a response that carries no such field which is every
611
- response today so this row simply is not there, and no
612
- zero stands in for the absence. */}
613
- {bag.viewCount !== undefined ? (
614
- <Descriptions.Item label={t(LISTINGS_I18N_KEYS.detailViews)}>
615
- <span data-testid="listings-detail-views">
616
- {bag.viewCount}
617
- </span>
618
- </Descriptions.Item>
619
- ) : null}
642
+ {/* The view count used to be a third row here. It is a fact
643
+ about the PAGE, not a property of the goods, so it now
644
+ reads on the meta line under the title see `heading`. */}
620
645
  </Descriptions>
621
646
  );
622
647