Repository navigation
feat(ui): one Personalized marker beside the list title holds the one reset to the view - #29266
Merged
Merged
Conversation
…st title holds the one reset to the view ListView reports which parts of the list on screen differ from its view through a new optional host prop, onPersonalizationChange; with it the Display control draws no reset of its own. The Console draws the marker in the page header's badge slot and beside the phone title, and its reset clears the reader's stored entry and cached search, strips the whole uf_* family from the URL and remounts the list. The header overflow entry "Reset view" goes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQki8itS3sC2eZCj7J
…ker and its one reset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQki8itS3sC2eZCj7J
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQki8itS3sC2eZCj7J
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQki8itS3sC2eZCj7J
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T10:59ZHead-sha:
|
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #28950
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
uf_*参数会把旧列表带回来,搜索词也会从缓存回填。读者看不出列表被改过,也找不到一个能彻底恢复的地方。ListView多一个可选宿主属性onPersonalizationChange,i18n 多一组键,没有元数据键或选项。未传该属性的宿主(InterfaceListPage、ObjectDataPage、嵌入列表)保留原来的 Display 重置。回滚即 revert 本 PR,无数据迁移。ui/packages/app-shell/src/views/objectViewListUrlState.ts(handleResetView与withoutListStateParams:清存储、清搜索缓存、剥离整组uf_*)、ui/packages/plugin-list/src/ListView.tsx(各部分与视图的比对)、ui/packages/app-shell/src/views/ListPersonalizedMarker.tsx。pnpm dev:crm打开 Accounts 列表,按名称倒序并搜索a:标题旁出现「已个性化」;点开看到「搜索」「排序」,点「恢复为视图设置」:列表回到视图排序、搜索清空、地址栏不再有uf_*,刷新后仍然干净,标记消失。What changes
While a reader's list differs from its view, the Console draws one Personalized marker beside the list title. Opening it names what differs and holds the one Reset to view, with a sentence saying what it covers and what it leaves alone. The marker is not configurable: no metadata key and no option reach it.
ListView(@object-ui/plugin-list): one new optional host prop,onPersonalizationChange(parts). It reports, on change, which parts of the list on screen differ from the view:sort,filters(panel conditions, user-filter chips, the queue toggle),search,grouping,hiddenFields,density,layout,rowColor,rowNumbers,inlineEdit. The callback is read through a ref (AGENTS.md chore: version packages #10), and the report is keyed on the joined part list, so it fires only when the set changes. With the prop wired, the Display popover draws no reset of its own (onResetis left undefined;ViewSettingsPopover.tsxis untouched).viewDefaultsalso acceptsgrouping, the view's own grouping under one the host laid over it; without that key, the grouping the list opened with counts as the view's.ListPersonalizedMarker.tsx(new, app-shell): an outline pill with a popover. Belowsmit is the icon alone, named by itsaria-label, so it never pushes the view name out. Each part label is a literal i18n key.objectViewListUrlState.ts: the reset now drops the view's stored entry, clears the cached search term, and strips the wholeuf_*family from the address (uf__filter,uf__search,uf__sort,uf__groupand everyuf_<field>chip) through the newwithoutListStateParams. A pending-reset flag makes the next seed read storage, not the URL, so a reload or an opened link cannot bring the old list back. The host addscolumnsto the parts when the stored entry carries a column state.ObjectView.tsx,objectViewPageHeader.tsx: the marker sits in the existing PageHeaderbadgeslot (both header faces) and beside the phone title.PageHeader.tsxis not edited.objectViewPageHeader.tsx,objectViewHeaderChrome.tsx: the ⋯ entry "Reset view" and the folded bar'sobject_view_reset_viewaction are gone; ⋯ keeps favorites and is drawn only when favorites are.console.objectView.personalized,personalizedHeadingandpersonalizedParts.*;resetViewandresetViewTitleare reworded to label the marker's reset and say everything it covers. No key is removed.content/docs/ui/views.mdx, the list personalization paragraph..changeset/28950-list-personalized-marker.md, patch on plugin-list, app-shell and i18n.Why
Measured on main a4015ab before the change (code reading):
uf__search) and theuf_<field>chips. After a reload or an opened link it left everything the URL carried, because the remount re-seeded sort, filters, search and grouping from the sameuf_*params. A reader who changed only search, grouping, chips or a Display setting was never offered it.So a reader had two partial resets and no sign the list was theirs. The card asks for one marker and one whole reset.
Tests
ui/packages/plugin-list/src/__tests__/ListView.personalization-28950.test.tsx(new, 12): nothing reported on the view's own list; sort compared againstviewDefaults; search and filters; an incomplete filter row is not a filter; grouping againstviewDefaultsplus its control; hidden fields and density; a row-numbers toggle reported and then reverted; typed search; no Display reset when the callback is wired, kept without it (control); the sort popover's own reset stays.ui/packages/app-shell/src/views/ObjectView.listPersonalized-28950.test.tsx(new, 5):withoutListStateParamsstrips the family and keepsfilter[owner]; the marker shows only while parts are reported and ⋯ has no reset; after a reload the reset leaves nouf_*param, keepsfilter[owner], and the list opens with no search, filters or chips and the view's sort; in session the reset clears the cached search; a stored column state alone draws the marker and the reset clears it (control).ui/packages/app-shell/src/views/ObjectView.userListState-12418.test.tsx: its ⋯ "Reset view" pins move to the marker.Ablations (each restored, tree byte-identical to HEAD):
&& !resetfrom the seed condition turns the reload test red (1 of 5 failed).onResetunconditional turns the "no Display reset" test red (1 of 12 failed).Acceptance notes
onPersonalizationChangekeep it.filter[...]scope, and the gallery card size (an object-wide setting, not this view's state, so it is not a marker part either).Screenshots (examples/app-crm, Accounts,
?uf__sort=[name desc]&uf__search=aopened as a link, then the reset, then a reload). The 16 files are in the project files underissue-28950/shots/(before-andafter-,1440-and390-):Verification
Readings at b2d090d (merge of main dedc350, which carries #29047 and #29108 as ea150b7):
pnpm exec turbo run type-checkfor plugin-list, app-shell and i18n with dependencies: 67/67.pnpm build(whole workspace): 117/117.ui/: plugin-list 183 files, 1759 passed; app-shellObjectView*/objectView*set 88 files, 735 passed (351 + 384); i18n 95 files, 1443 passed, 13 skipped; the two new files plus 12418, 37 passed.node scripts/pm/dispatch-gates.mjs --ran: 66 derived families, all run, all exit 0 (includescheck-sdui-manifestandvitest run scripts/).check-changeset-no-major,check-adr-0087-registration,check-closing-keyword-parity,check-partof-closing-keywordall exit 0.location.searchempty and a reload keeps it empty at 1440 and 390 px.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (ui eslint on the touched files: 0 errors)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jQki8itS3sC2eZCj7J