@ai-matrx/records-ui 0.88.0 → 0.88.1

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,15 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.88.1 (2026-09-26)
4
+
5
+ - **Fix (merged grid): hiding a column is kept again.** Every hide sent the whole column order
6
+ with it (`presentation.columnOrder`), and the store's view registry (`custom.view_keys()`) does
7
+ not take that key yet, so `view_look_set` refused the whole look — the hide was lost on reload
8
+ (found on the live walk). The order is now sent only when somebody actually moved a column; a
9
+ moved column is still refused by the store's own sentence until the registry takes
10
+ `presentation.columnOrder` (reported to the custom-data lead). RED → GREEN in
11
+ `the-merged-grid-carries-the-older-grids-controls.test.tsx`.
12
+
3
13
  ## 0.88.0 (2026-09-26 — type-to-edit; needs @ai-matrx/design-system 0.43.0)
4
14
 
5
15
  - **Type to edit (both grids).** Select a cell and type: the cell opens ITS OWN Field editor
@@ -27,7 +37,11 @@
27
37
  (where a phone already has it) — from widths measured unfolded, so it never flips back and forth.
28
38
  Pure `toolbarFold` and the layout pair guard `overlappingPieces` are exported for walks. Suites:
29
39
  `the-toolbar-row-never-overlaps.test.tsx` RED 5/5 on 0.87.0 bytes → GREEN 5/5;
30
- `toolbarFit.test.tsx` 7/7.
40
+ `toolbarFit.test.tsx` 8/8. **When even the folded row cannot hold the layout's controls** (the
41
+ Settings rail open beside the table, a phone), the slot scrolls and never hides that it does: the
42
+ end that hides controls fades (`data-clipped` on the slot, `useSlotScroll` / `clippedEnds`), and a
43
+ mouse wheel over the slot scrolls it sideways. Walked on the harness (source bytes, dev clone,
44
+ admin's Grid Parity Fixture) at 1600, 390 and 320: 28/28, no two controls ever overlap.
31
45
 
32
46
  ## 0.87.0 (2026-09-25 — one-grid merge step 5 + tranches 6a / 6b; needs @ai-matrx/design-system 0.42.0)
33
47
 
package/dist/index.cjs CHANGED
@@ -5503,17 +5503,22 @@ function useMergedGridControls(args) {
5503
5503
  const known = new Set(fieldKeys);
5504
5504
  return (held?.hidden ?? keptHidden ?? []).filter((k) => known.has(k));
5505
5505
  }, [held, keptHidden, fieldKeys]);
5506
+ const naturalOrder = (0, import_react30.useMemo)(
5507
+ () => [...fieldKeys.filter((k) => frozenKeys.has(k)), ...fieldKeys.filter((k) => !frozenKeys.has(k))],
5508
+ [fieldKeys, frozenKeys]
5509
+ );
5506
5510
  const keepColumns = (0, import_react30.useCallback)(
5507
5511
  (next) => {
5508
5512
  setHeld(next);
5509
5513
  const { columnOrder: _o, hiddenFields: _h, ...rest } = presentation;
5514
+ const moved = next.order.length > 0 && next.order.join("\0") !== naturalOrder.join("\0");
5510
5515
  writeLook({
5511
5516
  ...rest,
5512
- ...next.order.length > 0 ? { columnOrder: next.order } : {},
5517
+ ...moved ? { columnOrder: next.order } : {},
5513
5518
  ...next.hidden.length > 0 ? { hiddenFields: next.hidden } : {}
5514
5519
  });
5515
5520
  },
5516
- [presentation, writeLook]
5521
+ [presentation, writeLook, naturalOrder]
5517
5522
  );
5518
5523
  const pendingInsert = (0, import_react30.useRef)(null);
5519
5524
  (0, import_react30.useEffect)(() => {