Plugin: Note Tabs

I love it!

I wish each notes would keep their current cursor position so it's easier to get back where you were in that note when switching between them.

Also I was wondering, maybe I'm missing a font but on both Ubuntu 20.10 and Windows 10 I seem to miss the font use for tabs since both fails back to the default serif font. As seen here:

Any idea? Otherwise GREAT plugin! :smiley:

I think this is a regression with 1.y.z (I'm not sure when it happened) e.g. in 1.0.x the cursor position (or better said the scroll position) is kept.

1 Like

Interesting! Glad it should already work this way. I downloaded the latest release on GitHub, I don't see any past release so I guess I'll wait for a fixed update to be released.

About the font, I noticed joplin-font-family is used. I don't see any other broken fonts in the app anywhere else. Both on Ubuntu and Windows I have the default font set to a working existing font in Appearance settings. Any idea why the font is broken for the note tabs only?

Thanks!

It rememebered the scroll position. If you changed the focus to the text body it, the cursor would still be at line one column one. Thus you basically have to use the mouse to click into the window that has the scroll position. Either way, I'm not sure if it was deliberatly removed or if it is in fact a regression.
@laurent would know.

1 Like

It's still there, but probably buggy.

1 Like

Thanks for your feedback. I'm glad you like it.

As you already noticed I've added the var(--joplin-font-family) CSS variable to the plugin's stylesheet. I guess the plugin has no access to the App fonts as is "lives" in an iframe which is decoupled from the App itself. Unfortunately I did not notice this, because I installed the Roboto font on my computer.

So I can either simply add the font to the plugin or add another option so the user can specify a font family he prefers.
In the first case, I also have to update the plugin if the default font of the app changes... not sure if this ever happens. With the additional option, I'm a little bit afraid of to get too many options sometime. Which, apart from the look, don't really add any value.

3 Likes

I can only speak for myself. The more options, the better. I don't care, whether they are grouped or hidden behind an expert or advanced settings button (or even done via env vars or db settings). But I want to be able to customzie the !@#$ out of things.

Bundling a font might not be easy, depending on the license of the font. It will also increase the size of the plugin.
But it's your code thus your choice.

P.S.: You know the saying:
"Is there life after death?". "Not sure, but you can probably configure it in vi."

5 Likes

So true! Didn't know this one, thanks for the laugh :grinning_face_with_smiling_eyes:

I see what you mean. I am also more of a person who likes to personalize "his" apps.

However, I think most users would like to have a consistent look for the whole app. Therefore the solution with the additional option in the settings would be nice, but it wouldn't be enough. They would still have to manually add the font to their system.

So I will probably include the font first. It is licensed under the Apache License, Version 2 and the files in woff format have a size of ~26KB. So I think this should work.

I can always add the option to change the font later. :wink:

1 Like

Looks wonderful with the proper font :smiley: Thanks for the fix, I pulled the update and regenerated the plugin since no new releases were available.

Latest build still doesn't remember the scroll position. It used to work I believe. Any idea on this one?

100% agree :laughing:

Thanks for the test! Actually I want to add/improve a few more things before I release the next version. :wink:

2 Likes

really great, benji300! i was looking so much forward to this feature :slight_smile:

i was wondering: is it possible to switch between the open tabs via keyboard shortcut or would that be a new feature?

1 Like

This is AWESOME! I have wanted this from the beginning of using Joplin. So easy to use, really really happy. Thank you for your hard work!

2 Likes

I noticed you included instructions for keyboard shortcuts here, since I had the same question as @a.l. I might be missing something obvious, but I am unable to add tabsPinNote or Tabs: Pin note to the list of shortcuts. Is there a trick to add a new one to the list?

Thanks for your feedback!

Just to be sure... you mean to change the active note, e.g. with Ctrl+Left/Right? That does indeed sound reasonable. I will create a feature request for it.
There will be two new commands then (e.g. Tabs: Select tab left/right) you can assign keyboard shortcuts to.

I will describe how to do this later. At the moment there is a small limitation in the app itself.
Spoiler: You have to patch the keymap-desktop.json in the user profile manually.

2 Likes

Thanks for your feedback. I'm glad you like it.

Same as here... currently there's a small workaround necessary to assign shortcuts to the commands. But it is possible :wink:
I will post a detailed description here later.

Ah, nice!

If anyone wants the code, you can add this to keymap-desktop.json. NOTE: if you already have custom keyboard shortcuts, you should add the new ones to the bottom. Once these are added, you can customize them using the preferences UI.

[
  {
    "command": "tabsPinNote",
    "accelerator": "Cmd+."
  },
  {
    "command": "tabsUnpinNote",
    "accelerator": "Shift+Cmd+."
  },
  {
    "command": "tabsMoveLeft",
    "accelerator": "Cmd+Left"
  },
  {
    "command": "tabsMoveRight",
    "accelerator": "Cmd+Right"
  },
  {
    "command": "tabsClear",
    "accelerator": "Cmd+Shift+C"
  }
]

NOTE: for windows users

3 Likes

I will describe how to do this later. At the moment there is a small limitation in the app itself.
Spoiler: You have to patch the keymap-desktop.json in the user profile manually.

Normally the commands registered by the plugin should show up in the keymap editor, or is it not working in this case?

Thanks @uxamanda, that's excatly the workaround I meant. :+1:

There's currently a small limitation within the App @laurent.
Plugin commands will only be shown in the keyboard shortcuts editor once they have shortcuts assigned. Whereby it doesn't matter whether the shortcuts are defined as default accelarators in the plugin's implementation or manually added to the keymaps-desktop.json.

I am not quite sure, but I seem to remember that the behavior only occurs when the commands are displayed in a submenu.

Strg-tab was what i was looking for :slight_smile: