From 14d4c8220e57f8f8549400c3fd6425a9dbd4acaa Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 14:28:15 +0000 Subject: [PATCH] refactor(plugin-dashboard, plugin-list)!: retire eight zero-consumer entry exports plugin-dashboard's entry stops publishing CONFIG_PANEL_DEFAULT_TRANSLATIONS, useConfigPanelTranslation, RetiredDashboardNodeTombstone, reportRetiredDashboardNodeType and resetRetiredDashboardNodeTypeReports; plugin-list's stops publishing ViewSwitcherDropdown, TabBarSelect and evaluateConditionalFormatting. Each name had zero hits outside its package (workspace and hotcrm); every module stays. The dashboard bare-key test imports the tombstone and its reset helper from their module. Claude-Session: https://claude.ai/code/session_01L6bhgUR8Nu4M7tbtgES7q2 Co-authored-by: Claude --- ...-plugin-dashboard-zero-consumer-exports.md | 18 +++++++++++ ...25921-plugin-list-zero-consumer-exports.md | 18 +++++++++++ .../dashboardBareKeyOwnership.test.tsx | 6 ++-- ui/packages/plugin-dashboard/src/index.tsx | 32 +++++++------------ ui/packages/plugin-list/src/index.tsx | 8 +++-- 5 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 .changeset/25921-plugin-dashboard-zero-consumer-exports.md create mode 100644 .changeset/25921-plugin-list-zero-consumer-exports.md diff --git a/.changeset/25921-plugin-dashboard-zero-consumer-exports.md b/.changeset/25921-plugin-dashboard-zero-consumer-exports.md new file mode 100644 index 00000000000..5076ad20d97 --- /dev/null +++ b/.changeset/25921-plugin-dashboard-zero-consumer-exports.md @@ -0,0 +1,18 @@ +--- +'@object-ui/plugin-dashboard': patch +--- + +refactor(plugin-dashboard)!: retire five zero-consumer exports (the config panel's defaults table and hook, the retired-node tombstone and its report and reset helpers) + +Clause-②: no (narrowing) +Metadata-protocol: none + + + +**BREAKING** for a host that imports any of these five names from `@object-ui/plugin-dashboard`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package: the config panels keep using the hook and its table, and the package still registers the tombstone for every retired dashboard node type, so an authored `view:dashboard` is refused by name exactly as before. Only the entry stops publishing them. `RETIRED_DASHBOARD_NODE_TYPES`, `ConfigPanelTranslate`, `DashboardMetricNodeSchema`, the three `WidgetDataset*` types and every component stay exported unchanged. + +What leaves, and what to write instead (none has a replacement export): + +- FROM `CONFIG_PANEL_DEFAULT_TRANSLATIONS`, `useConfigPanelTranslation` TO no replacement: `DashboardConfigPanel` and `WidgetConfigPanel` translate their own labels; mount an `I18nProvider` to change them. +- FROM `RetiredDashboardNodeTombstone` TO no replacement: the package registers it under every key of `RETIRED_DASHBOARD_NODE_TYPES` itself, so rendering a retired node through `SchemaRenderer` still shows the refusal. +- FROM `reportRetiredDashboardNodeType`, `resetRetiredDashboardNodeTypeReports` TO no replacement: the tombstone reports on its own, once per retired type; read the migration text from `RETIRED_DASHBOARD_NODE_TYPES`. diff --git a/.changeset/25921-plugin-list-zero-consumer-exports.md b/.changeset/25921-plugin-list-zero-consumer-exports.md new file mode 100644 index 00000000000..632206e7649 --- /dev/null +++ b/.changeset/25921-plugin-list-zero-consumer-exports.md @@ -0,0 +1,18 @@ +--- +'@object-ui/plugin-list': patch +--- + +refactor(plugin-list)!: retire three zero-consumer exports (the view switcher dropdown, the tab bar select and the conditional formatting wrapper) + +Clause-②: no (narrowing) +Metadata-protocol: none + + + +**BREAKING** for a host that imports any of these three names from `@object-ui/plugin-list`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package (`ListView` keeps rendering `ViewSwitcherDropdown`); only the entry stops publishing them. `ListView`, `ViewSwitcher`, `TabBar`, `UserFilters`, `normalizeFilterCondition`, `normalizeFilters`, `LIST_DEFAULT_TRANSLATIONS` and every exported type, `TabBarProps` included, stay exported unchanged. + +What leaves, and what to write instead: + +- FROM `ViewSwitcherDropdown` TO `ViewSwitcher`, or render `ListView`, which draws the dropdown itself. +- FROM `TabBarSelect` TO `TabBar`, which takes the same `TabBarProps`. +- FROM `evaluateConditionalFormatting` TO `resolveConditionalFormatting` from `@object-ui/core`, the function it wrapped: same arguments, result typed as `React.CSSProperties`. diff --git a/ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx b/ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx index bf013598761..0b633465d5a 100644 --- a/ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx +++ b/ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx @@ -67,12 +67,12 @@ import { ComponentRegistry, Registry, type ComponentMeta } from '@object-ui/core // Importing the package entry is what performs the registrations, exactly as a // host does. The renderer is compared by IDENTITY below, so these pins cannot be // satisfied by a look-alike. +import { DashboardRenderer, RETIRED_DASHBOARD_NODE_TYPES } from '../index'; +// Not on the package entry: the module the entry registers them from. import { - DashboardRenderer, - RETIRED_DASHBOARD_NODE_TYPES, RetiredDashboardNodeTombstone, resetRetiredDashboardNodeTypeReports, -} from '../index'; +} from '../retired-node-types'; afterEach(cleanup); diff --git a/ui/packages/plugin-dashboard/src/index.tsx b/ui/packages/plugin-dashboard/src/index.tsx index dbf4a38d5d4..c2f1540099d 100644 --- a/ui/packages/plugin-dashboard/src/index.tsx +++ b/ui/packages/plugin-dashboard/src/index.tsx @@ -29,15 +29,11 @@ import { export { DashboardRenderer, DashboardGridLayout, MetricWidget, MetricCard, ObjectMetricWidget, PivotTable, ObjectPivotTable, ObjectDataTable, DashboardConfigPanel, WidgetConfigPanel, DashboardWithConfig, DrillDownDrawer }; export type { WidgetConfigPanelProps } from './WidgetConfigPanel'; -// objectui#4748 — the config sidebar's provider-less English, exported for the -// same reason the sibling plugins export theirs: a defaults map that disagrees -// with the `en` pack renders two labels for one control, and the assertion that -// it does not needs to be able to import it. -export { - CONFIG_PANEL_DEFAULT_TRANSLATIONS, - useConfigPanelTranslation, - type ConfigPanelTranslate, -} from './useConfigPanelTranslation'; +// The config sidebar's translate function type. `CONFIG_PANEL_DEFAULT_TRANSLATIONS` +// and `useConfigPanelTranslation` left this entry with zero importers outside +// the package: the defaults-vs-pack mirror gate reads every defaults table +// from source, so it needs no import from here. +export type { ConfigPanelTranslate } from './useConfigPanelTranslation'; export type { WidgetDatasetCatalogEntry, WidgetDatasetDimension, @@ -48,17 +44,13 @@ export type { // Exported from the entry so the published typings load that declaration for // every consumer of this package, not only for this package's own program. export type { DashboardMetricNodeSchema } from './widgetDispatch'; -// objectui#9533 — the retirement table and the widget it renders. Exported for -// the same reason the sibling packages export their tombstones: the assertion -// that an authored `view:dashboard` is refused BY NAME, with the migration in -// the refusal's own text, has to be able to import the text it asserts rather -// than restate it. -export { - RETIRED_DASHBOARD_NODE_TYPES, - RetiredDashboardNodeTombstone, - reportRetiredDashboardNodeType, - resetRetiredDashboardNodeTypeReports, -} from './retired-node-types'; +// objectui#9533 — the retirement table. Exported so an assertion that an +// authored `view:dashboard` is refused BY NAME, with the migration in the +// refusal's own text, can import the text it asserts rather than restate it. +// The tombstone widget and its report/reset helpers left this entry with zero +// importers outside the package; the package's own tests import them from +// `./retired-node-types`. +export { RETIRED_DASHBOARD_NODE_TYPES } from './retired-node-types'; // Register dashboard component // diff --git a/ui/packages/plugin-list/src/index.tsx b/ui/packages/plugin-list/src/index.tsx index 150cfb6066c..97a97cb5f91 100644 --- a/ui/packages/plugin-list/src/index.tsx +++ b/ui/packages/plugin-list/src/index.tsx @@ -14,12 +14,14 @@ import { ViewSwitcher } from './ViewSwitcher'; import { ObjectGallery } from './ObjectGallery'; export { ListView, ListViewBlock, ViewSwitcher, ObjectGallery }; -export { ViewSwitcherDropdown } from './ViewSwitcher'; -export { TabBar, TabBarSelect } from './components/TabBar'; +// `ViewSwitcherDropdown`, `TabBarSelect` and `evaluateConditionalFormatting` +// left this entry with zero importers outside the package; their modules keep +// them for `ListView` and the package's own tests. +export { TabBar } from './components/TabBar'; export type { TabBarProps, ViewTab } from './components/TabBar'; export { UserFilters } from './UserFilters'; export type { UserFiltersProps, UserFiltersHandle } from './UserFilters'; -export { evaluateConditionalFormatting, normalizeFilterCondition, normalizeFilters } from './ListView'; +export { normalizeFilterCondition, normalizeFilters } from './ListView'; // The provider-less fallback table, exported so objectui#4401's mirror gate can // compare it against the `en` pack from a package that depends on both. export { LIST_DEFAULT_TRANSLATIONS } from './ListView';