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

Right click on sidebar gives option to create new directory / note #250

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

milaiwi
Copy link
Contributor

@milaiwi milaiwi commented May 11, 2024

Allows users to right click on file sidebar and give them option to create a new note or directory. Closes #244.

…vent bubbling up from parent

Signed-off-by: MoTheRoar <milaiwi@outlook.com>
…ightclick

Signed-off-by: MoTheRoar <milaiwi@outlook.com>
…andler

Signed-off-by: MoTheRoar <milaiwi@outlook.com>
…pdown menu on React.MouseEvent

Signed-off-by: MoTheRoar <milaiwi@outlook.com>
…ry on menu selection.

Signed-off-by: MoTheRoar <milaiwi@outlook.com>
@@ -216,6 +216,32 @@ ipcMain.handle("show-context-menu-file-item", (event, file) => {
}
});

ipcMain.handle("show-context-menu-item", (event) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already have the handler for show-context-menu-file-item. Why not include these new context menu items there?

(For my personal vault, I have the fileexplorer sidebar so i could not actually get it to show these new context menu items you've added. Only by opening a vault which doesn't have lots of files would it actually leave space in the file explorer sidebar to hit these context menu items)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this one is specifically for right clicking on the file explorer sidebar (if a file does not exist there) that creates a menu to create a new note or directory. The current show-context-menu-file-item has options like delete, rename, and create a flashcard set that would not be appropriate.

This is just something I like to have for note apps, but I understand if other people do not think it's necessary!

style={{ padding: 0, margin: 0 }}
<div
onContextMenu={handleMenuContext}
style={hideScrollbarStyle}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like there are some compile issues to fix here...

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.

Right click on sidebar should give option to create new directory / note.
3 participants