[GH-ISSUE #63] Context menu #50

Closed
opened 2026-03-03 00:17:51 +03:00 by kerem · 5 comments
Owner

Originally created by @Rokt33r on GitHub (Jan 11, 2019).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/63

We need contextmenu for web browser like https://github.com/vkbansal/react-contextmenu

Unfortunately, it doesn't have any type definitions. So we need to rewrite this for our app.

It has type definitions. We can use it for now.

Originally created by @Rokt33r on GitHub (Jan 11, 2019). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/63 We need contextmenu for web browser like https://github.com/vkbansal/react-contextmenu ~~Unfortunately, it doesn't have any type definitions. So we need to rewrite this for our app.~~ It has type definitions. We can use it for now.
kerem 2026-03-03 00:17:51 +03:00
Author
Owner

@Rokt33r commented on GitHub (Jan 24, 2019):

I've changed my mind. I'm now implementing it by myself. Using focus/blur event works quite well.

context menu

<!-- gh-comment-id:457151936 --> @Rokt33r commented on GitHub (Jan 24, 2019): I've changed my mind. I'm now implementing it by myself. Using focus/blur event works quite well. ![context menu](https://user-images.githubusercontent.com/5865853/51673015-4e7ea900-2010-11e9-89ac-7a47279568e5.gif)
Author
Owner

@ZeroX-DG commented on GitHub (Jan 24, 2019):

I have tried to implement this in my app. The problem I met was when the mouse is too close to the edge of the screen, the menu will be out of view so I have to re-calculate the menu coordinate.

<!-- gh-comment-id:457189019 --> @ZeroX-DG commented on GitHub (Jan 24, 2019): I have tried to implement this in my app. The problem I met was when the mouse is too close to the edge of the screen, the menu will be out of view so I have to re-calculate the menu coordinate.
Author
Owner

@ZeroX-DG commented on GitHub (Jan 24, 2019):

I also separated the core functionality of the context menu into a module inside my modules/ folder so that I can re-use it to create different types of context menu. For example, I have a regular context menu which is just a simple popup when right-clicking and an editor context menu which is also a popup on right-click but it also has a part that shows shortcut key so I can just create an editor context menu that extends the base context menu.

<!-- gh-comment-id:457203311 --> @ZeroX-DG commented on GitHub (Jan 24, 2019): I also separated the core functionality of the context menu into a module inside my `modules/` folder so that I can re-use it to create different types of context menu. For example, I have a regular context menu which is just a simple popup when right-clicking and an editor context menu which is also a popup on right-click but it also has a part that shows shortcut key so I can just create an editor context menu that extends the base context menu.
Author
Owner

@Rokt33r commented on GitHub (Jan 25, 2019):

I have tried to implement this in my app. The problem I met was when the mouse is too close to the edge of the screen, the menu will be out of view so I have to re-calculate the menu coordinate.

@ZeroX-DG As you see in the video, it re-calculates before shows the menu.

I also separated the core functionality of the context menu into a module inside my modules/ folder so that I can re-use it to create different types of context menu. For example, I have a regular context menu which is just a simple popup when right-clicking and an editor context menu which is also a popup on right-click but it also has a part that shows shortcut key so I can just create an editor context menu that extends the base context menu.

And, it can be quite reusable because the api is almost same to the one of electron.

<!-- gh-comment-id:457417189 --> @Rokt33r commented on GitHub (Jan 25, 2019): > I have tried to implement this in my app. The problem I met was when the mouse is too close to the edge of the screen, the menu will be out of view so I have to re-calculate the menu coordinate. @ZeroX-DG As you see in the video, it re-calculates before shows the menu. > I also separated the core functionality of the context menu into a module inside my modules/ folder so that I can re-use it to create different types of context menu. For example, I have a regular context menu which is just a simple popup when right-clicking and an editor context menu which is also a popup on right-click but it also has a part that shows shortcut key so I can just create an editor context menu that extends the base context menu. And, it can be quite reusable because the api is almost same to the one of electron.
Author
Owner

@ZeroX-DG commented on GitHub (Jan 25, 2019):

Nice! Can't wait to see how it looks. My implementation for context menu is not very stable, maybe I'll learn something from this.

<!-- gh-comment-id:457434515 --> @ZeroX-DG commented on GitHub (Jan 25, 2019): Nice! Can't wait to see how it looks. My implementation for context menu is not very stable, maybe I'll learn something from this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#50
No description provided.