Plugins: API for sidebar view

I'm exploring ways to implement a pinned-notes feature as a plugin, and also a couple more ideas.
It would be great to have an API to add and manage sections (as in Notebooks and Tags) in the sidebar.

I propose to add it in joplin.views like joplin.views.sidebar or joplin.views.sidebarSection
From there, a create:

joplin.views.sidebarSection.create(title: string, index:float, button: ButtonSpec | null, content: [] | {}): Promise<void>

index is needed to allow sorting. So that notebooks has index 0 and tags has index 1. I would like my section to appear on top of the list by setting indexes <0

button is meant to appear next to the title (like the plus button in the Notebooks section), but can be omitted (like in Tags).
content can be be a list of buttons (like for the tags), or a hierarchy of buttons like for the Notebooks.

1 Like

For reference, from Plugins: API for search component

I'm also interested in this. I would like to create a plugin to modify the display of notebooks, i.e hide certain notebooks.