Commit Graph

573 Commits

Author SHA1 Message Date
llcc
f26dbe5dc7 remove :editor/editing-page-title? state 2022-05-05 12:16:18 +08:00
llcc
4ae0ca2254 remove iOS viewport codes 2022-05-05 12:16:18 +08: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
b3f67c69b1 misc: delete both web github integration and encryption 2022-04-24 11:17:47 +08:00
Tienson Qin
d286d37590 remove unused :editor/last-edit-block 2022-04-22 00:33:48 +08:00
Tienson Qin
ec29848427 fix: indent cursor position 2022-04-22 00:28:56 +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
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
274639fe78 fix: editor freeze when cut and paste blocks at the bottom 2022-04-21 18:36:58 +08:00
Tienson Qin
71e9bdee49 enhance: parsing progress bar 2022-04-21 08:42:52 +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
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
rcmerci
93be69da0f chore(sync): remove commented out code 2022-04-04 22:31:34 +08:00
rcmerci
d4e8f3135e fix(sync): lint 2022-04-04 22:31:17 +08:00
rcmerci
ddbc677cd9 fix(sync): lint 2022-04-04 22:30:27 +08:00
rcmerci
aea611b439 feat(sync): update ui & sync-state 2022-04-04 22:27:44 +08:00
rcmerci
8a9ef0e4cf feat(login): update login & refresh tokens logic 2022-04-04 22:27:13 +08:00
Tienson Qin
b7348af7d4 fix: input editor blinks when saving or deleting a block 2022-04-02 21:49:37 +08:00
Tienson Qin
019160f32a clear last saved cursor when pressing esc 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
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
Tienson Qin
c3d95482bc Bump rum to batch updates 2022-04-02 21:40:28 +08:00
Tienson Qin
7a095571f6 remove unused code 2022-04-02 21:40:28 +08:00
Charlie
0d3ac91ca3 Feature/Setups of Onboarding Process (#4580)
UX enhancement: onboarding setup graphs 

Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-04-02 21:37:38 +08:00
Peng Xiao
65f5f2e470 fix: disable some functions for published graph 2022-03-31 13:58:24 +08:00
Yue Yang
1987d7dc79 BREAKING CHANGE: unify light mode identifier (#4652)
* chore: unify light mode identifier

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

Co-authored-by: charlie <xyhp915@qq.com>
Co-authored-by: Andelf <andelf@gmail.com>
2022-03-25 13:14:52 +08:00
charlie
2604a2726f enhance(ui): persist widen mode state 2022-03-08 14:09:22 +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
8046ccd4d6 enhancement: only run custom queries when not typing 2022-02-22 16:52:59 +08:00
Tienson Qin
8c9f2dc266 fix: UI is not refreshed when editing empty pages 2022-02-19 14:27:44 +08:00
Tienson Qin
ee9b52248e Performance improvement: incremental queries (#4002)
Incremental queries
2022-02-17 20:26:03 +08:00
Tienson Qin
26be474e55 fix: srs cards shortcuts not working
close #4230
2022-02-17 18:19:37 +08:00
Charlie
24b0236b7d Enhance/Settings UI of plugins (#4035)
more settings types & polish releated ui
2022-02-17 10:00:53 +08:00
Gabriel Horner
c6d03b67ab Merge branch 'master' into dev/var-sizes-linter 2022-02-08 12:02:39 -05:00
Tienson Qin
982eba9396 refactor: remove i18n tongue context 2022-02-08 17:31:32 +08:00
Gabriel Horner
e81678fc69 Mark most vars as cleanup-todo
Fixed a few that I knew how to QA and were low risk
2022-02-04 16:57:49 -05:00
Gabriel Horner
ec60aab5d2 Remove more unused state 2022-01-28 11:21:16 -05:00
Gabriel Horner
54420c9a5d Address review feedback 2022-01-28 10:48:44 -05:00
Gabriel Horner
1c8586e2ac Wrap up carving 2022-01-27 14:14:57 -05:00
Gabriel Horner
86868f1e15 Remove few more fns 2022-01-27 14:11:59 -05:00
Gabriel Horner
ec513a54d2 Add a command to switch graphs (#4009)
* First pass at select-graph with select component

* Add empty placeholder and move graph switch logic to events

* Remove unused force? in shortcuts

* Document additional option and make disabled open-select consistent

* Address review feedback

Add data check to :graph/switch, translation improvements and update
browser to display graph names same as in the sidebar

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-01-25 10:24:14 +08:00
llcc
1c127bb6a9 feat(ios): status bar style changes with logseq theme (#3947)
Co-authored-by: leizhe <leizhe@leizhedeMacBook-Air.local>
2022-01-21 17:14:18 +08:00
Tienson Qin
73e0c9968a enhance: safe check input on selectionStart 2022-01-19 23:08:50 +08:00
Tienson Qin
c120dd4d3b fix: selection 2022-01-19 13:00:51 +08:00
Tienson Qin
6aba8c3241 Improve long page editing performance (#3855)
* Remove expensive parsing when saving files

* Add limit to page blocks query

* Don't collapse block's body to make it compatible with other tools

* Alert if there're unsaved changes when switching graphs

* DB schema migration for :block/collapsed? from it's property

Co-authored-by: Andelf <andelf@gmail.com>
2022-01-18 10:37:31 +08:00
Gabriel Horner
3ec587d6eb lint :all-the-things: 2022-01-16 12:42:34 +08:00
charlie
53a8c8b96f fix(marketplace): download updates state when network issues 2022-01-12 23:31:22 +08:00
charlie
d863b10705 fix(dev): lint 2022-01-12 23:31:22 +08:00