Skip to content

feat(plugin-list): Filter and Sort open the shared field list, and conditions show as chips under the view bar - #35643

Merged
objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/issue-35549-list-filter-sort-wiring
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/issue-35549-list-filter-sort-wiring

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35549
Fixes #35550

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户看到的变化:列表页点「筛选」或「排序」,先出现可搜索的字段清单,点字段就选值,选了马上生效;视图栏下多一行条件标签,排序在前,视图自带的条件锁住,可一键「重置」。原来的完整面板放在清单底部,「其中」两个字去掉。
  • 为什么:列表页重做专题的筛选和排序两张子卡,让筛选、排序点几下就完成。
  • 如果判断错:影响所有人的列表筛选和排序;保存方式、链接和服务器排序都没变,撤回就回到原来的面板。
  • 需要您做的:无。

What changes

This is step 2. Step 1 (#35622) and step 1b (#35634, the field-list props) have both merged, and main has been merged into this branch. This PR's diff is its own: 46 files, +918/-92.

ui/packages/plugin-list/src/ListView.tsx changes only at the list-frame card's list-condition-row slot and at the Filter/Sort trigger targets:

  • Filter opens FilterPanel: the shared field list, then values by type, applied on every pick. Its 「Advanced filter」 footer opens today's panel, with the 「Filter Records」 heading and FilterBuilder, whose props are unchanged.
  • Sort opens SortPanel: the direction on top, then the field list; one click adds a level. Its footer carries the relational-column note, and 「All sort levels」 opens today's sort panel (sortPanelBody: heading, reset to the view's sort, SortBuilder). The phone Display panel still draws sortPanelBody as before.
  • The slot gets ConditionChipRow, which renders nothing when there is nothing to show, so the slot keeps empty:hidden and its height of 0. The row draws:
    • sort chips (click reverses, drag or Alt+Arrow reorders, × removes);
    • the view's own filter as locked chips;
    • the reader's filter chips (click reopens the values, × removes);
    • 「Add filter」 and 「Reset」. Reset puts the filter and sort back to the view as saved: it clears the reader's filter, the user-filter chips and the queue toggle, and restores the sort through handleResetSort. Search stays, and so does the 「Personalized」 badge.
  • Header click sync: a column-header click already writes currentSort (handleHeaderSort), so it appears as a sort chip with no grid change.

Other changes:

  • ListConditionControls.tsx: SortPanel gains footer and renderAdvanced, mirroring the filter panel's advanced step. One new key, listConditions.sort.advanced, is added to the 11 packs.
  • filter-builder.tsx: the 「Where」 / 「其中」 label is dropped (ruling Q3). filterBuilder.where is retired from the 11 packs, and the translation probe key moves to filterBuilder.and. filterBuilder-where-retired-35549.test.ts pins the retirement.
  • The platform checklist item records-forms.adhoc-filter-sort-builder goes to revision 11: steps[1] and acceptance[2].verify now describe the field list, the chips and the two footers.

No change to the filter storage format, uf_*, server sort, shared-view permissions or draft rules.

Tests

Tests migrated or retired:

  • Twenty plugin-list suites (and one app-shell suite) read today's builders through the panels' advanced step via __tests__/conditionPanels.ts: columnsOnlyOptions-10547, columnsOnlyRelationalReads-7531, declaredDisplayField-10545, filterFieldList-11810, filterFieldRead-11925, filterDatePicker-12743, harness (draftOnlyColumn, resetSortToDefault), personalization-28950, phoneWidth-29074, relationalSort, restoreViewDefaults-28948, sortFieldFallback, sortFieldRead-11943, sortPersistLeak, sortRemovableOnly-11943, sortabilitySignal, toolbarIconButtons-12695, toolbarRows-27520, withheldFields-34901, ListViewBlock.specInputs-13047, and app-shell ObjectView.personalViews-29635.
    • The personal-views suite also gains a module-top import '@objectstack/lint', which check:test-source-alias asks of an edited test that reaches it.
  • fieldListRead-11984: the sweep reads the field list's rows too, and the Filter and Sort positions are each pinned twice, once on the field list and once on the advanced step.
  • datasetChartAppliedFilter-10512: the trigger is found by test id, because 「Add filter」 is a second button named for filters.
  • schema-catalog/filter-builder-mirror-6939: the five render readings were re-measured without the Where span. Each has one element fewer, one SPAN fewer, no Where in its text, and a new hash. The anti-vacuity floor is now ≥ 10.

Platform-checklist items edited: records-forms.adhoc-filter-sort-builder (rev 11).

New:

  • ListView.conditionRow-35549.test.tsx (5 tests):
    • CONTROL: the slot is empty;
    • Filter lists the shown fields first, and a pick applies at once with a chip;
    • Sort adds a level in the chosen direction, and × hands back the sort without it;
    • the view filter is a locked chip, and Reset is disabled while the list matches the view;
    • Reset clears the filter and restores the declared sort.
  • listConditions.test.tsx gains 2 tests: the sort panel's advanced step, and a CONTROL without it.
  • ui/e2e/list-condition-row-35549.spec.ts runs in Chromium on the real ListView (with ObjectGrid) from source and an in-memory data source:
    • CONTROL: the slot is 0 px;
    • Filter → Stage → Negotiation is three clicks, and the count goes 12 → 3; reopening the chip adds Proposal (6); × gives 12;
    • Sort → Descending → Amount is three clicks; the sort chips come before the filter chip, all on one line, with Reset at the right end; a real drag reorders the two levels; Reset clears them;
    • a header click on Amount shows up as a sort chip.
Readings at 1b9b309
  • Under the lock, pnpm --dir ui exec vitest run --maxWorkers=2 over packages/plugin-list/, packages/i18n/src/, two components builder suites, the schema-catalog mirror and app-shell personalViews-29635 gave Test Files 288 passed (288) and Tests 3979 passed | 13 skipped (3992).
  • pnpm --filter type-check for plugin-list, components and i18n all exit 0. Components first needed --filter '@object-ui/components^...' build: data-table.tsx reads a summaryRow that the stale types dist lacked.
  • Playwright, Chromium (/opt/pw-browsers/chromium): 3 passed.
  • An earlier run, before the final merge of main, covered all of packages/plugin-list/, packages/components/src/, packages/i18n/src/ and the ListView-mounting app-shell suites. Read across those runs: 778 files and 8680 tests pass; the one failure, personalViews, was then migrated. Separately, 110 app-shell files and 921 tests pass.
  • Ablation went through scripts/ablation-replace.mjs on ListView.tsx. Each mutation landed (anchor 1 → 0). Each restore matched the HEAD blob with git diff HEAD empty.
    • The panel stops calling onFilterChange: vitest 1 failed. Playwright stays 3 passed, which is the expected direction, because the list filters on its own state and onFilterChange is the host's persist channel.
    • Reset is a no-op: vitest 1 failed, Playwright 1 failed.

Acceptance notes

  • A choice for the seat to confirm: the Sort panel's 「All sort levels」 footer mirrors the ratified 「Advanced filter」 one. It keeps the relational-column note, the reset to the view's sort and removable-only rows reachable on desktop, and it lets the existing sort suites migrate by one step instead of being rewritten.
  • ListView mints sort-row ids with a bare crypto.randomUUID(), which exists only in a secure context. The e2e page is served from a localhost URL for that reason. On about:blank the header click threw TypeError: crypto.randomUUID is not a function and nothing sorted. This is reported separately and not changed here.

Verification

Files to read first, by risk:

  1. ListView.tsx, handleResetConditions / conditionsDifferFromView: what Reset clears, and what it leaves (search, the view's own filter, the 「Personalized」 badge).
  2. ListView.tsx, the two PopoverContent blocks: the old panels now sit behind renderAdvanced, so every builder path is one click further.
  3. filter-builder.tsx: the Where span is gone and the probe key is now filterBuilder.and.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-list/src/__tests__/ListView.conditionRow-35549.test.tsx should report Tests 5 passed (5).

Gates at 1b9b309

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…dition chip row, not yet mounted

The components under plugin-list/src/conditions/ and the listConditions
locale keys. Nothing in the list mounts them yet.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
FieldList takes the Options → Fields props as optional ones: order and
onOrderChange (drag, or a grip handle and the arrow keys), onHide (an eye
toggle on each shown row), onShow (one click on a hidden row), addable and
onAdd (fields that are not columns yet, under the hidden ones), and
searchPlaceholder. Every change is handed back at once. Without them the
list picks a field exactly as the filter and sort panels use it.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…space now carries

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…ndition row fills the list-condition-row slot

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
The step-1 changeset goes back to its own wording, so this PR adds a
changeset instead of editing one that another PR carries.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…ced step, as the Filter panel does

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…ugh the field list's advanced step; the condition row on the real list

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…eld-list-props

# Conflicts:
#	ui/packages/i18n/src/locales/ar.ts
#	ui/packages/i18n/src/locales/de.ts
#	ui/packages/i18n/src/locales/en.ts
#	ui/packages/i18n/src/locales/es.ts
#	ui/packages/i18n/src/locales/fr.ts
#	ui/packages/i18n/src/locales/ja.ts
#	ui/packages/i18n/src/locales/ko.ts
#	ui/packages/i18n/src/locales/pt-BR.ts
#	ui/packages/i18n/src/locales/ru.ts
#	ui/packages/i18n/src/locales/zh-Hans.ts
#	ui/packages/i18n/src/locales/zh-Hant.ts
#	ui/packages/plugin-list/src/conditions/FieldList.tsx
#	ui/packages/plugin-list/src/conditions/__tests__/listConditions.test.tsx
#	ui/packages/plugin-list/src/conditions/conditionTranslations.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: bb419dda305a01d8f93aef40f3e3c8df053206ae · 2026-11-20T00:59Z

Readings

History

What it changes

  • ListView changes only at the list-condition-row slot and the Filter/Sort trigger targets.
  • Filter opens FilterPanel. Its 「Advanced filter」 footer opens today's panel.
  • Sort opens SortPanel, which carries the relational note. Its 「All sort levels」 footer opens today's sortPanelBody. The seat ruled to keep that footer (A, 21:11Z).
  • Chip row: the slot gets ConditionChipRow. 「重置」 covers filter and sort. The 「已个性化」 badge is untouched until 列表「选项」重做:菜单化(视图名、布局、字段、分组、行高),字段可搜索、拖动排序、点眼睛隐藏 #35551. Header-click sync goes through the existing handleHeaderSort.
  • i18n: the Where label is dropped from filter-builder. filterBuilder.where is retired from the 11 packs, with a negative pin. One new key: listConditions.sort.advanced.

Tests

  • 20 plugin-list suites and app-shell personalViews were migrated through __tests__/conditionPanels.ts.
  • New: ListView.conditionRow-35549.test.tsx, 5 tests.
  • Playwright ui/e2e/list-condition-row-35549.spec.ts on the real ListView: 3/3. It covers the 0 px CONTROL, filter in 3 clicks (12 → 3 → 6 → 12), sort in 3 clicks, chip order, drag, Reset, and header click → chip.
  • Platform checklist: records-forms.adhoc-filter-sort-builder is now rev 11.
  • Locked vitest gave 288 files and 3,979 tests passed. dispatch-gates --commands: 48 run, 0 not measured.
  • Ablation: dropping onFilterChange gives vitest 1 red. A no-op Reset gives vitest 1 red and Playwright 1 red.

Out of scope: crypto.randomUUID in a non-secure context is filed as #35645 (p2).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:列表的「筛选」「排序」按钮换成新面板:先在字段清单里选字段(当前显示的字段排在前面),选完立即生效;视图栏下多一行条件标签,排序标签、视图自带条件(锁定)、你加的筛选,以及「添加筛选」「重置」。原来的高级筛选和全部排序层级仍可从面板底部进入。
  • 为什么做:列表页重做专题里筛选、排序两张卡的第二步,把之前合进去的部件接到列表上。
  • 出错会怎样:最坏是筛选或排序面板用起来不顺;存储格式不变,视图自带的筛选不会被「重置」清掉。
  • 要你做什么:无。
  • 席位意见:通过;等最后一项检查跑完,并补登记几个测试文件(文字即可),区域就可以合并。

席位核对

L1-a: ACCEPT, two items before queueing · head bb419dda305a01d8f93aef40f3e3c8df053206ae · Fixes #35549, Fixes #35550 (PR 2 of the seat's split; #35622 and #35634 merged) · K=3 · merge-tree clean · not governed (0 of 46) · 1,010 lines · 2026-11-20T01:00Z

Wiring (ListView.tsx). The edits sit at the two trigger popovers and the list-condition-row slot, plus the callbacks they need.

  • Filter popover: FilterPanel is fed filterFields, which are already read-gated, and shownFieldNames in column order. Today's FilterBuilder is unchanged behind renderAdvanced, with the same extraOperators and the same appliedFilterGroup store (objectstack#27520).
  • Sort popover: SortPanel keeps sortPanelBody as its advanced step ("All sort levels", the seat's ruling A at 21:11Z). The relational-sort notes (objectui#12528) moved into its footer.
  • Condition slot: ConditionChipRow. Its Reset clears only the reader's filter, user filters, queue-only and a non-declared sort. Search and the view's own filter stay, and the 「Personalized」 badge keeps its own reset, as amendment 7017578497 says.
  • applySort still hands the array whole to setCurrentSort, resets the page and emits.
  • No storage-format, uf_* or server-sort change.

Card item 7. The filterBuilder.where label span and its key are retired. The key goes from all 11 packs and listConditions.sort.advanced is added. filterBuilder-where-retired-35549.test.ts pins it.

Pins.

  • ListView.conditionRow-35549.test.tsx has five cells, led by a CONTROL that the slot stays empty with no sort and no filter. The others cover filter pick-and-apply, sort add and remove, the locked view chip with Reset disabled, and Reset returning to the view.
  • ui/e2e/list-condition-row-35549.spec.ts covers the geometry and the three-click paths.
  • About 25 existing ListView.* tests migrate through the shared helper __tests__/conditionPanels.ts.

R1: CI green on this head. At this reading: 51 success, 13 skipped, and Check Changeset in progress, re-running on the body edit.

R2 (text only, no push, no fresh L1): claim amendment. Amendment 7017578497's PR 2 rows allow ListView.tsx at the slot and triggers and "its existing filter/sort tests". Three groups of files fall outside that:

  • ui/examples/schema-catalog/test/filter-builder-mirror-6939.test.tsx, an example app's test following the retired 「Where」 label;
  • ui/packages/app-shell/src/views/ObjectView.personalViews-29635.test.tsx;
  • the ListView.* tests that are not about filter or sort but open those panels through the new helper: columnsOnlyOptions, columnsOnlyRelationalReads, datasetChartAppliedFilter, declaredDisplayField, personalization, phoneWidth, withheldFields, toolbarIconButtons, toolbarRows, and ListViewBlock.specInputs.

One amendment line on #35549 naming them, with that reason, closes it.

Routing. Clause-② no, no contract face, not governed: ux-1 lands it after R1 and R2. No L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-20T01:01Z

Reading Value
check-governed-merges --pr 35643 not governed, 1,010 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 3 (< 15)
CI on head bb419dda30 52 success, 13 skipped, 0 failed or pending (R1 met)

Head bb419dda305a01d8f93aef40f3e3c8df053206ae: L1-a ACCEPT 7027030209. R2 is met by claim amendment 7027040691 on #35549 (test files only). Ready + auto-merge now. This is PR 2, the last step: Fixes #35549, Fixes #35550.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 01:01
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 378c955 Nov 20, 2026
66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35549-list-filter-sort-wiring branch November 20, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants