Commit 93a85b2
feat(SchemaForm): field-type-aware operators + values for view filter (#2766)
Align the Studio view-config filter editor with the canonical @objectstack/spec
ViewFilterRule operator vocabulary and reuse the runtime FilterBuilder (which
already provides per-field-type operator lists, value inputs, and i18n) instead
of raw repeater rows.
- ResourceEditPage: resolve the source object from `data.object` so view filter
rows get the object field catalog that drives operator/value widgets.
- widgets.tsx FilterBuilderWidget: write the canonical operator vocabulary
(greater_than, not_equals, before/after, …); reads still accept legacy
shorthand/camelCase spellings from already-stored metadata and round-trip
unknown operators instead of rewriting them.
- Runtime operator->AST maps (ListView.mapOperator, UserFilters.specOperatorToAst)
now accept the canonical long-form operators the builder writes, alongside the
existing shorthand spellings.
Depends on the paired @objectstack/spec change (ViewFilterRule operator enum +
`widget: 'filter-builder'` on the view filter field) for the operator dropdown.
Claude-Session: https://claude.ai/code/session_01PwbhoMeqh33xFWq5M77QTJ
Co-authored-by: Claude <noreply@anthropic.com>1 parent 190cc40 commit 93a85b2
4 files changed
Lines changed: 44 additions & 19 deletions
File tree
- packages
- app-shell/src/views/metadata-admin
- plugin-list/src
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
1675 | 1676 | | |
1676 | 1677 | | |
1677 | 1678 | | |
1678 | | - | |
1679 | | - | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1680 | 1683 | | |
1681 | 1684 | | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1682 | 1688 | | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1687 | 1699 | | |
1688 | 1700 | | |
1689 | 1701 | | |
| |||
1700 | 1712 | | |
1701 | 1713 | | |
1702 | 1714 | | |
1703 | | - | |
| 1715 | + | |
| 1716 | + | |
1704 | 1717 | | |
| 1718 | + | |
1705 | 1719 | | |
1706 | 1720 | | |
1707 | 1721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | | - | |
81 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| |||
0 commit comments