-
Notifications
You must be signed in to change notification settings - Fork 42
Truncate long labels in decision table visualization #1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds text truncation functionality to prevent long node and path labels from causing layout issues in the SSVC decision tree visualization. The changes introduce ellipsis truncation for text exceeding 25 characters and add CSS class sanitization to prevent invalid class names.
- Added
truncateEllipsisfunction to truncate long text with ellipsis - Implemented CSS class name sanitization using regex replacements
- Added
data-fullnameattributes to preserve original text for tooltips/interactions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
8d629f2 to
58153d0
Compare


A small update to try to fix any text that is too long for display inside a SVG. It is quite simple first step to avoid SVG Graph looking too crowded.
This pull request enhances the visualization in
docs/ssvc-explorer/simple.jsby improving how node labels are displayed and ensuring class names are generated safely. The changes focus on truncating long node names for better readability and sanitizing class names to avoid issues with invalid characters.Improvements to node label display:
truncateEllipsisfunction to shorten node names longer than 25 characters, appending an ellipsis for clarity. This function is now used wherever node names are displayed, improving readability in the graph. [1] [2] [3]data-fullnameattribute containing the full, untruncated name, allowing access to the complete value if needed (e.g., for tooltips or accessibility). [1] [2]Class name sanitization: