Commit Graph

1652 Commits

Author SHA1 Message Date
Abdullah Atta
ae1e84a1ba editor: remove webpackPrefetch & webpackPreload directives 2022-10-20 15:30:50 +05:00
Abdullah Atta
a45a6466e7 web: exclude code language chunks from service worker prefetch 2022-10-20 15:11:02 +05:00
Abdullah Atta
a1e5b572fe editor: allow generating languages in CI 2022-10-20 14:17:36 +05:00
Abdullah Atta
236fc77a63 editor: update katex stylesheet 2022-10-20 14:08:41 +05:00
Abdullah Atta
0bd3310f23 editor: load prism lang grammars from local files 2022-10-20 14:08:41 +05:00
Abdullah Atta
7dbcea2663 editor: generate code languages in build step 2022-10-20 14:08:41 +05:00
Abdullah Atta
e25d4a3039 global: update qclone to 1.2.0 2022-10-19 12:10:31 +05:00
Abdullah Atta
82f800e530 editor: install new patch for katex@0.16.2 2022-10-19 11:44:49 +05:00
Abdullah Atta
b63ba7c842 core: install @streetwriters/showdown from npm 2022-10-19 11:39:07 +05:00
Abdullah Atta
1d6f7b3e3e global: remove all .npmrc files 2022-10-19 11:29:39 +05:00
Abdullah Atta
4b4cb1e826 editor: upgrade katex to 0.16.2 2022-10-19 11:18:20 +05:00
Abdullah Atta
d42f617d0f core: fix md export for notes with codeblocks 2022-10-18 17:31:31 +05:00
ammarahm-ed
eb0bc2bcfc mobile: fix exporter errors 2022-10-18 16:45:03 +05:00
Abdullah Atta
ea6a706c25 core: fix failing note-history test 2022-10-18 10:34:59 +05:00
Abdullah Atta
c3badf4846 editor: generate new patch for @tiptap/core 2022-10-18 10:23:47 +05:00
Abdullah Atta
a9dbe13112 editor: prevent Shift + Tab from moving focus from editor
This fixes #1213
2022-10-17 23:32:13 +05:00
Abdullah Atta
3ac3b1bcdb global: update package-lock files 2022-10-17 23:08:39 +05:00
Abdullah Atta
5b213edae8 editor: skip Tab key handling inside tables 2022-10-17 23:04:48 +05:00
Abdullah Atta
0b971bda38 core: minor refactors 2022-10-17 22:46:43 +05:00
Abdullah Atta
73b09847b8 core: make sync hub connection more reliable 2022-10-17 22:46:31 +05:00
Abdullah Atta
2cddbabee1 core: remove reindexing before backup import 2022-10-17 22:43:55 +05:00
Abdullah Atta
112497b1b6 core: add progress during migration & backup restore 2022-10-17 22:43:26 +05:00
Abdullah Atta
d35d355fb3 web: move backup time forward when it is skipped 2022-10-17 22:39:54 +05:00
Abdullah Atta
6bf14512f9 core: fix cannot read property title of undefined 2022-10-17 22:38:50 +05:00
Abdullah Atta
0d20013071 core: do not check premium status during tag addition 2022-10-17 22:37:48 +05:00
Abdullah Atta
cf8ed91102 core: use migrations to dedup shortcuts 2022-10-17 22:37:23 +05:00
Abdullah Atta
577d50b512 core: move index migrations to main database migrations
this is better design wise as we won't have to keep checking if the
indices have been migrated or not. We'll just check the database version
and do the appropriate migrations based on that.
2022-10-17 22:36:53 +05:00
Abdullah Atta
1a589b0955 core: refactor migrations to use items instead of types 2022-10-17 20:00:00 +05:00
Abdullah Atta
e9a63fcf79 editor: don't create a new task list on drop at end
This overrides the default task item drop behavior to make dropping
items at the very end of the task list more reliable.
Currently, dropping the item at the end of the list creates a
new list which is often not what you want. We look for such
behavior and instead moves the item to the very end.
2022-10-14 17:49:53 +05:00
Abdullah Atta
36f3701b4f web: allow exporting all notes as html, md or txt 2022-10-14 17:49:38 +05:00
Abdullah Atta
5886c47d92 editor: update packages 2022-10-14 12:23:40 +05:00
Abdullah Atta
516bc75317 editor: allow indenting list items on tab press 2022-10-14 12:23:30 +05:00
Abdullah Atta
fc19335a26 core: publish appRefreshRequested event globally 2022-10-13 19:35:32 +05:00
Abdullah Atta
5db1a7b345 editor: allow tabbing inside editor 2022-10-13 19:23:26 +05:00
Abdullah Atta
6116daf9ba editor: disable conversion of 2 single spaced lines into 1 double spaced line 2022-10-13 19:23:05 +05:00
Abdullah Atta
a47c98509d editor: allow converting double spaced lines to single spaced 2022-10-13 19:23:05 +05:00
Abdullah Atta
e1fc116994 core: improve content conflict detection using proper HTML diffing (#1183)
Since HTML is a tree-like language it is futile to compare it character
for character. `html1 === html2` is almost always false. This commit
introduces a simple diffing algorithm that only checks the text inside
the html + a few other attributes to decide whether the 2 HTMLs are
actually different or not. This is obviously not foolproof and it will
ignore everything aesthetic (b, em, strong tags etc.). This is actually
desireable because in our case only the text difference should
warrant a conflict. Everything else can easily be brought back.
Similarly, this also ignores whitespace differences surrouding the
tags.

All in all it'll provide a more reliable alternative to MD5 hashing the
2 HTMLs.
2022-10-13 19:22:32 +05:00
Abdullah Atta
f3fa7fe744 core: update core version to 5.8 2022-10-13 19:18:52 +05:00
Abdullah Atta
0a94ee7c60 core: item should only have a single shortcut
this changes the shortcut ids & deduplicates the old ones so that
there is always only 1 shortcut of a given item (notebook, topic or tag).
2022-10-13 19:18:52 +05:00
Abdullah Atta
0e6150a0f5 core: change db keys to include collection name
This should not affect the items or their server representation.
This change is necessary to allow multiple items with same id
that live in different collections.
For example, shortcuts have the same id as the inner reference they
point to. This was not possible before and would cause an overwrite
of the original value.
2022-10-13 19:18:52 +05:00
Abdullah Atta
c09715d053 core: make item migration fall through all db versions
this was not exactly a bug but it can cause a lot of unintended
behaviour. Previously, you'd have to manually specify which version the
item migration should jump to. This was buggy and poorly designed.
This change makes the item iterate over all the db migrations one by one
automatically.

For example:

An item at version 5.2 will go through:
- 5.3
- 5.4
- and so on
2022-10-13 19:18:52 +05:00
Abdullah Atta
9701a3d660 web: make table row toolbar vertical for compactness 2022-10-13 19:18:33 +05:00
Abdullah Atta
c6201532f2 core: lookup by tag alias 2022-10-12 20:16:26 +05:00
Abdullah Atta
b5ab8e5d3e core: allow free users to assign same 5 tags without limits 2022-10-12 20:16:26 +05:00
Abdullah Atta
d2d269e4ca editor: toggle only the clicked item if it's not selected 2022-10-12 15:16:29 +05:00
Abdullah Atta
b5843c24d4 editor: do not use shebang to execute build script 2022-10-06 13:19:44 +05:00
Ammar Ahmed
dc92f40ee2 Merge pull request #1104 from streetwriters/fix-migration-flow
Fix migration flow
2022-09-29 20:26:03 +05:00
Abdullah Atta
ce889cf1c3 web: bump version to v2.2.1 2022-09-29 19:05:25 +05:00
Abdullah Atta
6469c6d689 core: forcefully set item type to tiptap if it is content 2022-09-29 16:59:43 +05:00
Abdullah Atta
f69afd2d9a editor: defer update propagation by 100ms
by default our editor sends an update "signal" on every single transaction.
This is oftentimes unnecessary. We can
improve the responsiveness by deferring this so multiple transactions cause
1 rerender.
2022-09-29 15:56:24 +05:00