Previously, files are backuped to logseq/bak when logseq detects
there're differences between the db and disk. But it has two problems:
1. Only a few of users know `logseq/bak`, other users think that their
data has been lost.
2. Files in the logseq/bak folder are never truncated.
This PR backups old file in DB with timestamp suffixes instead of
logesq/bak, and only keep the latest 10 versions of any changed file.
* feat: add a secret global flag to load graph from a user defined dir
* fix: use LOGSEQ_OVERWRITE_OPEN_DIR env var to overwrite the openning graph dir
* e2e: add a test for load & check saved graph data
* fix: should also pass in process.env for testing fixtures
* feat: new way to set open dir folder
* fix: e2e
* fix: remove playwright global flag check
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
* improve(ui): [WIP] refactor left sidebar component
* improve(ui): [WIP] refactor left sidebar component
* improve(ui): polish left sidebar for mobile
* improve(ui): polish left sidebar for mobile native
* fix: unnecessary stateful component
* improve(ui): tweak padding inner left sidebar
* fix(tests): update tests
* fix(ui): close left sidebar when create page on sm breakpoint
* improve(ui): tweak `--ls-left-sidebar-sm-width` to 70%
* fix(ui): overlap between left sidebar and toolbar right area on mobile
* improve(plugin): support autoFocus option for main ui frame
* improve(plugin): make single selected block as current block
* improve(api): get selected blocks
* improve(plugin): support call built-in command from api
* fix(plugin): sanitize key of shortcut id
* improve(plugin): add invoke built-in command api &
* fix(editor): overwritten class of collapsed block
* improve(plugin): add `getStateFromStore` api
* chore: build libs core
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>