-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
web: new sidebar ui #7081
base: master
Are you sure you want to change the base?
web: new sidebar ui #7081
Conversation
Just gave this a test run. A few bugs:
|
33b18e3
to
85e0162
Compare
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.
Good work overall but since this contains a lot of changes, I'll have to review it chunk by chunk.
// const children = await getChildNodes(rootId, -1); | ||
// setNodes(children); | ||
const nodes = await fetchChildren( | ||
rootId, | ||
-1, | ||
expandedIds, | ||
getChildNodes | ||
); | ||
setNodes(nodes); |
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.
Why this change?
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.
Whenever the tree was refresh
ed, the children of expanded notebooks weren't loaded. This change fixed that
apps/web/src/views/tags.tsx
Outdated
useEffect(() => { | ||
if (location === "sidebar") return; | ||
tags?.item(0).then((item) => { | ||
if (item && item?.item) { | ||
navigate(`/tags/${item.item.id}`); | ||
} | ||
}); | ||
}, [tags, location]); |
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 don't think this is needed.
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.
This is in case a user manually navigates to app.notesnook.com/tags
, we can redirect them to the first tag. Plus this also prevents showing the tags listing in the middle pane.
You will also have to run a rebase with |
Signed-off-by: 01zulfi <[email protected]>
85e0162
to
5fbd4ac
Compare
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi [email protected]