Toggle development tools should use a check mark

The menu item Toggle development tools should use a check mark to denote, if they are turned on or not.

The problem is that if you close the tools by clicking on the close window button, they will show up again at the next action in Joplin. This is confusing, because the menu item gives you zero feedback.

In any case, I was thinking about this a bit, but it seems that one can’t access the menu or its data from anywhere else than app.js, otherwise it would be easy to change the menu item programatically in the rest of the code. So how can we make this menu structure available to the rest of the code?

2 Likes

Yes I’ve noticed that too. Whether the dev tools are open or not is saved in the state so that could be used to display the checkmark or not.

Yea, I don’t know how to do that. this.store().getState().noteDevToolsVisible doesn’t work.
I have no idea how to access states from different areas of the code. This makes no sense to me. In C I’d have a context (structure with pointers to other structutres and/or config values) which I pass around.
With JS I’m lost. So I don’t know how to access the state from within app.js, nor how to access the menu defined in app.js from another file, e.g. NoteText.jsx. This drives me nuts.