Commit Graph

240 Commits

Author SHA1 Message Date
Peng Xiao
d00a3dbff2 run prettier 2022-07-03 21:38:09 +08:00
llcc
314c3dde7e remove unnecessary delete! codes 2022-06-30 17:24:10 +08:00
Junyi Du
47f5c650f9 fix: edn import: keep block uuid; remove redundant last block
fix: json import uuid failure

enhance: improve get-all-referenced-blocks-uuid query
2022-06-24 17:11:24 +08:00
Junyi Du
0cdacc35e2 feat: import from logseq edn
feat: import edn with provided uuid

feat: overwrite page uuid; use properties in content

feat: error handling for importing

feat: support json import

chore: fix lint by splitting setup ui
2022-06-24 17:11:24 +08:00
Gabriel Horner
6608537909 Move logseq.graph-parser.db* namespaces to their own dep
Also add its own CI file
2022-06-10 15:39:11 +08:00
Tienson Qin
307f7bd755 fix: re-create the page when the file appears again
related to #5549
2022-06-07 12:17:36 +08:00
Gabriel Horner
2b48d95493 Move frontend db namespaces that graph-parser depends on
graph-parser should be independent of the app
2022-05-26 18:04:45 -04:00
Tienson Qin
3c2dc67bc0 fix: conflict lefts when creating a new page
related to #5412
2022-05-24 20:06:27 +08:00
llcc
d95aa14ca5 Merge branch 'master' into disable-webview-resize 2022-05-16 19:39:18 +08:00
Gabriel Horner
5b0d5fb8b5 Decouple graph-parser util from app util usage
For tiny util heavily used fns like safe-re-find and uuid-string?,
decouple graph-parser from so much of the app
2022-05-13 16:17:44 -04:00
Gabriel Horner
b1e226745d Finish migration block ns to nbb 2022-05-12 16:58:26 -04:00
Gabriel Horner
b83f6bbd19 Migrate half the block deps to be nbb compatible 2022-05-12 16:57:28 -04:00
Gabriel Horner
22ddae8998 Move graph-parser related block code to proper ns and nbb migration wip 2022-05-12 16:57:28 -04:00
llcc
f8b659d0f9 Merge branch 'master' into disable-webview-resize 2022-05-11 15:56:56 +08:00
Tienson Qin
e29dc7373e enhance: use journal template if exists for future days 2022-05-11 14:55:05 +08:00
Tienson Qin
43e8f07f40 fix: journal templates not working when re-index
related to #5190
2022-05-11 12:53:29 +08:00
llcc
edf4943298 Merge branch 'master' into disable-webview-resize 2022-05-10 17:12:14 +08:00
Tienson Qin
4b4c03bd02 Merge branch 'master' into fix/missing-title-property 2022-05-09 21:39:13 +08:00
Tienson Qin
4fc479495e Simplify sidebar data 2022-05-09 21:30:31 +08:00
llcc
628fd0f3e4 Merge branch 'master' into disable-webview-resize 2022-05-09 19:44:40 +08:00
Tienson Qin
ca5745fc9b fix: title of newly created pages are all lowered 2022-05-09 00:34:04 +08:00
Tienson Qin
3166da23e3 Sanity file name when renaming pages 2022-05-09 00:34:04 +08:00
Tienson Qin
362c328e91 fix: missing title properties when page name contains / or reserved chars
Close #5171
2022-05-09 00:34:04 +08:00
Gabriel Horner
a58a411567 Move config fns and remaining util fns that mldoc depends on 2022-05-04 12:02:36 -04:00
Gabriel Horner
85bd1fecb2 Move first batch of util fns to graph-parser.util
Still need to fix external.roam
2022-05-04 12:02:36 -04:00
llcc
9e568c8016 enhance(iOS): disable webview resize 2022-04-29 11:19:44 +08:00
Tienson Qin
d93911b44c Remove both unused :git/** and :project/** dict keys 2022-04-24 11:17:47 +08:00
Tienson Qin
b3f67c69b1 misc: delete both web github integration and encryption 2022-04-24 11:17:47 +08:00
Tienson Qin
042f39d2ca fix: add title:: property if needed 2022-04-23 06:50:22 +08:00
Tienson Qin
403bb10b14 Fix: creating new pages from bracketing text is broken #4971
close #4971
2022-04-23 06:50:22 +08:00
Charlie
79bc33e1e3 Enhance/more ns plugin api (#4828)
* improve(plugin): WIP add settings schema

* improve(plugin): add identity for settings modal

* improve(plugin): WIP add settings input

* fix(ui): scrollbar overlay of modal panel content

* improve(plugin): WIP add more render types of setting item

* improve(plugin): WIP polish settings items

* improve(plugin): WIP settings list of plugins

* improve(plugin): more settings types & polish releated ui

* fix(plugin): sometimes disable plugin not work

* improve(plugin): polish ui of plugin settings

* fix(dev): warning of lint

* improve(plugin): add api of settings changed

* chore: build libs core

* fix(ui): width of settings panel wrap

* improve(plugin): separate layouts data from settings aio file

* imporve(plugin): container size of single plugin settings

* fix: add missing state

* improve(plugin): add Git ns

* improve(plugin): git related api

* improve(api): type of git result

* chore: build libs core

* fix(dev): kondo lint

* fix(plugin): use cdn sdk when js entry

* chore: build libs core

* fix(plugin): env condition

* improve(plugin): add UI ns

* fix(api): arguments of datascript query

* enhance(api): manageable message instance of UI tools

* enhance(api): WIP add experiments api

* enhance(api): WIP add resources state of plugin

* improve(plugin): add status of loading script resources

* improve(plugin): more opts for script loader

* improve(plugin): WIP add fenced code renderer hook

* improve(plugin): fenced code renderer hook

* fix(plugin): resource root path of plugin fs location

* imporve(plugin): support local files for loading scripts

* improve(plugin): types of expirements api

* fix: typo of class

* enhance(api): add namespace related apis

* enhance(api): add linked refrences related apis

* enhance(plugin): add sample links to related api comments

* improve(plugin): add db changed hook & optimize strategy of caller for hooks

* improve(plugin): compatible commands registration for old sdk

* improve(plugin): collect user sdk version for plugin local

* improve(plugin): add internal callable apis for user sdk

* chore(plugin): missing files & bump libs version

* improve(plugin): compatiable for old sdk about hook messaging optimization

* improve(plugin): db hook optimization for old sdk

* enhance(ux): auto focus searchbar when open plugins list

* improve(plugin): api of a hook from specific block changed event

* improve(plugin): api of db block change hook

* improve(plugin): add show bracket user config of api

* improve(plugin): api of db block change hook

* fix(api): toggle collapsed of block

* improve(api): try to init grpah with git before exec git commands

* improve(plugin): attributes of sandbox container

* improve(dev): support register command with keybinding

* improve(plugin): add api of register shortcut command

* fix(plugin): reubild slash commands when new command registration

* fix(dev): lint

* improve(dev): lint script of libs codebase

* chore(dev): remove useless codes

* improve(plugin):sanitize path string of plugin repo value

* fix(plugin): rebuild commands list when unregister a plugin

* fix(ui): overflow width of query result table

* chore: rebuild libs core

* improve(plugin): add assets related apis

* chore: rebuild libs core

* improve(plugin): support replace state of into block in page api

* improve(plugin): prepend/append child block in page

* improve(plugin): polished exceptions message of plugin update/install

* fix(plugin): update settings within gui

* improve(ux): debounce change event of input for plugin settings gui

* chore: rebuild libs core

* enhance(plugin): catch exception of hook plugin
2022-04-21 18:43:16 +08:00
Tienson Qin
904eff6d9d Core outliner operations refactoring (#4880)
* Add outliner nested transact!

Copied the code mostly from https://github.com/logseq/logseq/pull/4671
by zhiyuan

* refactor: insert-blocks

* fix: insert-blocks

* fix: move cursor to the last block when inserting

* fix: replace the current block when inserting and its content is empty

* keep only :insert-blocks

* expose only :delete-blocks

* Use existing implementations for move-nodes-up-down and

indent/outdent.

* fix editing state not updated immediately

* fix editing status

* fix: avoid recursive copy

* fix: inserting blocks after an empty block

* Implement move-blocks with insert-blocks

* fix: block left

* Implement move-blocks-up-down with move-blocks

* fix: paste text

* Implement indent-outdent-blocks with move-blocks

* fix: indent/outdent

* feat: multiple blocks drag && drop

* fix: indent/outdent blocks

* fix: drag drop

* Port unit tests for outliner.core

* enhance: open collapsed parent when indenting blocks

* refactor: block selection

* fix: indent/outdent blocks with different levels

* Add instrument on invalid outliner structure

* fix: can't write a block if the page has any outdated blocks

* fix: editing status for empty page

* fix: multiple drag & drop

* fix: drag & drop disallows moving from parents to its child

* fix: public property

* fix: can't delete first empty block

* Remove unused code

* fix: e2e tests

A workaround is to not select/highlight the block when pressing esc if it has
fenced code.

* remove unused code

* Add batch transaction test

* fix: update :block/page when dragging targets' children to another page

* Add more tests

* Simplify extract

* Replace db/get-conn with db/get-db

* Simplify extracting blocks from ast

* Code cleanup

* Code cleanup

* Add outliner core fuzzy tests

* Remove unused code

* fix: cursor not jump to the upper block when pressing Enter in the beginning

* fix: Enter in the beginning of a non-empty block

* Fix lint warnings

* Add editor random e2e tests

* Fix typo

* enhance: move some fns and add some comments

* enhance(outliner): add page-block? util

* fix: increase td width to prevent content overflow

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* First pass at file tests for file-sync

Each action usually passes by 5th try

* Fix two incorrect calls caught by tests

* More test improvements

- Easier auth setup
- subdirectory is configurable
- list graphs api also exercised

* Address cleanup from #3839

- Remove unused translation key
- Delete or TODO commented code
- Capitalize notifications to users

* fix quick capture template not working

* enhance(sync): add logout

* enhance: add logout i18n

* fix(plugin): sometimes plugin settings of gui not work when entry from app settings

* enable show-brackets? toggle for orgmode [[file:./pages/demo.org][demo]]

* fix(sync): fix unfinishable sync loop

* feature: logseq protocol; refactor persistGraph

* fix: deeplink support

* fix: broadcast persist graph on opening new graph with logseq protocol

* feat: logseq protocol open action for page-name and uuid

* fix: logseq protocol graph param validation

* ux: copy logseq URL of block

* enhance: remove the redundant 'open' from logseq protocol (v0.1)

* ux: page dropdown button for copy page URL

* chore: logseq protocol comments

* don't create new contents file when changing format

Logseq now creates a new contents file when users try to toggle the
preferred format, which causes file duplications error.

* fix pasting in src block not working on iOS

close https://github.com/logseq/logseq/issues/4914

* fix playing video goes into editing mode on iOS

* fix copy to clipboard failure on iOS

* add Podfile item

* fix mobile toolbar order not persisting after restart

* test(e2e): add test for backspace and cursor pos (#4896)

* test(e2e): add test for backspace and cursor pos
* fix(test): refine, fix wrong helper

* fix(ui): warn about illegal git commit interval

* enhance(editor): allow global git cmd shortcut

* style(settings): line-space of general/journals

* enhance(editor): accept enter in dummy block

Fix #4931

* fix editing state not updated immediately

* fix: can't write a block if the page has any outdated blocks

TODO: clean outdated blocks

* fix: editing status for empty page

* Random tree for outliner core tests

* Add pre assertions and fn docs based on Zhiyuan's suggestions

* Made some changes based on Gabriel's suggestions

* fix: tests

* fix: save current block before moving

* Updated the timeout to 100ms based on llcc's suggestion

https://github.com/logseq/logseq/pull/4880#discussion_r851966301

* api-insert-new-block! supports replace-empty-target?

* fix: replace all :reuse-last-block? usage

Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: charlie <xyhp915@qq.com>
Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
2022-04-19 11:14:38 +08:00
Tienson Qin
b5b0c1e06b fix: lazy loading ids 2022-04-02 21:40:28 +08:00
llcc
a1293513ec fix redundant relative path when inserting orgmode page reference
occurs when creating a new page in autocomplete menu if
`org-mode/insert-file-link` non-nils.

fix https://github.com/logseq/logseq/issues/4732
2022-04-02 18:45:12 +08:00
Andelf
535ea84068 fix(editor): error while toogle fav in journals 2022-03-21 12:49:17 +08:00
llcc
c32fba0ab1 fix: remove assets/draws from All Pages 2022-03-08 14:18:01 +08:00
Jonah Goldsaito
cc0cdb40f2 Load more journal entries (#3048)
* Update the default number of journal entries shown

* Get 7 journal entries per load while infinite scrolling

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-02-22 17:30:31 +08:00
Tienson Qin
76d1888c1b fix: don't create another today's journal when updating page title's format 2022-02-18 19:29:27 +08:00
Andelf
fef8c3970b fix(editor): page search autocompletion with square brackets mixed
Fix #4178
2022-02-10 18:34:30 +08:00
leizhe
1f1f3f5a24 fix(mobile): support page rename 2022-01-28 20:31:58 +08:00
leizhe
ae739d668d enhance(ios): sync iCloud every 5 minutes in background 2022-01-24 22:30:23 +08:00
Gabriel Horner
6e1708b7ba Add command to copy current file 2022-01-22 00:01:11 +08:00
Andelf
05114641a3 fix: add title property when necessary
Fix #3971
2022-01-21 16:10:31 +08:00
Junyi Du
ef2c337e2e enhance: don't add unnecessary title property 2022-01-20 10:33:50 +08:00
Gabriel Horner
3ec587d6eb lint :all-the-things: 2022-01-16 12:42:34 +08:00
Junyi Du
5f658b0f2d fix: change normalization from NFKC to NFC 2022-01-10 13:29:40 +08:00
Junyi Du
e5dcb014e1 enhance: yet another page-name sanity improve 2022-01-10 13:29:40 +08:00
Junyi Du
7505b0dde6 fix: introduce more page-name sanity 2022-01-10 13:29:40 +08:00
leizhe
55fdfa6ae9 fix iCloud files conflict
Files in iCloud will be downloaded at first by clicking New Graph/Re-index/Refresh.

But remember that if your file created on mobile or desktop is not
uploaded to cloud, you will never get your file synced correctly.
So please confirm if the file (with cloud icon at the top right
corner) in File/Finder at first if you failed to see you file's
update.
2022-01-06 20:26:57 +08:00
Tienson Qin
704bcda9ad fix: Child namespace pages do not show up in hierarchy view if parent
page does not exist

Addresses #3641
2022-01-05 00:41:49 +08:00