Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

01zulfi
Copy link
Collaborator

@01zulfi 01zulfi commented Dec 10, 2024

Signed-off-by: 01zulfi [email protected]

@thecodrr
Copy link
Contributor

thecodrr commented Dec 20, 2024

Just gave this a test run. A few bugs:

  1. The middle pane is still navigating when switching to Notebooks/Tags in the sidebar
  2. Adding a subnotebook when a root notebook is collapsed doesn't properly expand the root notebook in the tree
  3. Adding a new notebook at the root level is not possible after adding the first notebook
  4. Adding a new tag is not possible from the sidebar
  5. The counts in the sidebar aren't updated when creating a new note

Signed-off-by: 01zulfi <[email protected]>
@01zulfi 01zulfi changed the title web: (wip) new sidebar web: new sidebar ui Dec 24, 2024
@01zulfi 01zulfi marked this pull request as ready for review December 24, 2024 10:57
Copy link
Contributor

@thecodrr thecodrr left a 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.

Comment on lines +312 to +323
{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}
/>
))}
Copy link
Contributor

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.

Comment on lines +138 to +140
onClick={() => {
toggleSideMenu(true);
}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onClick={() => {
toggleSideMenu(true);
}}
onClick={() => toggleSideMenu(true)}

Comment on lines +88 to +96
// const children = await getChildNodes(rootId, -1);
// setNodes(children);
const nodes = await fetchChildren(
rootId,
-1,
expandedIds,
getChildNodes
);
setNodes(nodes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Comment on lines +152 to +154
props: {
location: "middle-pane"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used?

Comment on lines +42 to +49
useEffect(() => {
if (location === "sidebar") return;
tags?.item(0).then((item) => {
if (item && item?.item) {
navigate(`/tags/${item.item.id}`);
}
});
}, [tags, location]);
Copy link
Contributor

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.

@thecodrr
Copy link
Contributor

thecodrr commented Jan 2, 2025

You will also have to run a rebase with master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants