From 987ea06dd8c969a38bf87b7c050bd4dd3800c906 Mon Sep 17 00:00:00 2001
From: Claude
- {tFormat('engine.inspector.flowNode.triggeringRecord.active', locale, { object: objectName })}
+ {tFormat('engine.inspector.flowNode.triggeringRecord.active', locale, { object: objectLabel })}
- {tFormat('engine.inspector.flowNode.triggeringRecord.hint', locale, { object: objectName })}
+ {tFormat('engine.inspector.flowNode.triggeringRecord.hint', locale, { object: objectLabel })}
- {describeNodeRemovalRefusal(node.id, removalSites, locale)}
-
+ {describeNodeRemovalRefusal(node.id, removalSites, locale)}
+ {t('engine.inspector.flowNode.nestedIdHint', locale)} {t('engine.inspector.flowNode.nestedIdHint', locale)}
+ {t('engine.inspector.flowNode.developerInfo', locale)}
+
+
{tFormat('engine.inspector.reference.fieldsOf', locale, { object: objectName })}
+diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectPicker.tsx b/ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectPicker.tsx index e2118e0a887..e4919db0121 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectPicker.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectPicker.tsx @@ -151,6 +151,20 @@ export function useObjectCatalog() { return usePickerLoad(load); } +/** + * An object's label as the picker's catalog reads it, else the name itself — + * for sentences that name an object (the flow node panel's "Fields of …"), + * which read as the author's label and keep the machine name out of the text. + * A name the catalog does not know (an expression, a name not served) is + * returned as it is. + */ +export function useObjectDisplayName(name: string | undefined): string { + const catalog = useObjectCatalog(); + if (!name) return ''; + if (catalog.status !== 'loaded') return name; + return catalog.data.find((e) => e.name === name)?.label ?? name; +} + /** * The package the author is editing in: Studio's `/studio/:packageId/...` * route, else the `?package=` an editor URL carries (ADR-0048), where `all` is @@ -219,6 +233,12 @@ export interface ObjectPickerProps { * be resolved and the typed text is committed as before. */ objectsOnly?: boolean; + /** + * Keep the machine name off the panel: at rest the label alone shows, and + * the name rides on the input's hover title instead of the secondary line + * beneath it. Off by default; the flow node panel turns it on. + */ + nameOnHover?: boolean; } export function ObjectPicker({ @@ -230,6 +250,7 @@ export function ObjectPicker({ placeholder, locale: localeProp, objectsOnly = false, + nameOnHover = false, }: ObjectPickerProps) { const contextLocale = useMetadataLocale(); const locale = localeProp ?? contextLocale; @@ -437,7 +458,8 @@ export function ObjectPicker({ aria-expanded={open} aria-controls={open ? listId : undefined} aria-activedescendant={open && activeRow ? activeRow.id : undefined} - aria-describedby={restingLabel ? nameLineId : undefined} + aria-describedby={restingLabel && !nameOnHover ? nameLineId : undefined} + title={restingLabel && nameOnHover ? value : undefined} autoComplete="off" spellCheck={false} value={shown} @@ -623,7 +645,7 @@ export function ObjectPicker({ )} - {restingLabel && ( + {restingLabel && !nameOnHover && (
{value}
diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/_shared.tsx b/ui/packages/app-shell/src/views/metadata-admin/inspectors/_shared.tsx index f17544e16f7..ce7abd08dcd 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/_shared.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/_shared.tsx @@ -28,6 +28,7 @@ */ import * as React from 'react'; +import { createPortal } from 'react-dom'; import { ArrowDown, ArrowUp, Trash2, X } from 'lucide-react'; import { cn } from '@object-ui/components'; import { @@ -83,9 +84,15 @@ export interface InspectorShellProps { * * `onSelectionChange` lets a field inside move the host's selection — the * decision's branch cards use it to open a connection's own inspector. + * + * `headerActionsTarget` is an element inside the host's own header. When it is + * set, the shell draws its header actions there, so a selection's menu (the + * flow node's "···") sits in the one title bar the author sees instead of at + * the top of the body. */ export interface InspectorShellHost { onSelectionChange?: (selection: { kind: string; id: string; label?: string }) => void; + headerActionsTarget?: HTMLElement | null; } const InspectorShellHostContext = React.createContext
{fieldName}
diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx
index fdb84f49d54..3f78ad3b9a5 100644
--- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx
+++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx
@@ -104,6 +104,7 @@ import { stripReadDecorations } from '@objectstack/spec/kernel';
import { NavigationModeSchema, resolveI18nLabel, type I18nLabel, type NavigationMode } from '@objectstack/spec/ui';
import { InspectorReorderButtons, InspectorShell } from '../metadata-admin/inspectors/_shared.js';
import { FieldsListEditor } from '../metadata-admin/previews/FieldsListEditor.js';
+import { FieldListRowNameOnHover } from '../metadata-admin/previews/ViewColumnPanes.js';
import { useObjectFields } from '../metadata-admin/previews/useObjectFields.js';
import { colFieldName } from '../metadata-admin/previews/view-column-io.js';
import { WIDGETS, type ObjectFieldOption } from '../metadata-admin/widgets.js';
@@ -1436,13 +1437,8 @@ export function ObjectListViewInspector({
}
>
- {target.viewId} -
- )} + {/* objectstack#34796 — no `object.view` machine name under the title: + the panel names the view by its label alone. */} {readOnly ? ({t('engine.studio.inspector.listView.readOnly', locale)} @@ -1476,8 +1472,8 @@ export function ObjectListViewInspector({ ) : ( <> {!row && ( -
- {tFormat('engine.studio.inspector.listView.notCreated', locale, { view: title })} +
+ {t('engine.studio.inspector.listView.notCreated', locale)}
)} {body.type === 'kanban' && ( @@ -1516,21 +1512,25 @@ export function ObjectListViewInspector({ /> )}
@@ -8229,6 +8231,9 @@ export function AutomationsPillar({
dialog: flowConflictDialog,
} = useDraftSaveGuard(client, reloadFlowDraft);
const [selection, setSelection] = React.useState
{t('engine.studio.inspector.listView.readOnly', locale)}
diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.listViewInspector-11823.test.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.listViewInspector-11823.test.tsx
index 7deab1d9be9..2aec7dceb03 100644
--- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.listViewInspector-11823.test.tsx
+++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.listViewInspector-11823.test.tsx
@@ -227,9 +227,8 @@ describe('an object leaf\'s Properties panel edits its list view (objectui#11823
it('creates a view the object does not have yet at the first edit, seeded with the default columns', async () => {
views = {};
const panel = await openObjectLeaf();
- // objectui#13151 — the notice names the view by the object's label and its
- // role (the object is "Task", its nav entry "Tasks"), never `