-
-
Notifications
You must be signed in to change notification settings - Fork 650
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:
|
0f677f7
to
33b18e3
Compare
Signed-off-by: 01zulfi <[email protected]>
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.
{tabs.map((tab) => ( | ||
<NavigationItem | ||
key={tab.id} | ||
id={tab.id} | ||
isTablet={isTablet} | ||
title={tab.title} | ||
icon={tab.icon} | ||
selected={currentTab === tab.id} | ||
onClick={() => setCurrentTab(tab.id)} | ||
showTitle={false} | ||
/> | ||
))} |
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 think we should create a separate component for tab items instead of reusing NavigationItem
.
onClick={() => { | ||
toggleSideMenu(true); | ||
}} |
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.
onClick={() => { | |
toggleSideMenu(true); | |
}} | |
onClick={() => toggleSideMenu(true)} |
// 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?
props: { | ||
location: "middle-pane" | ||
}, |
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.
Is this used?
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.
You will also have to run a rebase with |
Signed-off-by: 01zulfi [email protected]