Skip to content

Conversation

@gustedeveloper
Copy link
Collaborator

Close #217

};

// Hook to resize edition text area based on content
export const useFileTreeResizeOnContentChange = (
Copy link
Member

Choose a reason for hiding this comment

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

I use to keep business just for plain vainilla ts code, it would be good idea to place hooks on a diferent file, e.g. file-tree-resize.hook.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Created file-tree-resize.hook.ts and moved both hooks to the new file

]);
};

export const useFileTreeResizeOnSizeChange = (
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you can keep this two hooks private and create a third hook that wraps this two, something like

useFilteTreeResize

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Both private hooks wrapped into useFileTreeResize hook

@@ -0,0 +1 @@
export * from './select-size-v2.component';
Copy link
Member

Choose a reason for hiding this comment

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

select-size-v2 applies to only the file tree, doesn`t it?

If that's the case then let's call it select-size-filetree, or we could call it select-size-two-sizes but it's a bit strange

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've created the issue #791 for the future replacement of select size

baseRestrictions: ShapeSizeRestrictions;
}

export const parseFileTreeText = (text: string): FileTreeItem[] => {
Copy link
Member

Choose a reason for hiding this comment

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

It would be a good idea to add unit tests to this method, including corner cases

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unit tests done!

@brauliodiez brauliodiez merged commit 6d5db61 into dev Oct 5, 2025
2 checks passed
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.

Create a tree component

2 participants