File tree Expand file tree Collapse file tree
packages/view/src/components/FolderActivityFlow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export const renderReleaseVisualization = ({
5858 const activeFolderPaths = Array . from ( new Set ( releaseContributorActivities . map ( ( a ) => a . folderPath ) ) ) ;
5959 const filteredFolderPaths = releaseTopFolderPaths . filter ( ( path ) => activeFolderPaths . includes ( path ) ) ;
6060
61- const chartWidth = ( svg . node ( ) ?. parentElement ?. clientWidth || DIMENSIONS . width ) - 100 ;
61+ const chartWidth = Number ( svg . attr ( " width" ) ) ;
6262
6363 const xScale = d3
6464 . scaleBand ( )
Original file line number Diff line number Diff line change @@ -36,36 +36,6 @@ export function useFolderNavigation(totalData: ClusterNode[]) {
3636 [ totalData ]
3737 ) ;
3838
39- /**
40- * Navigate up to parent folder
41- */
42- const navigateUp = useCallback ( ( ) => {
43- if ( currentPath === "" ) {
44- return ;
45- }
46-
47- const parentPath = currentPath . includes ( "/" ) ? currentPath . substring ( 0 , currentPath . lastIndexOf ( "/" ) ) : "" ;
48-
49- if ( parentPath === "" ) {
50- setCurrentPath ( "" ) ;
51- setFolderDepth ( 1 ) ;
52-
53- const rootResult = getRootFolders ( totalData ) ;
54-
55- setReleaseTopFolderPaths ( rootResult . folders as string [ ] ) ;
56- if ( rootResult . releaseGroups ) {
57- setReleaseGroups ( rootResult . releaseGroups ) ;
58- }
59- } else {
60- setCurrentPath ( parentPath ) ;
61- setFolderDepth ( ( prev ) => Math . max ( 1 , prev - 1 ) ) ;
62-
63- const subFolders = getReleaseSubFolders ( totalData , parentPath ) ;
64-
65- setReleaseTopFolderPaths ( subFolders as string [ ] ) ;
66- }
67- } , [ currentPath , totalData ] ) ;
68-
6939 /**
7040 * Navigate to breadcrumb by index
7141 */
@@ -137,7 +107,6 @@ export function useFolderNavigation(totalData: ClusterNode[]) {
137107
138108 // Actions
139109 navigateToFolder,
140- navigateUp,
141110 navigateToBreadcrumb,
142111 initializeRootFolders,
143112 getBreadcrumbs,
You can’t perform that action at this time.
0 commit comments