Commit Graph

1669 Commits

Author SHA1 Message Date
Abdullah Atta
1823a4f4ba core: fix convert is not defined error 2022-11-11 16:57:05 +05:00
Abdullah Atta
fa6e88a0b0 Merge branch 'master' into new-html-parser 2022-11-10 17:02:32 +05:00
Abdullah Atta
eacbbe2ad8 core: use html-to-text library for better text conversion 2022-11-10 17:00:11 +05:00
alihamuh
4c6c42c794 web: impl preview for trashed notes
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>

web: done suggested changes
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>

Update apps/web/src/stores/editor-store.js

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

Update apps/web/src/stores/editor-store.js

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
2022-11-10 15:44:50 +05:00
Abdullah Atta
205373dca3 core: use htmlparser2 for html rewriting
This replaces DOMParser with htmlparser2 which is much, much faster.
How much faster? 80%. This new implementation can parse at 50mb/s
which is insane! The old one could only do 5-10mb/s

We still haven't gotten rid of the DOMParser though since HTML-to-MD
conversion still needs it. This will be done soon though by using `dr-sax`.

This uses a custom implementation of htmlparser2 instead of the default
one which is 50% faster.
2022-11-10 15:16:13 +05:00
Abdullah Atta
349cd27650 core: refactor collector to do everything in 1 step
This will speed up the sync slightly since we aren't iterating over all
items twice. It also simplifies the code a bit.
2022-11-10 14:38:32 +05:00
Muhammad Ali
f62c045350 core: fix v5.8 backups not restoring due to changed item ids (#1303)
* core: back restore repaired due to version change
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
2022-11-09 12:26:33 +05:00
Muhammad Ali
a973a5cdf0 editor: fix incorrect paragraph formatting in copied text (#1299)
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
2022-11-08 16:57:48 +05:00
Abdullah Atta
545c78361b editor: set proper checks when scrolling result into view 2022-11-07 13:05:06 +05:00
Muhammad Ali
d7a80c631b editor: jump to search result using arrow keys not working (#1289)
* editor: search occurence scroll into view corrected
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>

* Update packages/editor/src/extensions/search-replace/search-replace.ts

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2022-11-05 15:50:42 +05:00
Muhammad Ali
a650b8c2d9 editor: force update syntax highlights on 1st render (#1265)
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
2022-11-01 14:45:27 +05:00
Abdullah Atta
62b93fa5b3 core: fix Cannot read property 'hash' of undefined 2022-10-26 15:16:25 +05:00
Abdullah Atta
9489d73221 web: remove background color from images 2022-10-26 15:11:29 +05:00
Abdullah Atta
082b9755db core: re-insert only migrated items
Previously, we were re-inserting all items regardless of whether they
were changed or not. This raised a lot of issues, not to mention
unnecessary load on our servers because after each migration
all the data is re-synced. Since migration takes place independently on
each device, this multiplies exponentially.
Hopefully after this update, this will only happen much more granually.
2022-10-26 10:52:33 +05:00
Abdullah Atta
f4f33fc852 core: fix null is not an object error
This fixes #1231#1230 #1235 #1224
2022-10-26 08:51:37 +05:00
Abdullah Atta
7b458a56b2 core: revert "make sync hub connection more reliable" 2022-10-26 08:51:18 +05:00
Dylan
57658beb1c editor: multiple tables in 1 note should not freeze the editor (#1228)
* editor: prevent tables from freezing the editor

Signed-off-by: Dylan Hackworth <dylhack@gmail.com>

* editor(#1228): use STD console instead

Signed-off-by: Dylan Hackworth <dylhack@gmail.com>

* editor(#1228): revert try catch replace with Node abstraction

Signed-off-by: Dylan Hackworth <dylhack@gmail.com>

* editor(#1228): utilize current node or parentNode

Signed-off-by: Dylan Hackworth <dylhack@gmail.com>

Signed-off-by: Dylan Hackworth <dylhack@gmail.com>
2022-10-22 09:48:16 +05:00
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