Skip to content

Commit 14d4c82

Browse files
committed
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 <noreply@anthropic.com>
1 parent fa9c0aa commit 14d4c82

5 files changed

Lines changed: 56 additions & 26 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/plugin-dashboard': patch
3+
---
4+
5+
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)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-dashboard#CONFIG_PANEL_DEFAULT_TRANSLATIONS, @object-ui/plugin-dashboard#useConfigPanelTranslation, @object-ui/plugin-dashboard#RetiredDashboardNodeTombstone, @object-ui/plugin-dashboard#reportRetiredDashboardNodeType, @object-ui/plugin-dashboard#resetRetiredDashboardNodeTypeReports) the retired operands are a provider-less English defaults table, the translation hook that reads it, the React widget that refuses a retired dashboard node type and its two console-report helpers; nothing in the workspace or in hotcrm imports any of them from the package entry, and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**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.
13+
14+
What leaves, and what to write instead (none has a replacement export):
15+
16+
- FROM `CONFIG_PANEL_DEFAULT_TRANSLATIONS`, `useConfigPanelTranslation` TO no replacement: `DashboardConfigPanel` and `WidgetConfigPanel` translate their own labels; mount an `I18nProvider` to change them.
17+
- 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.
18+
- 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`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
---
4+
5+
refactor(plugin-list)!: retire three zero-consumer exports (the view switcher dropdown, the tab bar select and the conditional formatting wrapper)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-list#ViewSwitcherDropdown, @object-ui/plugin-list#TabBarSelect, @object-ui/plugin-list#evaluateConditionalFormatting) the retired operands are two React components and a function that wraps `@object-ui/core`'s conditional formatting resolver; nothing in the workspace or in hotcrm imports any of them from the package entry, and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**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.
13+
14+
What leaves, and what to write instead:
15+
16+
- FROM `ViewSwitcherDropdown` TO `ViewSwitcher`, or render `ListView`, which draws the dropdown itself.
17+
- FROM `TabBarSelect` TO `TabBar`, which takes the same `TabBarProps`.
18+
- FROM `evaluateConditionalFormatting` TO `resolveConditionalFormatting` from `@object-ui/core`, the function it wrapped: same arguments, result typed as `React.CSSProperties`.

‎ui/packages/plugin-dashboard/src/__tests__/dashboardBareKeyOwnership.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ import { ComponentRegistry, Registry, type ComponentMeta } from '@object-ui/core
6767
// Importing the package entry is what performs the registrations, exactly as a
6868
// host does. The renderer is compared by IDENTITY below, so these pins cannot be
6969
// satisfied by a look-alike.
70+
import { DashboardRenderer, RETIRED_DASHBOARD_NODE_TYPES } from '../index';
71+
// Not on the package entry: the module the entry registers them from.
7072
import {
71-
DashboardRenderer,
72-
RETIRED_DASHBOARD_NODE_TYPES,
7373
RetiredDashboardNodeTombstone,
7474
resetRetiredDashboardNodeTypeReports,
75-
} from '../index';
75+
} from '../retired-node-types';
7676

7777
afterEach(cleanup);
7878

‎ui/packages/plugin-dashboard/src/index.tsx‎

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@ import {
2929

3030
export { DashboardRenderer, DashboardGridLayout, MetricWidget, MetricCard, ObjectMetricWidget, PivotTable, ObjectPivotTable, ObjectDataTable, DashboardConfigPanel, WidgetConfigPanel, DashboardWithConfig, DrillDownDrawer };
3131
export type { WidgetConfigPanelProps } from './WidgetConfigPanel';
32-
// objectui#4748 — the config sidebar's provider-less English, exported for the
33-
// same reason the sibling plugins export theirs: a defaults map that disagrees
34-
// with the `en` pack renders two labels for one control, and the assertion that
35-
// it does not needs to be able to import it.
36-
export {
37-
CONFIG_PANEL_DEFAULT_TRANSLATIONS,
38-
useConfigPanelTranslation,
39-
type ConfigPanelTranslate,
40-
} from './useConfigPanelTranslation';
32+
// The config sidebar's translate function type. `CONFIG_PANEL_DEFAULT_TRANSLATIONS`
33+
// and `useConfigPanelTranslation` left this entry with zero importers outside
34+
// the package: the defaults-vs-pack mirror gate reads every defaults table
35+
// from source, so it needs no import from here.
36+
export type { ConfigPanelTranslate } from './useConfigPanelTranslation';
4137
export type {
4238
WidgetDatasetCatalogEntry,
4339
WidgetDatasetDimension,
@@ -48,17 +44,13 @@ export type {
4844
// Exported from the entry so the published typings load that declaration for
4945
// every consumer of this package, not only for this package's own program.
5046
export type { DashboardMetricNodeSchema } from './widgetDispatch';
51-
// objectui#9533 — the retirement table and the widget it renders. Exported for
52-
// the same reason the sibling packages export their tombstones: the assertion
53-
// that an authored `view:dashboard` is refused BY NAME, with the migration in
54-
// the refusal's own text, has to be able to import the text it asserts rather
55-
// than restate it.
56-
export {
57-
RETIRED_DASHBOARD_NODE_TYPES,
58-
RetiredDashboardNodeTombstone,
59-
reportRetiredDashboardNodeType,
60-
resetRetiredDashboardNodeTypeReports,
61-
} from './retired-node-types';
47+
// objectui#9533 — the retirement table. Exported so an assertion that an
48+
// authored `view:dashboard` is refused BY NAME, with the migration in the
49+
// refusal's own text, can import the text it asserts rather than restate it.
50+
// The tombstone widget and its report/reset helpers left this entry with zero
51+
// importers outside the package; the package's own tests import them from
52+
// `./retired-node-types`.
53+
export { RETIRED_DASHBOARD_NODE_TYPES } from './retired-node-types';
6254

6355
// Register dashboard component
6456
//

‎ui/packages/plugin-list/src/index.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ import { ViewSwitcher } from './ViewSwitcher';
1414
import { ObjectGallery } from './ObjectGallery';
1515

1616
export { ListView, ListViewBlock, ViewSwitcher, ObjectGallery };
17-
export { ViewSwitcherDropdown } from './ViewSwitcher';
18-
export { TabBar, TabBarSelect } from './components/TabBar';
17+
// `ViewSwitcherDropdown`, `TabBarSelect` and `evaluateConditionalFormatting`
18+
// left this entry with zero importers outside the package; their modules keep
19+
// them for `ListView` and the package's own tests.
20+
export { TabBar } from './components/TabBar';
1921
export type { TabBarProps, ViewTab } from './components/TabBar';
2022
export { UserFilters } from './UserFilters';
2123
export type { UserFiltersProps, UserFiltersHandle } from './UserFilters';
22-
export { evaluateConditionalFormatting, normalizeFilterCondition, normalizeFilters } from './ListView';
24+
export { normalizeFilterCondition, normalizeFilters } from './ListView';
2325
// The provider-less fallback table, exported so objectui#4401's mirror gate can
2426
// compare it against the `en` pack from a package that depends on both.
2527
export { LIST_DEFAULT_TRANSLATIONS } from './ListView';

0 commit comments

Comments
 (0)