🌟 Features & new stuff
Introducing Sync v2
Sync is one of the most fragile yet important pieces of Notesnook. In this release, we have overhauled all the old logic to make it faster & more reliable. Why is it v2? Because we had to break compatibility with old versions of the app in order to make some changes. This means that all clients must be at v2.6.2 or later for sync to work between them. Older versions won't be able to sync with the newer versions, and vice versa. Here's a summary of why this was necessary:
- The old sync worked serially & operated on a single item one by one. This did not affect smaller accounts with a few MBs of data but it made Notesnook almost unusable for accounts that have 5000+ items since it'd all need to be downloaded on every login resulting in 10 minutes to many hours of wait. It did not matter how fast your Internet was because we'd be processing items one by one, not really making use of all the bandwidth.
- Sync v2 overhauls this architecture to batch and paralellize everything. Everything gets downloaded, decrypted, processed, and saved in 7-10 MB chunks. This makes the sync almost 10x faster, and much less resource intensive. Technically, the sync speed is now limited by your Internet bandwidth so a faster Internet will experience faster sync.
- Sync v2 now allows users with GBs of old data (coming from Evernote or some other note taking app) to actually be able to use Notesnook across their devices.
- While overhauling the old sync mechanism, we also got rid of a couple of really annoying (but persistent) bugs:
- Settings will no longer get overwritten on login (this is a temporary fix until we restructure our settings to be more granular)
- A lot of issues with sync getting stuck (until the app restarted) were also fixed.
- Realtime editor sync should now be much faster & nicer to use.
Sync v2 was tested on a variety of devices including an old iPhone 6s, a really old Android phone with only 2 GB of RAM, emulators etc., in order to ensure that sync continues to work reliably & without crashes even when RAM & CPU is less powerful.
In our testing (with a locally hosted Sync server to exclude network latency), sync times went down from 4+ minutes to 20-30 seconds on iPhone 6s. Similarly, on a modern i7 10th Gen laptop, the sync time went down from 30 - 40 seconds to 4 - 6 seconds.
Drawbacks
While Sync v2 is really, really fast there were a few sacrifices we had to make in order to ensure maximum performance. This includes getting rid of a percentage based progress while sync is happening. Instead, the clients now show an incrementing counter that represents the total number of items processed i.e., there's no way to figure out how much time is left before sync completes.
Theme Engine
homepage
property is now optional- Context menus now correctly use the
border
color for borders (instead ofseparator
color) - Navigation menu & editor toolbar separators now correctly use the
separator
color (instead ofborder
color) - Placeholder color of all inputs now use
placeholder
color - Selected list item now uses all the colors from
selected
variant (e.g. heading & paragraph color) - Separators between different scopes (navigation menu, list, status bar, editor etc.) now use the scope's respective
separator
color instead of using thebase.border
color. This will allow theme developers to have different color for each of the separator.
New colors
accentForeground
used for all text & icons shown on theaccent
background
Deprecated colors
shade
has been deprecated in favor of a fixed derived color based onaccent
colortextSelection
has been deprecated in favor of using theselected
variant of colors (selected.paragraph
for text color &selected.background
for the background color of selected text)
🐛 Fixes & improvements
Editor pasting improvements
- Editor will now preserve formatting when pasting plain text (e.g. from notepad)
- Improve code block detection when pasting from vscode
- Pasting a single line of code will now paste it as inline code (instead of a code block)
- Fix formatting issues when pasting from ChatGPT
- Fix weird inclusion of XML tags & code when pasting from OneNote (it's still not perfect but it works)
More details in PR: #3216
General editor fixes
- Fix alignment of outline list indicator
- Fix sub outline lists not getting outdented on pressing Enter (mobile)
- Fix editor crash on adding a task list
- Fix blockquote padding & margin on mobile
- Add support for using Arrow Up key to easily escape from nodes when they are at the very beginning of a note
- Pressing Backspace in an empty code block, task list or table will remove it
More details in PR: #3218
Other fixes & improvements
- Fix color of icons in Colors menu by @alihamuh in #3170
- Fix regression causing image shuffling on real-time editor sync by @thecodrr in #3242
- Scroll to top when navigating within settings by @alihamuh in #3223
- Fix crash on uploading attachments by @thecodrr in #3214
- Allow encrypted backups for basic users by @thecodrr in #3213
- Fix multi-select menu not showing multi-select actions by @alihamuh in #3159
- Add support for aligning images in PDF/HTML exports by @alihamuh in #3197
- Fix autocomplete hint in signup form password fields by @alihamuh in #3272
Full Changelog: v2.6.1...v2.6.2