-
Notifications
You must be signed in to change notification settings - Fork 2
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
FileTree and WebDav updates to support module editor scenario #259
Conversation
- prop to remove checkbox selection option from node display - support font awesome icon display for file based on WebDav iconFontCls data - call the onFileSelect callback function on node select for non-checkbox case - make the arrow toggle smaller
- add contentType and options properties to model - add param to getWebDavFiles for the non-@files case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Cory. I like the opening files. Just a couple comments in review. I'm also not familiar with useFileIconCls, not sure if a story could be added for that and maybe allowMultiSelect = false. But maybe that will come in a later story.
@@ -246,11 +263,11 @@ export class FileTree extends PureComponent<FileTreeProps, FileTreeState> { | |||
}; | |||
|
|||
// Callback to parent with actual path of selected file | |||
onFileSelect = (id: string, checked: boolean, isDirectory: boolean): void => { | |||
onFileSelect = (id: string, checked: boolean, isDirectory: boolean, node: any): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice this when I did the initial implementation, but looks like someone has already done a little work defining the types here in this issue. If you are up for providing some types. (Although looks like it's missing node.selected).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to take that on as part of this PR, but I'll add a TODO comment to the component.
I did add a knob to the existing storybook story for FileTree so that you can toggle between the allowMultiSelect true / false. I can look into adding a story / knob for useFileIconCls as well. |
# Conflicts: # packages/components/package.json # packages/components/releaseNotes/labkey/components.md
Rationale
The moduleEditor module will soon be making use of the FileTree component and WebDav model/actions to load the module resources in a tree view for browsing and editing resource files from the LabKey UI. The FileTree usage has a few different requirements which warrant some changes/updates to the component (see changes below).
Related Pull Requests
Changes
FileTree component
WebDav model updates for module editor browser scenario