Plugin: Note Tabs

Here's my first plugin I wrote. It shall allow you to "open" multiple notes at a time in tabs.

You can install it via the Joplin plugin system. Please see here for details.

I hope it will help you to improve your daily work with Joplin. :slight_smile:

Features

  • Display selected note as tab
  • Additional display options below the tabs
    • Navigation buttons ( historyBackward/Forward )
    • Completion status of all checklists in selected note
    • Full breadcrumbs for selected note
  • Pin note(s) to the tabs
    • Either via command or drag & drop from the note list
  • Save pinned tabs permanently
    • Stored in database (not synced with other devices!)
  • Remember last opened and unpinned note
  • Change position of tabs within the panel
    • Either via drag & drop or keyboard shortcuts (which have been assigned to the corresponding commands)
  • Toggle to-do state directly on the tabs
    • Optionally unpin completed to-dos automatically
  • Configurable style attributes
  • Support horizontal and vertical layout

For more details about all features and usage please refer to the README.

Usage

Panel position

By default, all new plugin panels are placed on the right side of the app screen. However, this can be changed manually later. Please see here how to place the panel at the desired position.

Screenshots

Repository

57 Likes

Great, thanks!

I can't find how to change layout to horizontal. Plugin settings look like this

Hi @danil-tolkachev,

thanks for your feedback.

The layout changes automatically when you decrease the panel width. Currently it switches at about 400px width from horizontal to vertical.

Oh, it doesn't work well on my Linux Mint 19.3

Sorry for that question, but have you tried to decrease the size of the right most panel a bit more? Could you try to drag the splitter (between content and tabs panel) to right window size?

Here are some tests.

Okay what I can see is what I expect it should do. If you decrease the width of the panel the layout of the tabs is changed.
Width > 400px => all tabs are displayed inline with the specified min and max-width
Width < 400px => all tabs are displyed in single rows and expanded to the full-width of the panel

Am I right that your expactation would rather be to use the vertical layout always indepent from the panel's width?

I just want this layout like yours :wink:

How can I configure it?

1 Like

Ah sorry... now I see. This description is currently missing... you're right.
I want to create a short screencast for that...

But for now do the following steps:

  • navigate to View > Change application layout
  • Use the arrow keys (the displayed ones, not keyboard keys) to move the panel at the desired position
  • Press ESC to save the layout and return to normal mode
  • Move the splitter (between content and tabs panel) up to reach the desired height of the panel
5 Likes

Thanks for clarification. I haven't seen View > Change application layout before.

Don't you think that check box Horizontal layout in the plugin settings would be more intuitive? Is it possible with current Joplin Plugin API?

wow, well done, I didn't even know if was possible to do this with the current plugin system.

3 Likes

I'm not quite sure, because it would only control the behavior (layout) inside the panel itself.
But it is currently not possible to change the position of a panel programmatically via the plugin API.

But if it helps you to "force" the layout of the panel with a setting, I could create a feature request.

Here's a short screencast of the basic usage:

2 Likes

But if it helps you to "force" the layout of the panel with a setting, I could create a feature request.

I think it would be more convenience way to change layout. But we can wait what another users think.

Maybe some API could be provided to allow positioning relatively to one of the default components (sidebar, noteList, editor).

For example with a function like moveNear(componentName, direction). So in your case, you would call moveNear("editor", "top") to put it on top of the editor, or moveNear("editor", "right") to move it to the right of the editor as a sidebar. I think that would cover most cases, without having to expose the complex tree of components that makes up the layout.

Maybe a way to set a default size would be good too.

I've created a feature request. So you can upvote it :wink: Let's see what other users think...

Yes I think this would be a good idea to at least give the initial position of a panel.
That would help most users I think. If you want to you can still move the panel as you like.

The default height would be very helpful in this case also.
Maybe as an optional parameter of the function you proposed moveNear("editor", "top", 40).

Sorry for bothering you @laurent , but I found two more points in the plugin API that I would like to clarify.

  1. Would it be possible to add an additional event that is triggered each time any note property value is changed (e.g. joplin.workspace.onNotePropertyChange())? With this plugin I came across a little unpleasantness. If a to-do is set to complete in the list, there is no event triggered to update the panel. The user has to change the selected note to update the panel. See attached screencast. The plugin currently listens to the following events to update the panel:
		WORKSPACE.onNoteSelectionChange(() => {
			updateTabsPanel();
		});

		WORKSPACE.onNoteContentChange(() => {
			updateTabsPanel();
		});

		WORKSPACE.onSyncComplete(() => {
			updateTabsPanel();
		});
  1. Is it intended that when switching to an empty list, the selected note is kept? Currently I can determine this behavior with the plugin. The selected note remains highlighted when switching to an empty list. See also the screencast.

If I remember correctly onNoteContentChange is supposed to be triggered when any property change, so it might just be that this event is buggy and needs to be fixed.

  1. Is it intended that when switching to an empty list, the selected note is kept? Currently I can determine this behavior with the plugin. The selected note remains highlighted when switching to an empty list. See also the screencast.

Also a bug. State handling is one of the oldest part of Joplin and at time is a bit messy, but if there's no note in the list the selected note state should be cleared. I'll have a look.

Thanks for your quick response and checking.
But the topics are not the highest priority, I think there are more important things to do first.

1 Like