Homepage    |    GitHub    |    API    |    FAQ

How to switch the display and hide of the plugin panel

How to switch the display and hide of the plugin panel?

After the panel is created, it will always be displayed, but sometimes I want to temporarily hide it. what should I do in the code.

2 Likes

No such option at the moment but I will add one. Maybe joplin.views.panel.show(true/false)?

3 Likes

Hey @laurent , what is the status on this functionality? I see there is a panel.hide(view) function but it only hides my content inside the side panel, it doesn't actually hide the side panel itself.

That should work. Maybe check how it's implemented on the TOC plugin demo as it works on this one: joplin/packages/app-cli/tests/support/plugins/toc at dev · laurent22/joplin · GitHub And if it still doesn't work in your plugin please provide an example.

I'm using the code from the ToC plugin now. Here is where I use it in my project.

Here is the button and the graph when it's visible

After I click the button, the graph disappears, but not the whole panel

Thanks, I wonder if it's specific to the panel being completely on the right, I'll check.

+1 on this issue!

@laurent : Joplin is the best and your work is amazing.