Skip to content

Commit

Permalink
fix(editor): Truncate long data pill labels in schema view (n8n-io#10427
Browse files Browse the repository at this point in the history
)
  • Loading branch information
elsmr authored Aug 15, 2024
1 parent 2043daa commit 1bf2f4f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/editor-ui/src/components/RunDataSchema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ watch(
.innerSchema {
min-height: 0;
min-width: 0;
> div {
margin-bottom: var(--spacing-xs);
Expand Down
33 changes: 22 additions & 11 deletions packages/editor-ui/src/components/RunDataSchemaItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ const getIconBySchemaType = (type: Schema['type']): string => {
display: flex;
gap: var(--spacing-2xs);
align-items: baseline;
flex-grow: 1;
min-width: 0;
}
.sub {
Expand All @@ -212,6 +214,7 @@ const getIconBySchemaType = (type: Schema['type']): string => {
display: inline-flex;
flex-direction: column;
order: -1;
min-width: 0;
.innerSub > div:first-child {
margin-top: var(--spacing-2xs);
Expand Down Expand Up @@ -242,21 +245,14 @@ const getIconBySchemaType = (type: Schema['type']): string => {
height: 24px;
padding: 0 var(--spacing-3xs);
border: 1px solid var(--color-foreground-light);
border-radius: 4px;
border-radius: var(--border-radius-base);
background-color: var(--color-background-xlight);
font-size: var(--font-size-2xs);
color: var(--color-text-dark);
max-width: 50%;
span {
display: flex;
height: 100%;
align-items: center;
svg {
path {
fill: var(--color-text-light);
}
}
path {
fill: var(--color-text-light);
}
&.mappable {
Expand All @@ -273,11 +269,26 @@ const getIconBySchemaType = (type: Schema['type']): string => {
}
.label {
display: flex;
min-width: 0;
align-items: center;
> span {
display: flex;
align-items: center;
margin-left: var(--spacing-3xs);
padding-left: var(--spacing-3xs);
border-left: 1px solid var(--color-foreground-light);
overflow: hidden;
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&.arrayIndex {
border: 0;
padding-left: 0;
Expand Down

0 comments on commit 1bf2f4f

Please sign in to comment.