Commit Graph

39 Commits

Author SHA1 Message Date
rcmerci
b65a2d5c0f refactor: consistent alias of clojure.string 2025-01-03 16:45:10 +08:00
Tienson Qin
d847023dc1 Refactor: rename :block/content to :block/title 2024-07-10 22:33:44 +08:00
Tienson Qin
a1f352773b refactor: rename :block/original-name to :block/title 2024-07-10 21:43:03 +08:00
Tienson Qin
a15066c862 perf: db reload
Load as less pages && closed values as we can to avoid loading too
much data.

We already know that transacting db attributes is slow, going to
investigate it later.
2024-04-22 23:48:40 +08:00
Tienson Qin
99b6d543f0 fix: more async queries and export to roam 2024-01-30 20:03:06 +08:00
Tienson Qin
3fd30736b5 fix: can't open block on cmdk 2024-01-30 15:29:30 +08:00
Tienson Qin
9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Tienson Qin
4708e6067d fix: roam export 2022-12-08 21:15:47 +08:00
Gabriel Horner
1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Junyi Du
b1ce56c556 fix: roam export error caused by typo 2022-08-15 15:30:26 +08:00
Gabriel Horner
4ec5827902 Move block-ref fns and vars to their own ns
Similar to page-ref to keep namespaces explicit
2022-08-04 17:25:29 +08:00
Gabriel Horner
a3d30e0b52 Move all block ref parens strings to vars
Extracted a couple fns we kept reinventing across namespaces
2022-08-04 17:25:29 +08:00
Gabriel Horner
6f68d985bd Use core uuid fns where possible
No need for medley or personal util fns when core fns
are available. Also upgraded nbb-logseq to be 1.11.X cljs compatible

- uuid is the same as medley/uuid
- random-uuid is the same as medley/random-uuid
- uuid-string? and uuid is the same as parse-uuid
2022-05-19 14:58:33 +08:00
Gabriel Horner
65804b4183 Split out text ns to graph-parser 2022-05-10 20:22:48 -04:00
Gabriel Horner
ca9cc2454f Convert roam namespaces to cljs
The clj functionality was only for tests and those tests no longer
exist for clj. Also removed unused dependency
2022-05-04 15:16:13 -04: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
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
Gabriel Horner
7497d8b396 Lint a good chunk of src/main/frontend
Left some TODOs to discuss with others and others for me to finish
2022-01-11 17:34:54 -05:00
Tienson Qin
d04ce9d9b1 fix: Import JSON from Roam has trouble with certain code block syntax
close #2749
2021-11-11 21:48:00 +08:00
Tienson Qin
36764558b6 fix: Roam import failure
close #3054
2021-11-03 19:19:40 +08:00
Tienson Qin
d5bbe762ea fix: str/trim 2021-06-17 20:17:24 +08:00
Tienson Qin
e57657e79a fix: roam export replace embeds 2021-06-17 20:06:52 +08:00
Weihua Lu
75e90007e2 chore: clean ns 2021-06-17 20:06:52 +08:00
Weihua Lu
dc8122f5a6 feat: export as roam json 2021-06-17 20:06:52 +08:00
Tienson Qin
6b187d3545 fix: Import JSON from Roam still using "#" instead of "-"
close #2136
2021-06-10 19:16:54 +08:00
Tienson Qin
0c758fc268 feat: simplified markdown properties wip 2021-04-30 18:31:26 +08:00
Tienson Qin
b1eeebb45c fix: roam macro import
Related to #1493
2021-03-19 01:34:55 +08:00
Tienson Qin
1c75042f5b fix: can't import roam's code blocks 2021-02-09 13:03:45 +08:00
Adam Schmideg
a9df8deaae final touches on dual platform testing of Raom import 2021-01-22 06:33:08 -08:00
Adam Schmideg
b9416ac989 roam/json->edn test runs in clj 2021-01-22 06:33:08 -08:00
Adam Schmideg
d1e595ff76 roam test with cljs 2021-01-22 06:33:08 -08:00
Tienson Qin
378d692eaa feat(query dsl): add custom component 2020-12-28 22:20:49 +08:00
Tienson Qin
449c9d9e65 fix: roam import 2020-12-11 18:24:09 +08:00
Tienson Qin
6edb36a090 feat: add org link id support
Resolved #659
2020-11-16 14:27:28 +08:00
Tienson Qin
241490640c fix(import): roam research block refs 2020-11-04 11:22:58 +08:00
defclass
9b39ca84b7 fix(import): fix roam import bug 2020-10-28 15:22:19 +08:00
Tienson Qin
2d1fa33204 refactor: remove web 2020-10-27 23:19:40 +08:00