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-designer-internal-helpers-off-entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@object-ui/plugin-designer': patch
---

refactor(plugin-designer)!: retire six zero-consumer exports (the collaboration provider and its status indicator, three canvas hooks and the property editor)

Clause-②: yes (narrowing)
Metadata-protocol: none

<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-designer#CollaborationProvider, @object-ui/plugin-designer#ConnectionStatusIndicator, @object-ui/plugin-designer#useClipboard, @object-ui/plugin-designer#useMultiSelect, @object-ui/plugin-designer#useCanvasPanZoom, @object-ui/plugin-designer#PropertyEditor) the retired operands are React components and hooks in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 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 six names from `@object-ui/plugin-designer`. 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 four designers keep using the hooks and the property panel internally); only the entry stops publishing them. The designers, their `…Props` types, `useUndoRedo`, `useDesignerHistory`, `useConfirmDialog`, `ConfirmDialog`, `Minimap`, `VersionHistory`, the app pages and the metadata pages stay exported unchanged.

What leaves, and what to write instead (none has a replacement export):

- FROM `CollaborationProvider`, `ConnectionStatusIndicator` TO no replacement: render the designers without the wrapper; real-time co-editing is no longer offered from outside the package.
- FROM `useClipboard`, `useMultiSelect`, `useCanvasPanZoom` TO no replacement: the designer canvases already copy/paste, multi-select and pan/zoom on their own; keep a local copy of the hook if you used it in your own canvas.
- FROM `PropertyEditor` TO no replacement: the designers render their own property panel; for a form of your own, use `SchemaRenderer` with a form schema.
19 changes: 19 additions & 0 deletions .changeset/25921-plugin-gantt-internal-helpers-off-entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@object-ui/plugin-gantt': patch
---

refactor(plugin-gantt)!: retire nineteen zero-consumer exports (the quick-filter bar, the resource-workload grid, the workload math and the shift-band helpers)

Clause-②: yes (narrowing)
Metadata-protocol: none

<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-gantt#QuickFilterBar, @object-ui/plugin-gantt#QuickFilterBarProps, @object-ui/plugin-gantt#QuickFilterField, @object-ui/plugin-gantt#QuickFilterOption, @object-ui/plugin-gantt#QuickFilterLabels, @object-ui/plugin-gantt#QuickFilterDef, @object-ui/plugin-gantt#ResourceWorkload, @object-ui/plugin-gantt#ResourceWorkloadProps, @object-ui/plugin-gantt#computeWorkload, @object-ui/plugin-gantt#WorkloadColumn, @object-ui/plugin-gantt#WorkloadOptions, @object-ui/plugin-gantt#ResourceCell, @object-ui/plugin-gantt#ResourceLoad, @object-ui/plugin-gantt#normalizeDependencies, @object-ui/plugin-gantt#normalizeShiftSegments, @object-ui/plugin-gantt#shiftDayStart, @object-ui/plugin-gantt#bandAt, @object-ui/plugin-gantt#ShiftSegmentsConfig, @object-ui/plugin-gantt#ShiftBandConfig) the retired operands are React components, helper functions and their TypeScript types in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 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 nineteen names from `@object-ui/plugin-gantt`. 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 (`ObjectGantt` still renders the quick-filter bar, the resource view and the shift bands from them); only the entry stops publishing them. `ObjectGantt`, `ObjectGanttRenderer`, `GanttView`, the task, dependency, link and marker types, `normalizeTaskType`, `parseHHMM` and the `NormShiftSegments` / `NormShiftBand` types that `GanttViewProps.shiftSegments` takes stay exported unchanged.

What leaves, and what to write instead (none has a replacement export):

- FROM `QuickFilterBar`, `QuickFilterBarProps`, `QuickFilterField`, `QuickFilterOption`, `QuickFilterLabels`, `QuickFilterDef` TO no replacement: declare `gantt.quickFilters` on the `object-gantt` node and let `ObjectGantt` draw the bar.
- FROM `ResourceWorkload`, `ResourceWorkloadProps`, `computeWorkload`, `WorkloadColumn`, `WorkloadOptions`, `ResourceCell`, `ResourceLoad` TO no replacement: set `gantt.resourceView: true` with `assigneeField` (and optionally `effortField` / `capacity`) and let `ObjectGantt` render the workload grid.
- FROM `normalizeShiftSegments`, `shiftDayStart`, `bandAt`, `ShiftSegmentsConfig`, `ShiftBandConfig` TO no replacement: declare `gantt.timeSegments`; to drive `GanttView` directly, pass `shiftSegments` already in the `NormShiftSegments` shape.
- FROM `normalizeDependencies` TO no replacement: give each `GanttTask` you pass to `GanttView` a `dependencies` array of ids or `{ id, type }` objects (`GanttDependency[]`).
64 changes: 13 additions & 51 deletions ui/packages/plugin-designer/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# @object-ui/plugin-designer

Visual designers for Object UI — page, data model, process, and report designers with collaboration support.
Visual designers for Object UI — page, data model, process, and report designers.

## Features

- 🎨 **Page Designer** - Drag-and-drop page builder with component tree
- 🗄️ **Data Model Designer** - Entity-relationship diagram editor with auto-layout
- ⚙️ **Process Designer** - BPMN-style process flow editor with minimap
- 📝 **Report Designer** - Visual report layout builder with sections
- 🤝 **Collaboration Provider** - Real-time multi-user editing with connection status
- ↩️ **Undo/Redo** - Full undo/redo history via `useUndoRedo`
- 📋 **Clipboard** - Copy/paste support via `useClipboard`
- 🔲 **Multi-Select** - Bulk selection via `useMultiSelect`
- 🔍 **Canvas Pan/Zoom** - Smooth pan and zoom via `useCanvasPanZoom`
- 📋 **Clipboard** - Copy/paste inside the designer canvases
- 🔲 **Multi-Select** - Bulk selection inside the designer canvases
- 🔍 **Canvas Pan/Zoom** - Smooth pan and zoom on the page, data model and process canvases
- 🗺️ **Minimap** - Overview minimap for large canvases
- 📦 **Auto-registered** - Components register with `ComponentRegistry` on import

Expand All @@ -30,14 +29,8 @@ npm install @object-ui/plugin-designer
## Quick Start

```tsx
import { CollaborationProvider, PageDesigner } from '@object-ui/plugin-designer';
import type { CollaborationConfig, DesignerComponent } from '@object-ui/types';

const collaboration: CollaborationConfig = {
enabled: true,
roomId: 'landing-page',
showCursors: true,
};
import { PageDesigner } from '@object-ui/plugin-designer';
import type { DesignerComponent } from '@object-ui/types';

const componentList: DesignerComponent[] = [
{
Expand All @@ -51,13 +44,11 @@ const componentList: DesignerComponent[] = [

function DesignerApp() {
return (
<CollaborationProvider config={collaboration}>
<PageDesigner
components={componentList}
showComponentTree
undoRedo
/>
</CollaborationProvider>
<PageDesigner
components={componentList}
showComponentTree
undoRedo
/>
);
}
```
Expand Down Expand Up @@ -131,50 +122,21 @@ declare const sections: ReportDesignerSection[];
<ReportDesigner reportName="Sales Report" objectName="Order" sections={sections} />;
```

### CollaborationProvider / ConnectionStatusIndicator

Multi-user real-time editing support:

```tsx
import {
CollaborationProvider,
ConnectionStatusIndicator,
PageDesigner,
} from '@object-ui/plugin-designer';
import type { CollaborationConfig } from '@object-ui/types';

declare const collaboration: CollaborationConfig;

<CollaborationProvider config={collaboration}>
<ConnectionStatusIndicator />
<PageDesigner showComponentTree undoRedo />
</CollaborationProvider>;
```

### Shared Hooks

```tsx
import {
useUndoRedo,
useClipboard,
useMultiSelect,
useCanvasPanZoom,
useConfirmDialog,
} from '@object-ui/plugin-designer';
import { useUndoRedo, useConfirmDialog } from '@object-ui/plugin-designer';

import type { DesignerComponent } from '@object-ui/types';

const { undo, redo, canUndo, canRedo } = useUndoRedo<DesignerComponent[]>([]);
const { clipboard, copy, paste, hasContent } = useClipboard<DesignerComponent>();
const { selectedIds, selectOne, selectMany, clearSelection } = useMultiSelect();
const { zoom, panOffset, zoomIn, zoomOut, resetZoom } = useCanvasPanZoom();
const { confirm, isOpen } = useConfirmDialog();
```

### Shared Components

```tsx
import { ConfirmDialog, Minimap, PropertyEditor, VersionHistory } from '@object-ui/plugin-designer';
import { ConfirmDialog, Minimap, VersionHistory } from '@object-ui/plugin-designer';
```

## Links
Expand Down
12 changes: 4 additions & 8 deletions ui/packages/plugin-designer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { PageDesigner } from './PageDesigner';
import { DataModelDesigner } from './DataModelDesigner';
import { ProcessDesigner } from './ProcessDesigner';
import { ReportDesigner } from './ReportDesigner';
import { CollaborationProvider, ConnectionStatusIndicator } from './CollaborationProvider';
import { AppCreationWizard } from './AppCreationWizard';
import { NavigationDesigner } from './NavigationDesigner';
import { EditorModeToggle } from './EditorModeToggle';
Expand All @@ -25,8 +24,6 @@ export {
DataModelDesigner,
ProcessDesigner,
ReportDesigner,
CollaborationProvider,
ConnectionStatusIndicator,
AppCreationWizard,
NavigationDesigner,
EditorModeToggle,
Expand All @@ -44,21 +41,20 @@ export type { BrandingEditorProps } from './BrandingEditor';
export type { ObjectManagerProps } from './ObjectManager';
export type { FieldDesignerProps } from './FieldDesigner';

// Shared hooks
// Shared hooks. The clipboard, multi-select and pan/zoom hooks, the
// `PropertyEditor` panel and the collaboration provider with its status
// indicator are the designers' internals: nothing outside this package read
// them, so they stay module-local.
export { useUndoRedo } from './hooks/useUndoRedo';
export { useDesignerHistory } from './hooks/useDesignerHistory';
export { useConfirmDialog } from './hooks/useConfirmDialog';
export { useClipboard } from './hooks/useClipboard';
export { useMultiSelect } from './hooks/useMultiSelect';
export { useCanvasPanZoom } from './hooks/useCanvasPanZoom';
// 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 { DESIGNER_DEFAULT_TRANSLATIONS } from './hooks/useDesignerTranslation';

// Shared components
export { ConfirmDialog } from './components/ConfirmDialog';
export { Minimap } from './components/Minimap';
export { PropertyEditor } from './components/PropertyEditor';
export { VersionHistory } from './components/VersionHistory';

// Route-ready app authoring pages — host apps mount these at their
Expand Down
27 changes: 6 additions & 21 deletions ui/packages/plugin-gantt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,8 @@ import {
ObjectGantt, // ObjectQL-integrated gantt: loads records, writes back edits
ObjectGanttRenderer, // the registered renderer for `object-gantt`
GanttView, // the standalone timeline component
QuickFilterBar, // the toolbar's quick-filter dropdowns
ResourceWorkload, // resource × period workload grid
normalizeDependencies, // raw dependency-field value -> GanttDependency[]
normalizeTaskType, // raw type-field value -> GanttTaskType
normalizeShiftSegments, // raw timeSegments config -> NormShiftSegments
parseHHMM,
shiftDayStart,
bandAt,
computeWorkload,
parseHHMM, // 'HH:MM' -> minutes after midnight
} from '@object-ui/plugin-gantt';

import type {
Expand All @@ -217,23 +210,15 @@ import type {
GanttDependencyObject,
GanttLinkType,
GanttMarker,
QuickFilterDef,
QuickFilterBarProps,
QuickFilterField,
QuickFilterOption,
QuickFilterLabels,
ShiftSegmentsConfig,
ShiftBandConfig,
NormShiftSegments,
NormShiftSegments, // the shape GanttViewProps.shiftSegments takes
NormShiftBand,
ResourceWorkloadProps,
WorkloadColumn,
WorkloadOptions,
ResourceCell,
ResourceLoad,
} from '@object-ui/plugin-gantt';
```

The quick-filter bar, the resource-workload grid and the shift-band helpers
are `ObjectGantt` internals and are not exported; configure them through the
`gantt` block (`quickFilters`, `resourceView`, `timeSegments`) instead.

To serve the gantt under a registry key of your own, register the exported
renderer under that key:

Expand Down
38 changes: 11 additions & 27 deletions ui/packages/plugin-gantt/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ import {
import { useObjectTranslation } from '@object-ui/i18n';
import { ObjectGantt, type ObjectGanttProps } from './ObjectGantt';

// The entry publishes what a host composes with: the two gantt components, the
// renderer, the timeline's task/marker vocabulary and the two helpers read
// outside this package. The quick-filter bar, the resource-workload grid, the
// workload math and the shift-band helpers are ObjectGantt's internals, read by
// nothing outside it, so they stay module-local (each module keeps its tests).
export { ObjectGantt };
export type { ObjectGanttProps, QuickFilterDef } from './ObjectGantt';

export { QuickFilterBar } from './QuickFilterBar';
export type {
QuickFilterBarProps,
QuickFilterField,
QuickFilterOption,
QuickFilterLabels,
} from './QuickFilterBar';
export type { ObjectGanttProps } from './ObjectGantt';

export { GanttView } from './GanttView';
export type {
Expand All @@ -38,25 +35,12 @@ export type {
GanttLinkType,
GanttMarker,
} from './GanttView';
export { normalizeDependencies, normalizeTaskType } from './ObjectGantt';
export { normalizeTaskType } from './ObjectGantt';

export { normalizeShiftSegments, parseHHMM, shiftDayStart, bandAt } from './shifts';
export type {
ShiftSegmentsConfig,
ShiftBandConfig,
NormShiftSegments,
NormShiftBand,
} from './shifts';

export { ResourceWorkload } from './ResourceWorkload';
export type { ResourceWorkloadProps } from './ResourceWorkload';
export { computeWorkload } from './workload';
export type {
WorkloadColumn,
WorkloadOptions,
ResourceCell,
ResourceLoad,
} from './workload';
export { parseHHMM } from './shifts';
// `GanttViewProps.shiftSegments` is typed by these two, so they stay public
// with `GanttView`.
export type { NormShiftSegments, NormShiftBand } from './shifts';

/**
* What `ObjectGantt` reads for its own query: `objectName` (via `getDataConfig`,
Expand Down
Loading