-
Notifications
You must be signed in to change notification settings - Fork 60
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
Change sidebar tree creation to use path instead of parentId. Also move sidebar to web-ui #47
Conversation
68dc0f8
to
ea7ba6f
Compare
isRoot = false, | ||
name = '', | ||
}: { | ||
id: string |
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.
what is this id? do we need it?
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.
for key
react elements in the dom tree. Is nice to do key={node.id}
ea7ba6f
to
917de40
Compare
// We pre-sorted documents by path depth, so we know | ||
// that the parent node exists | ||
const parent = nodeMap.get(parentPath)! | ||
parent.children.push(node) |
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.
Before pushing the node find their place alphabetically. if it's a folder goes first.
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'll do this in another PR Carlos wants this code
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.
👍
What?
We decided to start using document.path as source of truth. We need to change sidebar tree creation