Conversation
…, create helper functions for position calculation taking in acount indentation
…e for subfolder and file
…just automatic height calculation to always fit content
…d file tree shapes, add selectSizeV2 to properties pod
…hat manages font and icon dimensions
| }; | ||
|
|
||
| // Hook to resize edition text area based on content | ||
| export const useFileTreeResizeOnContentChange = ( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Created file-tree-resize.hook.ts and moved both hooks to the new file
| ]); | ||
| }; | ||
|
|
||
| export const useFileTreeResizeOnSizeChange = ( |
There was a problem hiding this comment.
Maybe you can keep this two hooks private and create a third hook that wraps this two, something like
useFilteTreeResize
There was a problem hiding this comment.
Both private hooks wrapped into useFileTreeResize hook
| @@ -0,0 +1 @@ | |||
| export * from './select-size-v2.component'; | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I've created the issue #791 for the future replacement of select size
| baseRestrictions: ShapeSizeRestrictions; | ||
| } | ||
|
|
||
| export const parseFileTreeText = (text: string): FileTreeItem[] => { |
There was a problem hiding this comment.
It would be a good idea to add unit tests to this method, including corner cases
There was a problem hiding this comment.
Unit tests done!
…rap both hooks with useFileTreeResize, export the wrapper function and update main component file
… and eliminate empty space, establish min height from 120 to 50
…nt adaptation when switching between sizes
Close #217