Skip to content

Commit

Permalink
fix(ui): prevent overflows for node labels
Browse files Browse the repository at this point in the history
  • Loading branch information
a-asaad committed Jul 9, 2024
1 parent 76b4764 commit 3023de1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/canvas/EipNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const EipNode = (props: NodeProps<EipNodeData>) => {
>
<div>{getNamespacedTitle(data.eipId)}</div>
<img className="eip-node-image" src={getIconUrl(data.eipId)} />
<div style={hasChildren ? { paddingBottom: "0.5rem" } : {}}>
<div className="eip-node-label" style={hasChildren ? { marginBottom: "0.5rem" } : {}}>
<strong>{data.label}</strong>
</div>
{hasChildren && (
Expand Down
8 changes: 7 additions & 1 deletion ui/src/components/canvas/nodes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $icon-button-focus-shadow:
min-inline-size: 2rem;
min-block-size: 2rem;
max-width: 8rem;
max-height: 8rem;
max-height: 12rem;
font-size: 0.5rem;

&:hover {
Expand Down Expand Up @@ -51,6 +51,12 @@ $icon-button-focus-shadow:
padding: layout.$spacing-02;
}

.eip-node-label {
overflow-wrap: break-word;
max-height: 3rem;
overflow-y: hidden;
}

.eip-endpoint-node .eip-node-image {
max-width: 6rem;
max-height: 5rem;
Expand Down

0 comments on commit 3023de1

Please sign in to comment.