Aller au contenu principal

· 3 minutes de lecture

In this series of posts, I will introduce the changes that are coming in version 1.1 (which in fact is already available as a pre-release).

For this first feature, I will let Naveen, our GSoC candidate, present it. Naveen has made an excellent job implementing various search engine features, including advanced filters, support for Okapi BM25 scoring algorithm, and fuzzy search. Here is what he has to say:

What got done

The project consisted of three parts:

  1. Make search better by introducing additional search filters. (e.g., tags, notebook, type)
  2. Make the ranking of search results better by implementing the Okapi BM25 relevance function.
  3. Make fuzzy search possible.

Code contributions

  1. All: Add search filtersJoplin's search had been using the Full-Text Search(FTS) offered by  SQLite directly. So though it was fast, it was not versatile. For  example, we can't restrict the search scope to a particular notebook or  search based on tags.The current search implementation fixes most of these problems. It  provides a better abstraction over FTS, supporting many new filters. The  documentation for the new search filters can be found here.
  2. All: Weigh notes using Okapi BM25 scoreJoplin used a ranking function based on the number of times the search query occurs in the note and how close they are.But there are better ways to rank notes, considering not just the  number of times a word appears, but how common it is. Words like "the"  is in most notes, while words like "zebra" are not common and should be  considered more relevant.The new search implementation uses Okapi BM25  as the ranking function. It ranks a set of documents based on the query  terms appearing in each document, regardless of their proximity.
  3. Desktop: Fuzzy searchWe've added support for fuzzy search. It doesn't replace the need to put  * at the end if you want to do a prefix search. But it does let you be a  bit more relaxed about the exact spelling. Searching for "tomatos" will  also give you results for "tomatoes". (This feature isn't released yet,  but will be soon)

It has been a pleasure working with Laurent and Caleb. They did an excellent job as mentors.

I hope these new features will be useful to many people. I plan to  continue as a member of the Joplin community and help in whatever way I  can.

· 6 minutes de lecture

The latest version of Joplin includes a mechanism to upgrade the structure of a sync target. When you startup the app you will be asked to upgrade before being able to sync. Once you start the process, the app will briefly display an information screen, upgrade the sync target, and then restart the app. You’ll then be able to sync with the new sync target format. That first upgrade is quite simple as the goal for now is to put the mechanism in place and verify that it works well.

From a user perspective this feature doesn’t do anything visible, although it caused some issues, so one might wonder why it’s even there. This post is meant to clarify this.

The structure of the sync target hasn’t really changed since the day Joplin was released. It works well however it has some shortcomings that should be fixed eventually for sync to remain performant.

There are also various improvements that could be made but were not previously possible due to the lack of an upgrade mechanism. I have listed below the 5 main limitations or issues with the current sync process and how they could be fixed:

No upper limit on the number of items

Joplin’s UI works well even with millions of notes, however the sync target will keep getting slower and slower as more files are added to it. File systems often have a limit to the number of files they can support in a directory. One user also has reached the limit of 150,000 items on OneDrive.

For now, this is not a big issue because most users don’t have millions of items, but as more web pages are being clipped (clipped pages often contain many small resources and images) and more note revisions are created (one note can have hundreds of revisions), this issue might start affecting more users.

One way to solve this issue would be to split the sync items into multiple directories. For example if we split the main directory into 100 sub-directories, it will be possible to have 15,000,000 OneDrive items instead of 150,000. Another way would be to support note archiving, as described below. How exactly we’ll handle this problem is still to be defined, but there are certainly ways.

Not possible to prioritise downloads

Currently, when syncing, the items are downloaded in a random way. So it might download some notes, then some tags and notebooks, then back to downloading notes, etc. For small sync operations it doesn’t matter, but large ones, like when setting up a new device, it is very inefficient. For example, the app might download hundreds of note revisions or tags, but won’t display anything for a while because it won’t have downloaded notebooks or notes.

A simple improvement would be to group the items by type on the sync target. So all notebook items together, all tags together, etc. Doing so means when syncing we can first download the notebooks, then the notes, which means something will be displayed almost immediately in the app, allowing the user to start using it. Then later less important items like tags or note revisions will be downloaded.

End-to-end encryption is hard to setup

Currently, the encryption settings is a property of the clients. What it means it that when you setup a new client, it doesn’t know whether the other clients use encryption or not. It’s going to guess more or less based on the data on the sync target. You can also force it to use encryption but this has drawbacks and often mean a new master key is going to be created, even though there might already be one on the sync target.

E2EE works well once it’s setup, but doing so can be tricky and possibly confusing - if you didn’t follow this guide to the letter, you might end up with multiple master keys, or sending decrypted notes to an encrypted target.

A way to solve this would be to make the E2EE settings a property of the sync target. Concretely there would be a file that tells if E2EE is enabled or not, and maybe some way to quickly get the master key. It would simplify setting up encryption a lot and make it more secure (because you won’t be able to send non-encrypted notes to an encrypted sync target). When you setup a new client, the client will know immediately if it’s an encrypted target or not and set the client accordingly.

Old notes that never change should be handled differently

It would be more efficient to treat old notes differently by allowing the user to “archive” them. An archived note would be read-only. Then one idea could be to group all these archived notes into a ZIP file on the sync target. Doing so means that the initial sync would be much faster (instead of downloading hundred of small files, which is slow, it will download one large file, which is fast). It would also make the structure more scalable - you could keep several years of archived notes on the sync target while keeping sync fast and efficient.

The resource directory should be renamed

The folder that contains file attachments is named “.resources” on the sync target. This causes troubles because certain platforms will hide directories that start with dot “.”, and perhaps they will be excluded from backup or skipped when moved somewhere else. Being able to upgrade the sync target means we can rename this folder to just “resources” instead.

Conclusion

That’s obviously a lot of possible improvements and it won’t be done overnight, but having the sync upgrade mechanism in place means we can start considering these options. Some of these, such as renaming the “resources” dir are simpler and could be done relatively soon. Perhaps other more complex ones will be group within one sync target upgrade to minimise disruption. In any case, I hope this clarifies the reason for this recent sync upgrade and that it gives some ideas of what to expect in the future.

· Une minute de lecture

The design put the menu bar on the left, which I think makes sense, as it's consistent with the main screen UI. And I expect this bar will be the same colour as the main screen sidebar

For checkboxes Serj used a toggle button, which actually makes it easier to align all the labels on the left (a checkbox with a label on the left looks strange) so I might go with it.

Otherwise the screens are relatively similar but tidier. If you have any suggestion on what could be changed, feel free to let me know.

Synchronisation config

Synchronisation config (error messages)

Plugin config

· Une minute de lecture

I think it's nearly there as all the details have been ironed out now. If you notice any issue or have any suggestion though, feel free to let me know!

· Une minute de lecture

As usual your feedback is welcome, and just for info some of this is going to change. In particular what's mentioned in my own feedback:

· Une minute de lecture

Thanks to the mentor stipend we got from Google for GSoC, we've been able to hire a designer to improve the design of the desktop application. Serj is now at his second iteration and your feedback on it would be most welcome!

· 3 minutes de lecture

The latest pre-release is now available and includes 13 bug fixes and 9 various improvements and new features, among others:

Editable attachments

Files you attach to a note can now be edited. To do this, click on the attachment or, if it's an image, right-click on it and select open. The file will then be watched by the application and any change you make will be saved to Joplin, and synchronised.

New Markdown editor

A new Markdown editor (Code Mirror) is now included with Joplin. For now it is for beta testing only so you need to manually enable it in the options in "Note" => "Use CodeMirror as the code editor". The goal of this new editor is to address several of the issues that have affected the previous Markdown editor and that were either hard or impossible to fix, in particular:

  • Support for spell checking. Note that it is not yet implemented in the new editor but it at least can be done now.
  • Variable font size. The previous editor would not allow this, which would cause various issues.
  • Search within the Markdown text. Previously it was only possible to searched with the note viewer but with this editor it should be possible to search within the Markdown text too.
  • Improved support for emojis.
  • Improved support for Asian languages and Russian.

If possible, please help test this new editor and report any issue in the forum! (or GitHub)

Manual ordering of notes

You can now manually order the notes within the notebook. For this to work, make sure you choose "Custom order" in the menu View => Sort Notes by

Support for system keychain on macOS and Windows

One of the issues mentioned in the security audit was that certain sensitive settings, like Nextcloud or encryption passwords were saved unencrypted in the Joplin profile. This new release will make use of the system keychain when it is available and move the sensitive settings to it. You don't need to do anything to make use of this feature, it is automatically enabled in this release.

Currently this is supported on macOS and Windows. It is disabled of course for the portable version, and is also not currently enabled for Linux due to a build issue and less consistent support than on macOS and Windows.

Support for system theme

The app can now auto-detect the system theme and switch to it automatically. This essentially adds support for system "dark mode", which are now common on most operating systems. You may choose a preferred "light" theme and "dark" theme in the option.

· Une minute de lecture

Now that the GSoC changes have been merged and the application made more stable following the rewrite of the note editor code, a new pre-release will be available soon.

It will include several important features, which I will describe into more details in following posts, but for information the main new features will be:

  • Allow editing note attachments and syncing the changes

  • Save sensitive settings such as passwords to the system keychain

  • Allow changing the app appearance according to the system theme

  • Allow manually ordering notes

  • A new text editor, Code Mirror, will be available for beta-testing