+
+ {{ changeSetName }}
+
{{ modalData.title }}
@@ -110,6 +113,7 @@ import {
ErrorMessage,
IconNames,
themeClasses,
+ TruncateWithTooltip,
} from "@si/vue-lib/design-system";
import { computed, ref } from "vue";
import clsx from "clsx";
@@ -195,7 +199,7 @@ const userIsApprover = computed(() => changeSetsStore.currentUserIsApprover);
const modalData = computed(() => {
if (mode.value === "requested") {
return {
- title: `${changeSetName.value} Approval Requested by ${
+ title: `Approval Requested by ${
requesterIsYou.value ? "You" : requesterEmail.value
}`,
date: requestDate.value,
diff --git a/app/web/src/components/ModelingDiagram/DiagramNode.vue b/app/web/src/components/ModelingDiagram/DiagramNode.vue
index e210850878..b6c88cceb0 100644
--- a/app/web/src/components/ModelingDiagram/DiagramNode.vue
+++ b/app/web/src/components/ModelingDiagram/DiagramNode.vue
@@ -81,7 +81,7 @@
y: NODE_HEADER_TEXT_HEIGHT + 6,
verticalAlign: 'top',
align: 'left',
- text: node.def.subtitle,
+ text: truncatedNodeSubtitle,
width: nodeWidth - NODE_HEADER_MARGIN_RIGHT,
padding: 0,
fill: colors.bodyText,
@@ -403,13 +403,23 @@ const connectedEdgesBySocketKey = computed(() => {
});
const MAX_TITLE_LENGTH = 14;
+const MAX_SUBTITLE_LENGTH = 30;
const truncatedNodeTitle = computed(() => {
if (props.node.def.title.length > MAX_TITLE_LENGTH) {
- return `${props.node.def.title.substring(0, MAX_TITLE_LENGTH)}...`;
+ return `${props.node.def.title.substring(0, MAX_TITLE_LENGTH).trim()}...`;
} else return props.node.def.title;
});
+const truncatedNodeSubtitle = computed(() => {
+ if (!props.node.def.subtitle) return "";
+ else if (props.node.def.subtitle.length > MAX_SUBTITLE_LENGTH) {
+ return `${props.node.def.subtitle
+ .substring(0, MAX_SUBTITLE_LENGTH)
+ .trim()}...`;
+ } else return props.node.def.subtitle;
+});
+
const nodeWidth = computed(() => props.node.width);
const halfWidth = computed(() => nodeWidth.value / 2);