Skip to content

Fix visualiser node icon spacing in full mode#2117

Merged
boyney123 merged 2 commits intomainfrom
fix/visualiser-node-icon-spacing
Feb 11, 2026
Merged

Fix visualiser node icon spacing in full mode#2117
boyney123 merged 2 commits intomainfrom
fix/visualiser-node-icon-spacing

Conversation

@boyney123
Copy link
Collaborator

What This PR Does

Fixes visual spacing issues in the visualiser package where node icons and rotated labels were overlapping or too close to borders in full mode. The Event node had proper spacing, but Channel, Command, Service, and Data Product nodes had their labels crushed against the bottom edge.

Changes Overview

Key Changes

  • Add conditional bottom margin to all node icons: mb-2 in full mode, mb-1 in simple mode
  • Increase rotated label bottom margin from mb-4 to mb-6 for nodes with longer labels (Channel, Command, Service, Data Product)
  • Updated 10 node components: Event, Command, Query, Channel, Service, Data, DataProduct, Actor, ExternalSystem, View
  • Added changeset for patch release

How It Works

The fix addresses two spacing issues:

  1. Icon bottom margin: Icons now have conditional spacing based on display mode. In full mode (mb-2), there's more space between the icon and the rotated label below it. In simple mode (mb-1), minimal spacing is maintained.

  2. Label bottom margin: Nodes with longer rotated text labels (7+ characters like "CHANNEL", "COMMAND", "SERVICE", "PRODUCT") needed extra bottom padding to prevent the text from being cut off or pressed against the edge. These were increased from mb-4 to mb-6.

The EventNode already had good spacing naturally due to its shorter label ("EVENT" - 5 chars), so it serves as the reference implementation. All other nodes now match this spacing pattern.

Breaking Changes

None

Additional Notes

This is a visual-only fix with no behavioral changes. The spacing improvements make the full mode node display more readable and professional-looking across all node types.

Add conditional bottom margins to node icons (mb-2 in full mode, mb-1 in simple mode) and increase label margins from mb-4 to mb-6 for longer labels (Channel, Command, Service, Data Product) to prevent overlap with rotated text in full mode.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: 8d3f052

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@eventcatalog/visualiser Patch
@eventcatalog/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@boyney123 boyney123 merged commit 579c9e2 into main Feb 11, 2026
6 checks passed
@boyney123 boyney123 deleted the fix/visualiser-node-icon-spacing branch February 11, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant