-
Notifications
You must be signed in to change notification settings - Fork 6
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
AbhishekA1509
wants to merge
26
commits into
release-candidate-v0.39.0
Choose a base branch
from
feat/tree-view
base: release-candidate-v0.39.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
67af0c3
feat: refactor ActionMenuItem and add TrailingItem component for impr…
AbhishekA1509 0c20da6
feat: add base structure for TreeView
AbhishekA1509 73acec4
fix: css alignment for dividers
AbhishekA1509 739b759
feat: make variant prop optional in TrailingItemProps and improve Tre…
AbhishekA1509 439a4c6
feat: add mode prop to TreeViewProps for navigation and form modes, a…
AbhishekA1509 5eba693
feat: update TreeViewProps to support optional depth, flatNodeList, a…
AbhishekA1509 9367515
feat: enhance TreeView component with selected state styling and refa…
AbhishekA1509 4be78b7
feat: refactor Tooltip component and introduce TreeViewNodeContent fo…
AbhishekA1509 d0fc33f
feat: integrate framer-motion for animated transitions in TreeView co…
AbhishekA1509 7db4a2d
feat: copilot review
AbhishekA1509 6aa852b
feat: add click handlers for TreeView node items to manage button and…
AbhishekA1509 029324c
feat: update TreeView and related components to support selection sta…
AbhishekA1509 fa6b56e
feat: enhance Sidebar component to support TreeView structure and add…
AbhishekA1509 6445985
feat: refactor TreeView component to support uncontrolled mode and up…
AbhishekA1509 1df23b8
Merge branch 'fix/rb-table' of https://github.com/devtron-labs/devtro…
AbhishekA1509 4e9118d
feat: add variant support to TreeView for customizable background and…
AbhishekA1509 e9355d7
feat: add scroll to selected item functionality in TreeView component
AbhishekA1509 6cb2706
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 5e6c67d
feat: add defaultExpandedMap prop to TreeView and update state initia…
AbhishekA1509 d31006e
feat: remove isExpanded property from K8SObjectBaseType interface
AbhishekA1509 443d6e4
feat: add generic support for DataAttributeType in TreeView component…
AbhishekA1509 494c363
Merge branch 'release-candidate-v0.39.0' of https://github.com/devtro…
AbhishekA1509 f5469f0
feat: enhance TreeView component with controlled state management and…
AbhishekA1509 841056a
fix: handle undefined dataAttributes in TreeView component to prevent…
AbhishekA1509 4b439de
feat: enhance TreeView component with improved type definitions and r…
AbhishekA1509 761fc26
fix: simplify useEffect condition for setting expanded map in TreeVie…
AbhishekA1509 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useState } from 'react' | ||
|
||
import { SUB_PIXEL_ERROR } from './constants' | ||
|
||
const useIsTextTruncated = () => { | ||
const [isTextTruncated, setIsTextTruncated] = useState(false) | ||
|
||
const handleMouseEnterEvent: React.MouseEventHandler = (event) => { | ||
const { currentTarget: node } = event | ||
const isTextOverflowing = | ||
node.scrollWidth > node.clientWidth + SUB_PIXEL_ERROR || | ||
node.scrollHeight > node.clientHeight + SUB_PIXEL_ERROR | ||
if (isTextOverflowing && !isTextTruncated) { | ||
setIsTextTruncated(true) | ||
} else if (!isTextOverflowing && isTextTruncated) { | ||
setIsTextTruncated(false) | ||
} | ||
} | ||
|
||
return { | ||
isTextTruncated, | ||
handleMouseEnterEvent, | ||
} | ||
} | ||
|
||
export default useIsTextTruncated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.