Commit Graph

921 Commits (d113f1f043b90bf2766a37dc015b29bd33b3d611)

Author SHA1 Message Date
Tienson Qin b1aae957e0 fix: esc doesn't save tags 2024-02-24 16:21:03 +08:00
Gabriel Horner 02ba0b3c87 enhance: configurable logging and user notification during import
Don't need to sprinkle prn's anymore or hide errors that shouldn't
be happening while developing
2024-02-24 00:55:14 -05:00
Gabriel Horner a61ee21e25 enhance: add basic script to test db graph import
also tweaked query script to work with db graphs by relative path
2024-02-24 00:42:46 -05:00
Gabriel Horner 356657d36b fix: adding uuids on imported classes causes multiple bugs
Caused invalid blocks as properties that were on the same block
as new class had invalid uuids. Also caused content to have
incorrect mangled uuids. Part of LOG-2985
2024-02-23 15:23:47 -05:00
Gabriel Horner eb994662a6 enhance: user can choose properties' values to import as classes
The user specified properties are then no longer needed since the
concept is built-in. Part of LOG-2985
2024-02-23 12:42:16 -05:00
Tienson Qin 6580edf841 fix: undo/redo 2024-02-23 23:50:44 +08:00
Tienson Qin 6329f6e4e7 perf: async writes 2024-02-23 23:32:24 +08:00
Tienson Qin 86b70c1f6d fix: compute block/refs and block/path-refs after pulling remote 2024-02-23 21:35:11 +08:00
charlie 9f5104e590 refactor(ui): WIP refactor the perperty editor with the shui pupops 2024-02-23 14:48:25 +08:00
Gabriel Horner 8cc4a9a63c fix lint 2024-02-22 17:03:28 -05:00
Gabriel Horner dad848fa73 enhance: improve property type detection
with macros. This improves :url property detection in docs
graph and other similar graphs. part of LOG-2985
2024-02-22 16:00:03 -05:00
Gabriel Horner bfc5bf9ccc enhance: allow user macros for :url property values
and single line :default values
2024-02-22 14:49:03 -05:00
Gabriel Horner 531a8ef533 enhance: import :filters and helpfully ignore :icon
Better to ignore :icon and explain to user than import them as broken with no explanation.
part of LOG-2985
2024-02-22 10:12:09 -05:00
Gabriel Horner 37135fd242 enhance: import tags for existing pages - LOG-2985
also fixed namespaces and aliases missing from existing pages
2024-02-21 17:16:21 -05:00
Gabriel Horner a010298fc6 enhance: handle invalid property value changes
Ignore invalid property values and notify user, rather than
import them as broken. Part of LOG-2985
2024-02-21 15:30:27 -05:00
Gabriel Horner 95a43e24a3 clean up property importing - part of LOG-2985
- infer block property values by properties, not refs
- remove unnecessary property-changes state
- centralize property-change logging and handling
2024-02-21 11:45:40 -05:00
Gabriel Horner 9591c51997 enhance: import properties of existing pages
including property pages. part of LOG-2985
2024-02-20 23:02:44 -05:00
Gabriel Horner ddefb677f2 enhance: import most page properties - part of LOG-2985
Also fix validation and bugs with built-in props. Add additional info
on parent-left conflicts as I encountered a couple while testing
pre-block removal
2024-02-20 14:50:49 -05:00
charlie 6d1fdd445a enhance(ui): export popup APIs to ui ns 2024-02-20 13:34:23 +08:00
Gabriel Horner f28cf73ef4 enhance: validate db once for an import
and notify if there are invalid blocks. Removed validating per tx during
import which speeds up import 5-10% on small graphs and more on larger
graphs. Also print some useful stats in the console
2024-02-19 15:34:58 -05:00
Gabriel Horner 4f3c4c9e03 fix: handle a property :default to :page change
Part of LOG-2985. :page property values would just be references so
use properties-text-values over `str`. Also added import timing
2024-02-19 11:34:42 -05:00
charlie 38406fb39a enhance(ui): add tag for the popups pending state 2024-02-18 11:36:55 +08:00
Gabriel Horner 7734bc8791 enhance: import can detect property type changes
and handle auto-converting a value changing from :default to any prop type
2024-02-17 00:24:50 -05:00
Gabriel Horner 04e5c79ee0 fix: invalid property values by unsupported template blocks
Correctly ignore template properties until it's supported
2024-02-16 12:36:27 -05:00
Gabriel Horner 3bf7ee5645 enhance: import support for :page and infer :date properties 2024-02-16 11:36:06 -05:00
Gabriel Horner 0bba0a2ca9 enhance: import built-in logseq.* props - part of LOG-2977 2024-02-15 15:01:01 -05:00
Gabriel Horner 18d3c87016 enhance: support built-in property imports. part of LOG-2985
:query-properties and :query-sort-by need translating. Don't
override block/schema of built-in properties. Also display
property closed values in block data cmd
2024-02-15 12:27:36 -05:00
Gabriel Horner b5a52edae8 fix: db lint 2024-02-14 17:20:27 -05:00
Gabriel Horner 3b745ac035 enhance: first pass at importing block properties
part of LOG-2985. Still somethings failing for docs graph
2024-02-14 17:16:36 -05:00
Gabriel Horner a0329fdfff fix: page properties are deleted when block content changes
Fixes LOG-3044. Also added more ref and property info to block data cmd
2024-02-14 12:09:37 -05:00
Gabriel Horner 2ff0cc1702 enhance: import whiteboards
Fixes LOG-2981. Also start setting up block properties for LOG-2985
2024-02-13 15:41:56 -05:00
Gabriel Horner 48b974d64e enhance: all page refs in imported content are special ids
close LOG-3055. Also fix graph-parser errors being ignored
2024-02-12 22:02:54 -05:00
Gabriel Horner 6dc1272bf2 fix: lint and remove unused ast in file graph exporter
Also remove unused options on d/transact!
2024-02-12 15:52:52 -05:00
Gabriel Horner 06ad57efff fix: page tags causing invalid properties on larger graphs
Tags that had their own pages were resulting in invalid properties. This
is because we were re-transacting existing pages as new pages
with new uuids which resulted in invalid properties. Fixes LOG-2984.
Also moved graph-parser export (import from db perspective) to its own
ns
2024-02-12 12:33:13 -05:00
Gabriel Horner 26bc6f0d1d chore: mv logseq.graph-parser.util.db to db dep
This ns is more appropriate in db and was only in graph-parser because
the date-time-util lib wasn't accessible to db until #10933 landed.
graph-parser dep is specific to file graphs and as much as possible
anything unrelated to this should not be in this dep
2024-02-09 16:16:33 -05:00
Gabriel Horner e8010de9c3 fix: outliner vars that should be private 2024-02-09 09:07:29 -05:00
charlie 832f18923d feat(ui): add x-popup implementation to shui 2024-02-09 12:12:21 +08:00
Tienson Qin 62b90b7ae7
Merge branch 'feat/db' into perf/lazy-load-data 2024-02-09 09:28:36 +08:00
Gabriel Horner dab6b5aff4 enhance: add support for importing page and block tags
Allows users to specify which tags are tag classes and
the rest are just normal pages. Fixes LOG-2984
2024-02-08 16:49:27 -05:00
charlie 5b6b9d050a enhance(ui): WIP playground for x popup 2024-02-08 17:10:27 +08:00
charlie 818cc2e4bb enhance(ui): WIP playground for x popup 2024-02-08 16:19:08 +08:00
charlie acb577c5f6 enhance(ui): WIP playground for x popup 2024-02-08 11:07:37 +08:00
charlie 6eb46ba77a enhance(ui): WIP playground for x popup 2024-02-08 10:04:11 +08:00
Gabriel Horner 58b2888729 fix: test and lints
also remove unused binding not caught by linter b/c it's used
2024-02-07 12:23:14 -05:00
charlie b6a0ecd462 enhance(ui): WIP playground for x popup 2024-02-07 20:02:10 +08:00
charlie 41e72b976b enhance(ui): WIP playground for x popup 2024-02-07 18:50:40 +08:00
charlie 1466ad8cc5 enhance(ui): WIP playground for x popup 2024-02-07 16:48:44 +08:00
Tienson Qin bee1cbfeb5 fix: load page tags 2024-02-07 07:22:40 +08:00
Tienson Qin 0a028ba235 fix: editor unit tests 2024-02-07 06:38:52 +08:00
Tienson Qin bd9ebaf3fd perf: skip loading classes for the initial data
re-init commands after pages has been loaded
2024-02-07 04:54:54 +08:00
Tienson Qin 6c6cc8ec34 Load classes for initial data since task commands require them 2024-02-07 04:47:57 +08:00
Gabriel Horner b1bcc1b2dd fix: unit test, lint + script 2024-02-07 04:09:01 +08:00
Tienson Qin 7e8ab72494 Merge branch 'feat/db' into perf/lazy-load-data 2024-02-07 04:07:40 +08:00
Tienson Qin 140287e3ea perf: don't load properties and classes for initial data
This commit also fixed the issue that some pages such as "Status" will
be shown as lower cased.
2024-02-07 03:45:35 +08:00
charlie cb4a6701dd Merge branch 'master' into feat/db 2024-02-06 14:13:57 +08:00
Gabriel Horner 6a73ffa5f7 fix: lints and a docstring 2024-02-05 17:03:44 -05:00
Gabriel Horner 232dbf682b fix outliner lint 2024-02-05 14:04:54 -05:00
Gabriel Horner 81697573b8 Merge branch 'master' into feat/db 2024-02-05 13:49:37 -05:00
Tienson Qin 1a040b01de feat: /scheduled and /deadline for db graphs 2024-02-05 23:54:46 +08:00
Tienson Qin d4add86e1d Merge branch 'feat/db' into perf/lazy-load-data 2024-02-05 09:52:35 +08:00
Tienson Qin fa9d5fac1e Load whole data for shorter pages 2024-02-03 19:02:25 +08:00
Tienson Qin 4e0a35fe87 fix: don't remove :block/tags from outliner-core/-save 2024-02-03 18:22:56 +08:00
Tienson Qin 6f90958e4b Merge branch 'feat/db' into perf/lazy-load-data 2024-02-03 12:52:35 +08:00
Tienson Qin 873fdc6339 enhance: lazy load all pages 2024-02-03 12:42:45 +08:00
Tienson Qin 2bc2e9e8ca fix: indent on file graphs 2024-02-03 10:54:27 +08:00
Tienson Qin d00b2c1e47 avoid async queries if blocks are not rendered yet 2024-02-03 10:34:21 +08:00
Tienson Qin 9028976100 fix: block breadcrumb 2024-02-03 08:11:01 +08:00
Tienson Qin 8f845a7145 attach block left and parent for <pull & <get-block 2024-02-03 07:09:52 +08:00
Gabriel Horner ca752834c1 enhance: basic block tags for import - part of LOG-2984 2024-02-02 17:39:08 -05:00
Gabriel Horner b6a952fd7d fix: assets not copied for import
Caused by a commit yesterday. Also removed unused
import-file-to-db-graph options
2024-02-02 16:16:18 -05:00
Tienson Qin 2e1e3572df fix: add db requests for outliner core tx 2024-02-02 03:46:12 +08:00
Tienson Qin 7a4251856a Revert "fix: enable promise usage in outliner-ui/transact!"
This reverts commit 95cd7d51fc.
2024-02-02 00:20:41 +08:00
Tienson Qin 4b9b825101 refactor indent-and-outdent 2024-02-02 00:16:49 +08:00
Tienson Qin 95cd7d51fc fix: enable promise usage in outliner-ui/transact! 2024-02-01 20:07:39 +08:00
Tienson Qin 620ad617f9 fix: load closed values 2024-02-01 17:18:23 +08:00
Tienson Qin 3dfe5c5751 fix: load all pages and files when app starts 2024-02-01 17:04:44 +08:00
Tienson Qin c9f52e8a9b fix: ref not shows when starting the app 2024-02-01 04:29:32 +08:00
Gabriel Horner 5b4bfd9089 enhance: file graph import ignores hidden files 2024-01-31 15:01:39 -05:00
Tienson Qin c1a15c0708 Merge branch 'feat/db' into perf/lazy-load-data 2024-02-01 03:58:04 +08:00
Tienson Qin 1b99388f54 fix: can't save file 2024-02-01 02:57:28 +08:00
Gabriel Horner a68c5eea52 fix: file/name-format is file graph only
Confirmed this with the last refactor. Also remove references to
setting that was removed in eb6e5942f8
2024-01-31 13:34:12 -05:00
Gabriel Horner bf56cd3252 chore: move legacy fns to legacy ns
title property is for file graphs and should be kept with its ns
to avoid confusion
2024-01-31 11:11:14 -05:00
Tienson Qin 44dca4f506 wip: plugin api calls
Also avoid calls to worker if a block has been fully loaded
2024-01-31 21:51:52 +08:00
Gabriel Horner f6e9e2630f fix: deprecate :favorites for db config
related to LOG-3031. Also comment all known
file graph only config keys
2024-01-30 15:26:19 -05:00
Tienson Qin 420e361381 fix: async <get-file and <get-files 2024-01-30 21:17:18 +08:00
Tienson Qin 99b6d543f0 fix: more async queries and export to roam 2024-01-30 20:03:06 +08:00
Tienson Qin 7b754c672f fix: page unlinked refs
Use search indice to search first and then filter the result by the
db worker. This avoids using `d/datoms` which loads all the blocks to
the memory.
2024-01-30 18:31:06 +08:00
Tienson Qin 1e6daf6563 fix: page/block refs and refs count 2024-01-30 17:10:38 +08:00
Gabriel Horner 28e637e855 chore: merge 2 new property fns together
refactor possible since page-name-sanity-lc in common-util
2024-01-29 09:55:34 -05:00
Tienson Qin b5b85dd44d fix: lazy load whiteboards 2024-01-29 18:54:52 +08:00
Tienson Qin eba0fe9545 Lazy load block container 2024-01-29 15:25:42 +08:00
Tienson Qin 752f88de19 Async get block and children 2024-01-29 14:48:41 +08:00
Tienson Qin 3addb5905b perf: load partial data when loading a graph
Instead of all the datoms
2024-01-29 13:17:37 +08:00
Tienson Qin d9ff061436 fix: don't remove orphaned refs if content hasn't been changed 2024-01-26 22:14:55 +08:00
charlie 4cfd97de3d Merge branch 'master' into enhance/refacotr-ui-x-menu 2024-01-25 12:34:15 +08:00
Tienson Qin 1536d9aff5 fix: regression of unwanted tag pages are created as you type
Fixes LOG-2820
2024-01-25 06:47:36 +08:00
Gabriel Horner 9f4ffbe750 fix lint by refactoring large var 2024-01-24 15:52:24 -05:00
Gabriel Horner 22ed198c29 enhance: add icons to task status
also adds support for properties in initial-data to reference each other
via uuid
2024-01-24 15:39:46 -05:00
Gabriel Horner 24ea74e73a fix: upstream tests and lints failing again 2024-01-24 10:25:35 -05:00
Gabriel Horner b55fe07768 Merge branch 'master' into feat/db 2024-01-24 09:08:41 -05:00
Gabriel Horner dc5127b48a enhance: publishing --dev also watches frontend
also provide a dedicated backend command for simpler
rebuilding of backend
2024-01-24 08:53:48 -05:00
Gabriel Horner 3cd7b2d762 enhance: add a --dev mode to publishing that pairs with shadow's watch 2024-01-24 08:53:48 -05:00
Gabriel Horner ce2341506d fix: publishing not loading correctly
Caused by pulling in the new component system. Fixes #10893
2024-01-24 08:53:48 -05:00
Tienson Qin d1af653273 chore: ldb/transact! should takes `repo` instead of conn for UI 2024-01-24 17:35:09 +08:00
Tienson Qin a64f49dc6f Remove :block/marker and :block/priority from tx-data 2024-01-24 16:38:09 +08:00
Gabriel Horner 77bc1d5d6b chore: update better-sqlite3 and mldoc in deps to match app 2024-01-23 11:36:32 -05:00
Gabriel Horner 0768809a86 fix: lints and disable intermittent failing test
- Reverted config/db-based-graph? check in a db only namespace
- Removed unused ns as it appears we just used another fn instead.
- /cc @RCmerci on failing test
2024-01-23 10:48:14 -05:00
Gabriel Horner 689cf34cc3 fix: lints and a test
nbb test was failing b/c outliner had graph-parser as a dependency
but we hadn't manually added the npm dependency
2024-01-23 09:38:16 -05:00
Gabriel Horner cc1b8445a8 fix: published graphs that don't have any public pages
This was failing hard but now it shows a blank graph
like before. Fix LOG-3017
2024-01-23 09:18:23 -05:00
Tienson Qin 575624c650 chore: revert inline tags 2024-01-23 21:45:54 +08:00
Gabriel Horner 7831476c70 enhance: add a --dev mode to publishing that pairs with shadow's watch 2024-01-22 14:35:36 -05:00
Gabriel Horner 73cbcc5a1c fix: publishing not building again
caused by new ui script changes
2024-01-22 12:05:01 -05:00
Gabriel Horner c9ba357a90 fix multiple lints 2024-01-22 09:17:38 -05:00
Tienson Qin 8204c93977 fix: outliner dep test 2024-01-22 12:21:42 +08:00
Tienson Qin b06b01b88b Merge branch 'master' into feat/db 2024-01-22 12:08:37 +08:00
Gabriel Horner a80a182a8f fix: update publishing setup since there are 2 more assets
Also add compilation flag for code splitting bug
2024-01-19 15:27:02 -05:00
Tienson Qin 036f1b5ab7 feat: /todo/other-status and /urgent/other-priority to set property 2024-01-19 02:36:23 +08:00
Tienson Qin 8a846f6f81 feat: add task class and default properties `status` and `priority` 2024-01-18 23:16:08 +08:00
Gabriel Horner f573b8e821 fix: file graph import not persisting to disk 2024-01-17 12:57:16 -05:00
Gabriel Horner 0168ef0082 fix: 2 bugs with file import
These were silently failing and causing a number of pages to
not import
2024-01-16 17:01:23 -05:00
Gabriel Horner 095894b255 Revert most of "fix: new db graph couldn't be created"
Last commit removed built-in pages and was noticed on imports.
Previous bug of new db graphs leading to a blank screen no longer
occurred after I printed transact! transactions
2024-01-16 16:05:02 -05:00
Gabriel Horner d232a8e08c fix: new db graph couldn't be created
Caused by duplicate transacting of default-pages. Also
removed reference to deleted ns
2024-01-16 11:37:25 -05:00
Tienson Qin cea105cc34 fix: wrong ns import 2024-01-16 16:01:18 +08:00
Tienson Qin a619850998 Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-16 15:42:18 +08:00
Gabriel Horner 34222b3436 chore: bump nbb-logseq that points to upstream nbb 2024-01-15 18:07:49 -05:00
Gabriel Horner 2305d09cc8 chore: DRY up duplicated vars and needless/confusing aliases 2024-01-15 16:51:27 -05:00
Gabriel Horner ca020fcdb3 fix: loading all new deps namespaces in nbb
- bb test:load-all-namespaces-with-nbb now passes for all deps
- Updated nbb-logseq to support cljs.core/Atom
- Adjusted datascript.impl.entity with previous datascript.db require
  so that correct loading occurs in nbb
- fixed missing deps in logseq.outliner
- Converted a minor cljs.spec to malli since malli is nbb compatible
- Changed exists? to some? since they are functionally equivalent for
  the given arg and some? is nbb compatible
2024-01-15 12:43:16 -05:00
charlie 38eeb8cc8a enhance(ui): polish the shortcut label 2024-01-15 11:21:03 +08:00
Tienson Qin 774a159451 fix: history e2e tests 2024-01-14 16:55:07 +08:00
Tienson Qin b55e4e7380 fix: db requests could be dropped if some requests not finished yet 2024-01-14 12:55:55 +08:00
Gabriel Horner 951e7cc841 fix: ns-docstring and large-var deps lints
Also fixed db-and-file-graphs-separate lint and moved gp-property tests
that should be moved since their source code has moved from frontend
to gp-property
2024-01-12 17:03:09 -05:00
Gabriel Horner 66f57104ab fix: fail-invalid? option on in-app db validation
alert can't be called in a worker
2024-01-12 15:12:18 -05:00
Gabriel Horner 690764aa52 fix: unused time dep and duplicated time-ms fns
cljs-time shouldn't be added to nbb.edn since it's already included in
nbb-logseq (since parts of it aren't nbb compatible). duplicated
time-ms fns can now be removed since they are available to all deps
from common dep
2024-01-12 10:41:22 -05:00
Gabriel Horner 98dd1c2b5c fix: published graphs failing on class pages
Bring back get-namespace-pages impl that doesn't add :block/file
to db graphs. :block/file isn't used in db graphs.
Also got kondo lint back to green
2024-01-11 16:40:13 -05:00
Tienson Qin d5e62ae21f fix: ensure linear sequential transactions for the db worker 2024-01-12 04:14:22 +08:00
Gabriel Horner cdddce0120 fix deps db test and most lints
Also deleted duplicated gp-util.{page-ref,block-ref} files that were moved to common
and moved a related test to common dep
2024-01-11 14:35:04 -05:00
Gabriel Horner a81e18e9a6 fix: update nbb-logseq and make entity-plus nbb compatible
deps can now load in nbb and all nbb tests pass except for db
2024-01-11 13:10:06 -05:00
Tienson Qin 6173879ca0 fix: test 2024-01-12 00:41:03 +08:00
Tienson Qin a9074f74f4 fix: outdent 2024-01-11 23:43:23 +08:00
Tienson Qin a81229576d fix: group transactions 2024-01-11 20:18:40 +08:00
rcmerci 16f1f448db fix malli_schema for asset-block 2024-01-11 18:09:11 +08:00
rcmerci 2dca1b6df8 feat(rtc): add schema for asset 2024-01-11 14:08:18 +08:00
Gabriel Horner a2bb7e4479 fix: adding timestamps to imports shouldn't change updated-at 2024-01-10 16:06:20 -05:00
Tienson Qin 264f7dd40a Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-11 02:57:37 +08:00
Tienson Qin a550090249 Remove assert 2024-01-11 01:02:13 +08:00
Tienson Qin baefeaad5b fix: use page-handler/<create! if possible 2024-01-11 00:54:19 +08:00
Gabriel Horner 0d4b46be71 fix: remove deleted :block/unknown schema
:block/unknown was a side effect of the last storage approach
2024-01-10 09:20:50 -05:00
Tienson Qin 5cad97c617 feat: returns a deferred promise for logseq.db/transact!
This enables callers to wait for the result.
2024-01-10 20:23:11 +08:00
charlie 332f2fdf29 enhance(ui): polish colors for the cmdk shortcuts label 2024-01-10 16:36:46 +08:00
Tienson Qin 9ee04feeb5 Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-10 16:13:56 +08:00