Commit Graph

206 Commits

Author SHA1 Message Date
Abdullah Atta
7c99c3acb9 core: add migrations for notebooks & settings (#1020) 2022-09-21 11:47:09 +05:00
Abdullah Atta
6c613c6f1e Merge branch 'move-pins-out' 2022-09-21 10:45:58 +05:00
Abdullah Atta
201366b39e core: get rid of noteIds in notebook topics
This is a BREAKING change in the core & will require updating the
clients. The way it works is instead of keeping noteIds of all the
notes in the topic, it keeps an in-memory cache. This in-memory
cache `topicReferences` lives in the notes collection & decouples
notes from notebooks/topics. This also simplifies all the different
actions where references would persist after the note was deleted.
Since the note acts as the source of truth for where it currently is,
there is nothing else to do except rebuild the `topicReferences`
cache.
2022-09-08 13:39:06 +05:00
Abdullah Atta
ac7aad93b3 core: shorcuts -> shortcuts 2022-09-07 14:13:26 +05:00
Abdullah Atta
1e99d7732c core: add new collection for shortcuts 2022-09-07 12:47:02 +05:00
Abdullah Atta
ef552f8b38 core: remove pins from settings 2022-09-07 12:46:49 +05:00
Abdullah Atta
d81f5dba65 refactor: migrate to theme-ui from rebass 2022-08-31 07:26:27 +05:00
Abdullah Atta
c317774c8a docs: add license header 2022-08-30 16:17:04 +05:00
Abdullah Atta
f6b6a0af06 refactor: rename core, theme, and logger 2022-08-29 23:30:48 +05:00
thecodrr
268a0d74a4 fix: undefined content type when syncing
(fixes streetwriters/notesnook#785)
2022-08-15 11:25:57 +05:00
thecodrr
87b778db94 test: improve overall test coverage 2022-08-15 10:57:25 +05:00
thecodrr
185a8ce3fc fix: upgrade showdown to support parsing span tags 2022-07-20 07:45:42 +05:00
thecodrr
8d7de505b6 test: update snapshots 2022-07-13 12:21:20 +05:00
thecodrr
3f54f36d50 feat: migrate from tiny -> tiptap 2022-07-07 13:17:55 +05:00
thecodrr
c660ef6721 fix: make sure all tests are passing 2022-06-08 10:26:19 +05:00
thecodrr
79d6d71c11 feat: allow symbols in tag name 2022-06-06 09:01:58 +05:00
thecodrr
ad10b6c98d feat: use linkedom 2022-04-19 00:28:42 +05:00
thecodrr
c9c57d87ab feat: migrate to happy-dom from node-html-parser 2022-04-19 00:04:57 +05:00
thecodrr
4135028137 feat: improve sync over websockets 2022-03-30 15:52:48 +05:00
thecodrr
c3fdad26f1 test: fix usermanager test 2022-03-16 22:46:51 +05:00
thecodrr
f78e56fdcb feat: add full support for localOnly items 2022-03-11 12:40:42 +05:00
thecodrr
17eeaeb72c test: fix backup tests 2022-01-17 12:27:33 +05:00
Ammar Ahmed
7e40afafa5 fix: remove note content on trash clear (#21)
* fix content not removed when clear is called in trash

* add test to ensure content is deleted on clearing trash

* tests: clearing trash should clear referenced note history

* add cleanup function for content
2022-01-07 09:17:27 +05:00
thecodrr
34140a0cc0 chore: Support for the experimental syntax 'logicalAssignment' isn't currently enabled 2022-01-01 22:04:58 +05:00
thecodrr
278d1681ca fix: table getting converted to raw html 2021-12-29 14:33:29 +05:00
thecodrr
3353d2235e feat: add migration for table & checklists 2021-12-28 14:50:04 +05:00
thecodrr
4204d8784d test: rewrite notehistory tests for improved correctness 2021-12-22 12:07:07 +05:00
thecodrr
fa556015f6 feat: add dateEdited to dateModified migration 2021-12-22 10:24:01 +05:00
thecodrr
b3b5d495f2 refactor: apply formatting to notehistory test 2021-12-22 10:06:37 +05:00
Abdullah Atta
630bb33b10 feat: add note version history (#20)
* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* test: add collector tests

* feat: dateEdited -> dateModified

* feat: migrate to liqe for searching

* chore: forceExit jest after test run

* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* init ContentHistory with await

* fix reference to db in init

* make sessionId in db

* check if note is locked through note metadata

* make cleanup method private

* use remove methods in notehistory and contenthistory

* restore note content via notes.add method if note is not locked

* move getting all items to seperate functions

* check if parsed json is valid

* deserialize a session only if it's sessionContent exists

* add locked property to sessionContent

* remove makeSessionId function

* update tests

* remove yarn.lock file

* update tests

Co-authored-by: ammarahm-ed <ammarahmed6506@gmail.com>
2021-12-21 13:41:08 +05:00
thecodrr
06828ac35c feat: dateEdited -> dateModified 2021-12-20 14:37:06 +05:00
thecodrr
02317a6369 test: add collector tests 2021-12-20 14:35:01 +05:00
thecodrr
bfe7a7c0d0 feat: migrate to using fzf for search 2021-12-20 09:29:25 +05:00
thecodrr
2e00ba2e8a refactor: seperate note add & merging 2021-12-20 09:28:17 +05:00
thecodrr
3309b3d643 feat: simplify note title & headline extraction 2021-12-16 10:10:00 +05:00
thecodrr
ad83938fa4 test: trash cleanup shouldn't delete items newer than 7 days 2021-12-15 22:21:24 +05:00
thecodrr
ebd302bd60 test: add test for trash cleanup 2021-12-15 22:17:07 +05:00
thecodrr
65b9f94255 test: add settings tests 2021-12-15 22:04:16 +05:00
thecodrr
a4274eb75f test: add merge notebook test 2021-12-15 21:45:00 +05:00
thecodrr
8a5859c0c9 refactor: cleanup topic deletion logic 2021-12-15 21:26:55 +05:00
thecodrr
fda5e0c84b fix: do not automatically delete empty notes 2021-12-08 19:32:58 +05:00
thecodrr
9ba7ab3b25 fix: sanitize tag alias as well 2021-12-07 18:25:50 +05:00
thecodrr
9546d43c1f fix: do not throw if note contains invalid tag on sync 2021-12-04 22:42:39 +05:00
thecodrr
9421429a63 fix: "Provide attachment hash" on backup restore 2021-12-01 18:48:51 +05:00
thecodrr
d3d5a4829b test: add test for note refs repairing 2021-12-01 18:31:24 +05:00
thecodrr
a83fab17c5 feat: use regex to extract text from html 2021-11-25 11:54:57 +05:00
thecodrr
92a8239899 feat: migrate to node-html-parser 2021-11-25 09:46:45 +05:00
thecodrr
bde01e1e54 fix: only remove references when repairing note 2021-11-23 19:38:52 +05:00
thecodrr
09d375503c fix: allow use of unicode characters in tags 2021-11-23 19:30:47 +05:00
thecodrr
4a49e17652 fix: save alias with tag item in db 2021-11-20 12:03:03 +05:00