Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/25921-plugin-dashboard-zero-consumer-exports.md
Original file line number Diff line number Diff line change
@@ -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

<!-- 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 -->

**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`.
18 changes: 18 additions & 0 deletions .changeset/25921-plugin-list-zero-consumer-exports.md
Original file line number Diff line number Diff line change
@@ -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

<!-- 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 -->

**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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
32 changes: 12 additions & 20 deletions ui/packages/plugin-dashboard/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
//
Expand Down
8 changes: 5 additions & 3 deletions ui/packages/plugin-list/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Loading