Skip to content

feat: add tree view component #803

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

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

feat: add tree view component #803

wants to merge 19 commits into from

Conversation

AbhishekA1509
Copy link
Member

@AbhishekA1509 AbhishekA1509 commented Jun 30, 2025

Description

Adds a new TreeView component with associated types, styling, and node rendering, while deprecating the older CollapsibleList and refactoring related components (ActionMenu and Tooltip) to integrate shared utilities.

  • Introduce TreeView (export, types, component, node content, SCSS)
  • Deprecate CollapsibleList in favor of TreeView
  • Refactor TrailingItem, ActionMenuItem, and Tooltip to share the new text-truncation hook

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new TreeView component with associated types, styling, and node rendering, while deprecating the older CollapsibleList and refactoring related components (ActionMenu and Tooltip) to integrate shared utilities.

  • Introduce TreeView (export, types, component, node content, SCSS)
  • Deprecate CollapsibleList in favor of TreeView
  • Refactor TrailingItem, ActionMenuItem, and Tooltip to share the new text-truncation hook

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Shared/Components/index.ts Export the new TreeView
src/Shared/Components/TreeView/types.ts Define TreeNode, TreeItem, TreeHeading, and TreeViewProps
src/Shared/Components/TreeView/index.ts Re-export TreeView and its types
src/Shared/Components/TreeView/TreeViewNodeContent.tsx Render node titles with optional truncation‐tooltip wrapping
src/Shared/Components/TreeView/TreeView.scss Styles for tree items, dividers, and hover states
src/Shared/Components/TreeView/TreeView.component.tsx Core TreeView logic (rendering, keyboard nav, animations)
src/Shared/Components/TrailingItem/types.ts New TrailingItemType union
src/Shared/Components/TrailingItem/index.ts Export TrailingItem
src/Shared/Components/TrailingItem/TrailingItem.component.tsx Render the different trailing item types
src/Shared/Components/CollapsibleList/CollapsibleList.component.tsx Mark CollapsibleList as deprecated
src/Shared/Components/ActionMenu/types.ts Remove inline trailing-item types; import from TrailingItem
src/Shared/Components/ActionMenu/ActionMenuItem.tsx Delegate trailing-item rendering to TrailingItem
src/Common/Tooltip/index.ts Export the new useIsTextTruncated hook
src/Common/Tooltip/UseIsTextTruncated.ts Extract text-overflow detection into a hook
src/Common/Tooltip/Tooltip.tsx Simplify tooltip logic to use useIsTextTruncated

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