LearnNewsExamplesServices
Frontmatter
id9521
titleTree Grid: Optional Helper Lines for Tree Structures
stateClosed
labels
aifeaturegrid
assigneestobiu
createdAtMar 19, 2026, 6:59 PM
updatedAtMar 19, 2026, 7:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/9521
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 19, 2026, 7:01 PM

Tree Grid: Optional Helper Lines for Tree Structures

Closed v12.1.0 aifeaturegrid
tobiu
tobiu commented on Mar 19, 2026, 6:59 PM

This ticket introduces a new, optional feature for the Neo.grid.column.Tree to display helper lines (similar to classic Windows File Explorer).

These lines help visualize the hierarchy and parent-child relationships, especially in deeply nested structures.

Key Changes:

  1. Neo.grid.column.Tree: Added a new reactive config showHelperLines_ (default: false).
  2. Neo.grid.column.component.Tree: Added isLastChild_ and showHelperLines_ configs.
  3. SCSS Styling:
    • Created resources/scss/src/grid/column/Tree.scss containing the complex CSS gradients to draw the lines without requiring extra DOM nodes. The gradients are designed to gracefully "break" around the Font Awesome caret icons using transparent gaps, avoiding messy intersections.
    • Added a 4px gap between the horizontal lines and the text content.
    • Handled .is-last-child state to properly terminate vertical lines.
  4. Theming: Created corresponding theme files for all 5 themes (light, dark, neo-light, neo-dark, cyberpunk) defining the --tree-helper-line-color. Dark themes use subtle colors (e.g., #777 for dark, var(--purple-600) for neo-dark, rgba(0, 210, 255, 0.4) for cyberpunk).
  5. Example: Added a Helper Lines CheckBox to examples/grid/treeBigData/ControlsContainer.mjs to toggle the feature dynamically.
tobiu added the ai label on Mar 19, 2026, 6:59 PM
tobiu added the feature label on Mar 19, 2026, 6:59 PM
tobiu added the grid label on Mar 19, 2026, 6:59 PM
tobiu referenced in commit b71e4e3 - "Tree Grid: Optional Helper Lines for Tree Structures (#9521)" on Mar 19, 2026, 7:00 PM
tobiu assigned to @tobiu on Mar 19, 2026, 7:00 PM
tobiu
tobiu Mar 19, 2026, 7:00 PM

Input from Gemini 3.1 Pro:

✦ I have implemented the tree helper lines feature.

Implementation Details:

  • Added showHelperLines config to Neo.grid.column.Tree and its underlying component.Tree.
  • Implemented a pure CSS solution using CSS Gradients in resources/scss/src/grid/column/Tree.scss to draw the tree lines without adding any new DOM nodes.
  • Intersection Avoidance: The lines are drawn using background gradients with transparent gaps that sit perfectly behind the Font Awesome carets. This creates the illusion of a solid background behind the icon without needing an actual background circle that would look messy over striped or hovered rows.
  • Added a subtle 4px gap before the horizontal lines meet the text.
  • Increased the CSS specificity to ensure that the .neo-grid-tree-column-cell correctly nullifies padding-top and padding-bottom, allowing the cell to stretch to 100% height and avoid visual gaps between rows.
  • Configured subtle theme variables for dark, neo-dark, and cyberpunk themes.
  • Added a toggle checkbox to the treeBigData grid example.

The changes have been committed and pushed.

tobiu
tobiu Mar 19, 2026, 7:00 PM
Image
tobiu closed this issue on Mar 19, 2026, 7:01 PM