@ai-matrx/records-ui 0.52.0 → 0.53.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 +34 -0
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.53.0
|
|
4
|
+
|
|
5
|
+
**Every card on every board said "Loading…", forever.**
|
|
6
|
+
|
|
7
|
+
Birchwood Avenue Renovation is a whole-house remodel run out of a spare bedroom.
|
|
8
|
+
Her quotes board, grouped by Quote stage, had the counts exactly right — Accepted
|
|
9
|
+
6, Expired 1, Pending 6, Rejected 1, No value 1, off her real quotes — and all
|
|
10
|
+
fifteen cards under those headings read "Loading…" and never resolved. No error,
|
|
11
|
+
no refusal, no spinner that ever stopped. She could count her quotes and could
|
|
12
|
+
not open one.
|
|
13
|
+
|
|
14
|
+
The cause was one missing argument. `scalarText` draws "Loading…" for an id it
|
|
15
|
+
has no resolver for, and `Card` called it with no resolver at all, so a title
|
|
16
|
+
Field of type `list` or `relation` could never resolve on any card, ever — and
|
|
17
|
+
Birchwood's title field is `room`, a relation to her rooms table. `Kanban` asks
|
|
18
|
+
the resolver for the GROUPING field, which is precisely why the headings read
|
|
19
|
+
"Accepted" while the cards beneath them read "Loading…": two halves of one board,
|
|
20
|
+
one asking and one not.
|
|
21
|
+
|
|
22
|
+
`Card` is the card of the **kanban, the calendar and the gallery**, so one
|
|
23
|
+
argument broke three layouts and one fix closes all three. The component that
|
|
24
|
+
draws the value now declares the Field it is about to draw, which is also what
|
|
25
|
+
makes a future surface unable to reintroduce this by forgetting; `want` is keyed
|
|
26
|
+
by Field id, so two hundred cards still ask once.
|
|
27
|
+
|
|
28
|
+
**And a card that cannot load now says why.** Declaring the Field is what lets
|
|
29
|
+
the resolver SETTLE it. Once settled, an id it did not return is chased one at a
|
|
30
|
+
time and comes back either as the record's own name or as the store's own
|
|
31
|
+
sentence for a record this reader may not open
|
|
32
|
+
(`platform.relation_withheld_label()`). "Loading…" is now only ever true.
|
|
33
|
+
|
|
34
|
+
`src/card-names-what-it-draws.test.tsx` — three clauses, two shown RED on
|
|
35
|
+
0.52.0's bytes ("Loading…") and green on these.
|
|
36
|
+
|
|
3
37
|
## 0.52.0
|
|
4
38
|
|
|
5
39
|
**Four things this package could make and no screen could reach: a form, a
|
package/dist/index.cjs
CHANGED
|
@@ -6404,6 +6404,7 @@ function Card({
|
|
|
6404
6404
|
|
|
6405
6405
|
// src/ViewSwitcher.tsx
|
|
6406
6406
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
6407
|
+
var NO_FIELDS = [];
|
|
6407
6408
|
function useViewRecords(view, pageSize = 200) {
|
|
6408
6409
|
const client = (0, import_react46.useRecordsClient)();
|
|
6409
6410
|
const table = (0, import_react46.useRecords)(view.ruleId ? null : view.subject, { pageSize });
|
|
@@ -6773,7 +6774,12 @@ function Card2({
|
|
|
6773
6774
|
onOpenRecord
|
|
6774
6775
|
}) {
|
|
6775
6776
|
const host = useRecordsUi();
|
|
6776
|
-
const
|
|
6777
|
+
const wanted = (0, import_react45.useMemo)(
|
|
6778
|
+
() => field && pointsAtRecords(field) ? [field] : NO_FIELDS,
|
|
6779
|
+
[field]
|
|
6780
|
+
);
|
|
6781
|
+
const labels = useRecordLabels(wanted);
|
|
6782
|
+
const label = field ? scalarText(field, (record.document ?? {})[field.key], labels) : rowName(record, null, "Untitled");
|
|
6777
6783
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
6778
6784
|
"button",
|
|
6779
6785
|
{
|