Commit Graph

930 Commits

Author SHA1 Message Date
Tienson Qin
b3f67c69b1 misc: delete both web github integration and encryption 2022-04-24 11:17:47 +08:00
kkkiio
e8ab5c761d refactor: fix format 2022-04-23 07:20:30 +08:00
kkkiio
140fe27ad7 enhance(edit): add smooth-select action 2022-04-23 07:20:30 +08:00
Tienson Qin
24c0891e29 fix: lint warnings 2022-04-23 06:50:22 +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
Tienson Qin
067f25f4bc fix: copy paste 2022-04-23 06:16:45 +08:00
Tienson Qin
192eab6a09 fix: Cmd-v sometimes pastes wrong content 2022-04-22 04:32:15 +08:00
Tienson Qin
ec29848427 fix: indent cursor position 2022-04-22 00:28:56 +08:00
Tienson Qin
33e0fb4fe9 fix: press Enter in list's content when dwim 2022-04-21 21:39:09 +08:00
Tienson Qin
87007f8b07 fix: ordered list numbers 2022-04-21 21:39:09 +08:00
Tienson Qin
4eec369740 fix: only restore last editor's position if it's the same block 2022-04-21 20:41:38 +08:00
Tienson Qin
274639fe78 fix: editor freeze when cut and paste blocks at the bottom 2022-04-21 18:36:58 +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
llcc
cb61578a15 fix pasting in src block not working on iOS
close https://github.com/logseq/logseq/issues/4914
2022-04-15 17:30:05 +08:00
llcc
f4985fd8ef Feat: record audio on mobile (#4766)
* feat(audio): render audio link as component

* refactor frontend/component/block/inline

* fix audio component on mobile

* Fix(iOS): allow clock to replay audio

* feat(mobile): audio record

* add permission request code on record

* rename `editor/recording?` to `editor/record-status`

* move `get-asset-path` into handler/editor.cljs

* add android settings

* support sharing audio file from some apps

* enhance(record): insert audio link in a new block if non-editing

* feat(audio): allow cancelling record

* fix lints

* feat(iOS): add a tab bar

* tweak some css on mobile

* fix lints

* fix https://github.com/logseq/logseq/issues/4798

* enable tab bar on Android

* fix landscape height of tab bar

* add :reuse-last-block? option

* dont't show tab bar when editing mirror code

* tweak code-editor css

* increase width for more functional buttons

* fix card preview css on iPad

* add document-mode to tab bar

* remove tabbar when editing code and tweak textarea resize cursor behavior

* reduce SplashScreen launch screen duration

* don't show tabbar when editing page title

* enhance: float timer

* fix lint

* fix tabbar height on iPhone without notch

* remove .embed-page width

* fix lint

Co-authored-by: Andelf <andelf@gmail.com>
2022-04-12 20:17:54 +08:00
llcc
32809dd57f enhance: add an reuse-last-block? paras key to api-insert-new-block
When last block is empty and `reuse-last-block?` is non-nil, don't
create a new block but using last block to insert contents.

Use case 1:
When receiving shared data from other apps and inserting them to today's
empty journal, it's better to insert the data to the first empty block
instead of creating a new block to save it but keeping the first one
empty.
2022-04-07 11:16:21 +08:00
Tienson Qin
5bac3be317 enhance: highlight all blocks with the same id when pressing esc 2022-04-05 11:13:04 +08:00
Tienson Qin
a630983cdc fix lint warnings 2022-04-02 21:40:28 +08:00
Tienson Qin
096c69ffb8 fix: cursor jumps to the beginning when indent/outdent
It might be caused by the recent upgrading of rum, which brings back
the old render queue and batched updates.

ae6a85028e
2022-04-02 21:40:28 +08:00
Tienson Qin
c8e5ce3776 fix: first block's content is not updated when pressing enter
between the content.
2022-04-02 21:40:28 +08:00
Tienson Qin
b5b0c1e06b fix: lazy loading ids 2022-04-02 21:40:28 +08:00
Tienson Qin
e848dbf9f8 enhance: run custom queries immediately if editing in a query component 2022-04-02 21:40:28 +08:00
Tienson Qin
b0999efa47 Switch back to blocks tree instead of virtual list for now 2022-04-02 21:40:28 +08:00
llcc
06465e658f feat(list): enable checkbox toggle 2022-04-02 18:51:58 +08:00
Yue Yang
acb3a7bd61 chore: remove bindings
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-03-23 16:11:42 +08:00
Yue Yang
c74e2ba390 fix: also detect in a journal
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-03-23 16:11:42 +08:00
Yue Yang
0e8c90a424 fix: missing condition
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-03-23 16:11:42 +08:00
Yue Yang
39dada8bed fix: detect the first block in a page
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-03-23 16:11:42 +08:00
Yue Yang
3e36b4f216 refactor: rearrange cycle-marker (#4661)
* refactor: rearrange cycle-marker

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

* fix: remove unused markdown?

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

* fix: marker-switch

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

* fix: add missing arg

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

* docs: cycle-marker and set-marker

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

* chore: address comments

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

* chore: format code

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-03-21 12:47:59 +08:00
Peng Xiao
4ea3d6eef8 fix: replace-block-reference-with-content-at-point not working 2022-03-17 16:16:24 +08:00
Tienson Qin
0f7caff45c Update thanks to Gabriel's suggestions 2022-03-17 16:09:29 +08:00
Tienson Qin
fc644e207b Adds :outliner/block-title-collapse-enabled? configuration option 2022-03-17 16:09:29 +08:00
Tienson Qin
96b1c6788b fix: restore collapse behaviour
related to #4583
2022-03-17 16:09:29 +08:00
Andelf
c483ee56a3 fix(editor): error whilte cycling todos
Fix #4523
2022-03-10 12:30:00 +08:00
Junyi Du
bee0018a29 fix: insert timestamps on creating page entity by default 2022-03-04 17:13:33 +08:00
Junyi Du
05f6249f28 enhance: add timestamps for pages created from references and timestamps 2022-03-04 17:13:33 +08:00
llcc
46b86b081b fix(android): unable to display asset image
close https://github.com/logseq/logseq/issues/4397
2022-03-04 16:30:04 +08:00
llcc
c14e8be259 fix(android): backspace can't delete empty block
a workaroud for https://github.com/logseq/logseq/issues/4430
2022-03-03 12:24:47 +08:00
Gabriel Horner
3581e7c9fd Merge branch 'master' into fix-wrong-logbook-creation 2022-03-02 09:48:26 -05:00
Andelf
cbd18e6fe1 fix(ui): wrong format args (#4423) 2022-03-02 09:21:04 -05:00
llcc
f90fca132b Address comment. Thanks Junyi 2022-03-02 14:38:22 +08:00
llcc
e0669bf001 Merge branch 'fix-wrong-logbook-creation' of github.com:logseq/logseq into fix-wrong-logbook-creation 2022-03-02 11:02:55 +08:00
llcc
94b152ae61 make marker-pattern to a function 2022-03-02 11:01:28 +08:00
llcc
d7d7e94928 Merge branch 'master' into fix-wrong-logbook-creation 2022-03-02 10:57:08 +08:00
llcc
1fd0c47925 fix lint warnings 2022-03-01 21:30:36 +08:00
llcc
ff001849ed fix toggling block marker if its reference is in editing
close https://github.com/logseq/logseq/issues/3806
2022-03-01 21:30:36 +08:00
llcc
03d8c8a8d2 fix: set timestamp to another editing block
close https://github.com/logseq/logseq/issues/3783
2022-03-01 09:24:03 +08:00
llcc
c250ca7f40 fix(logbook): track time in markdown header block 2022-02-25 18:22:15 +08:00
llcc
db6e8f5a97 fix(timestamp): toggle marker in marker header title
close https://github.com/logseq/logseq/issues/4387
2022-02-25 18:08:18 +08:00