max-mapper / max-mapper/menubar

Destroy Menubar

Open
#281 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
TypeScript
Stars
6.8k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

Description

There is no API to destroy a menubar instance. I'm implementing a feature in my application which will allow the end-users to run their Electron app in a tray or a window, but there is no mechanism to tear-down a menubar.

Steps to Reproduce the Problem
  1. Create a menubar
  2. Destroy Window Reference
  3. Error: Object has been destroyed: at Menubar.<anonymous> (my-app/node_modules/menubar/lib/Menubar.js:311:72)
Expected Behaviour

I'd like for the menubar instance to have a teardown function

Actual Behaviour

There is no API to support this

Specifications
  • Menubar version: 6.0.8
  • Platform: Mac
  • Electron version: 7.1.9
Other information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Menubar.js:311:72, the location shown in the reported Object has been destroyed error, and trace how the menubar instance retains or uses the window reference. Reproduce the Mac/Electron 7.1.9 scenario, then verify that a teardown API lets the application switch between tray and window modes without the destroyed-object error.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.