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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const drawerTitleTextStyles = css({
const drawerTitleActionGroupStyles = css({});

type DiagramEditorSidePanelProps = {
selectedItems: (SelectedItems & { label: string }) | null;
selectedItems: (SelectedItems & { title: string }) | null;
onDeleteCollection: (ns: string) => void;
onDeleteRelationship: (rId: string) => void;
onDeleteField: (ns: string, fieldPath: FieldPath) => void;
Expand All @@ -53,10 +53,11 @@ function DiagramEditorSidePanel({
onDeleteRelationship,
onDeleteField,
}: DiagramEditorSidePanelProps) {
const { content, label, actions, handleAction } = useMemo(() => {
const { content, label, actions, title, handleAction } = useMemo(() => {
if (selectedItems?.type === 'collection') {
return {
label: selectedItems.label,
title: selectedItems.title,
label: 'Collection Configuration',
content: (
<CollectionDrawerContent
key={selectedItems.id}
Expand All @@ -80,7 +81,8 @@ function DiagramEditorSidePanel({

if (selectedItems?.type === 'relationship') {
return {
label: selectedItems.label,
title: selectedItems.title,
label: 'Relationship Configuration',
content: (
<RelationshipDrawerContent
key={selectedItems.id}
Expand All @@ -100,7 +102,8 @@ function DiagramEditorSidePanel({

if (selectedItems?.type === 'field') {
return {
label: selectedItems.label,
title: selectedItems.title,
label: 'Field Configuration',
content: (
<FieldDrawerContent
key={`${selectedItems.namespace}.${JSON.stringify(
Expand Down Expand Up @@ -141,8 +144,8 @@ function DiagramEditorSidePanel({
id={DATA_MODELING_DRAWER_ID}
title={
<div className={drawerTitleStyles}>
<span className={drawerTitleTextStyles} title={label}>
{label}
<span className={drawerTitleTextStyles} title={title}>
{title}
</span>

<ItemActionControls
Expand Down Expand Up @@ -197,7 +200,7 @@ export default connect(
return {
selectedItems: {
...selected,
label: getCollection(selected.id),
title: getCollection(selected.id),
},
};
}
Expand All @@ -218,7 +221,7 @@ export default connect(
return {
selectedItems: {
...selected,
label: getDefaultRelationshipName(relationship.relationship),
title: getDefaultRelationshipName(relationship.relationship),
},
};
}
Expand All @@ -241,7 +244,7 @@ export default connect(
return {
selectedItems: {
...selected,
label: `${getCollection(
title: `${getCollection(
selected.namespace
)}.${selected.fieldPath.join('.')}`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function getFieldTypeDisplay(bsonTypes: string[]) {
</Body>
}
>
<div>(mixed)</div>
<i>(mixed)</i>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by

before after
Screenshot 2025-09-23 at 11 45 05 AM Screenshot 2025-09-23 at 11 23 52 AM

</InlineDefinition>
);
}
Expand Down
Loading