You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Preserve multiple consecutive spaces in Theia UI elements
Fixes: #16865
PROBLEM:
- Multiple consecutive spaces in file/folder names were collapsed to single space
- HTML whitespace normalization and textContent API both collapse spaces
CSS CHANGES:
- tree.css: Applied white-space: pre to .theia-TreeNodeSegment and .theia-TreeNodeSegmentGrow
- dialog.css: Applied white-space: pre-wrap to dialog content (li, div)
- tabs.css: Applied white-space: pre-wrap to tab hover title and caption
- tooltip.css: Applied white-space: pre-wrap to .theia-tooltip
- breadcrumbs.css: Applied white-space: pre-wrap to breadcrumb labels
- tree-decorators.css: Applied white-space: pre to decorator badges
JAVASCRIPT CHANGE:
- tab-bars.ts (handleMouseEnterEvent): Replace consecutive spaces with non-breaking spaces (\u00A0) before passing to hover service
RATIONALE:
- CSS white-space: pre/pre-wrap handles directly rendered HTML elements
- JavaScript solution needed for tooltips because hover-service.ts uses textContent which normalizes whitespace BEFORE CSS is applied
- Non-breaking spaces (\u00A0) are not collapsed by textContent API
- Used 'pre' for short content (tree nodes, badges) to prevent wrapping
- Used 'pre-wrap' for long content (tooltips, dialogs, paths) to allow wrapping
Fix: Fixed linting issues.
0 commit comments