Commit Graph

1026 Commits

Author SHA1 Message Date
Gabriel Horner
2acac87094 fix: macros were not being saved
macros were being discarded as unknown blocks when they should've been
saved as a block with a known type.  Introduced a new type number as
macros don't have most of the attributes that blocks or pages do.
Features like collapsible queries now work in db graphs. Also removed
an outdated reference that assumed macro was a page (which it no longer
is)
2023-10-25 17:05:31 -04:00
Gabriel Horner
4fd591620b validate entities that are changed per transact!
This should help us catch bugs due to invalid data fairly quickly.
This only runs when in dev?
part of LOG-2818
2023-10-20 16:57:00 -04:00
Gabriel Horner
f860553d89 enhance: add enum choices to built-in table properties
Also hide all built-in table properties like we do for file graphs
2023-10-19 11:57:27 -04:00
Gabriel Horner
b4e5e4b640 enhance: tags dropdown autocompletes to classes
Autocompleting all pages including journals and built-in pages is
noisy and misleading. By autocompleting classes we give user
a better experience and avoid creating buggy edge cases like built-ins as a
class. Properties can also choose to class page autocompletion by
choosing "Logseq Class" for their property's :classes
2023-10-18 16:43:40 -04:00
Gabriel Horner
c7c438b85a fix: last-modified-at not being set for files
Also fixed a bug with the all-files view where the current time was
being displayed instead of a file's last modified time. Also updated
db graph's schema for files
2023-10-17 16:12:24 -04:00
Gabriel Horner
edaf9b286a chore: move frontend db namespaces to a dedicated parent ns
Moved these namespaces to logseq.db.frontend.* to make their purpose
explicit and make the namespaces easier to maintain
2023-10-16 17:24:51 -04:00
Gabriel Horner
e09a5d9988 fix: pages didn't consistenly have :block/format
Making attributes consistent reduce bugs in components and query layer (where
most wouldn't know to use get-else)
2023-10-16 12:58:11 -04:00
Gabriel Horner
8756600fd7 Add CI job to test creating and validating a db graph
also update older actions
2023-10-13 10:53:01 -04:00
Gabriel Horner
1aa1d46474 fix: db and most frontend lints 2023-10-12 16:30:04 -04:00
Gabriel Horner
cd6b50459d fix: bring back property creation from new class modal
also loosened property schema as irreversible :type
has changed how :block/schema is set
2023-10-12 13:36:34 -04:00
Gabriel Horner
82bcd01525 simplify :map declarations in db schema
Make :closed opt in rather than required in order for --closed-maps
to work
2023-10-12 10:02:45 -04:00
Gabriel Horner
4f7baaaffe fix: icon page failed to load
caused by icon having wrong type
2023-10-12 09:22:11 -04:00
Gabriel Horner
8eeeef536b fix: using enum values shouldn't create unknown blocks
also updated enum schema
2023-10-11 18:07:08 -04:00
Gabriel Horner
c8ccc79e82 fix: db/ident and schema/version shouldn't create unknown blocks
Also log unknown blocks and make their entity more explicit with the
goal of eventually resolving all unknown blocks. Also added
a query bb task. Part of LOG-2818
2023-10-11 16:02:13 -04:00
Gabriel Horner
fe7a46eac9 Move db malli schema into db dep since it's stable
Also add a validate-db task. Part of LOG-2739
2023-10-11 08:40:26 -04:00
Gabriel Horner
ccc0bf9bad Add validation for property values
Reuse schema for property types and values from frontend. Moved into db
deps as it will soon be needed for a db namespace. Also tweaked schema
for :template type
2023-10-10 17:31:30 -04:00
Tienson Qin
00445910c7 fix: both tagged blocks and pages are objects 2023-10-09 00:43:36 +08:00
Gabriel Horner
df8f16ba2c add validation for internal and user properties
by reusing existing schema-types for db properties
2023-10-06 15:18:37 -04:00
Gabriel Horner
83e9cda446 fix: new properties that didn't have :block/journal?
Some page queries depend on the existence of this attribute including
graph view ones. This was caught by the validation script. After the fix
all pages have this attribute. Creation scripts also updated to use
standard timestamp approach
2023-10-06 12:29:33 -04:00
Tienson Qin
85d1a82340 fix: cleanup block parents created from properties when reset value 2023-10-04 20:53:08 +08:00
Gabriel Horner
a0441f3ddf enhance: move db-based recent pages and search to local storage
These read-only actions were saved to datascript storage and would
cause needless conflicts for multiple users
Fixes LOG-2833
2023-10-03 10:58:19 -04:00
Gabriel Horner
8df7c37245 disable nlp-date? property in db graphs
We have date properties in db graphs and users should be using them
instead of this poor performing approach
2023-10-02 16:44:03 -04:00
Gabriel Horner
fcd4ee1d33 chore: block/pre-block isn't used in db graphs
Move related fn into a file only ns and fix lints in that ns
2023-09-29 22:21:34 -04:00
Tienson Qin
83723cb5fd fix: page icon display 2023-09-27 21:50:29 +08:00
Gabriel Horner
7ba09bdb69 fix: has.*property rules incorrectly match blocks that had date properties
Adding a property to a block and then deleting it used to leave empty
values on all property types. Thx to the recent multi-select ux update
, this mainly just happens with the date type
2023-09-26 09:29:29 -04:00
Gabriel Horner
93d544e96a fix: toggling ordered list number
also removed and fixed related property type that was invalid
2023-09-25 16:55:29 -04:00
Gabriel Horner
4d819ac1b3 fix: slides and aliased page navigation for db version
Update a few fixmes for properties.
Also add built-in prop which we've documented for slides.
Also show hide for built-ins properties as built-ins also use it
2023-09-25 15:29:24 -04:00
Tienson Qin
0e8653985d refactor: allow a block to have multiple types
For example, a whiteboard page can be used both as a property and a class.
2023-09-25 10:46:00 +08:00
Gabriel Horner
358987d7b3 Fix icon property and update property related fixmes 2023-09-21 16:34:06 -04:00
rcmerci
b12432bcd6 feat(rtc): support :block/alias sync
also update `ref-type-attributes`, `card-many-attributes`,
`card-many-ref-type-attributes`, `card-one-ref-type-attributes`
in ns `logseq.db.schema`
2023-09-21 00:31:38 +08:00
Gabriel Horner
6cf19c60f8 fix: exclude-from-graph-view and public properties
Hide them as no need to see them by default but still need to be
accessible to modify. public's queries hadn't been updated to work with db graph yet
2023-09-20 09:26:37 -04:00
Tienson Qin
b2161ac5ec feat: collapse/expand block values 2023-09-13 18:45:15 +08:00
Gabriel Horner
c07da6cc80 Move handler.common.repo fn into sqlite-util
This makes create-graph* namespaces independent of frontend
as they should be to be used externally
2023-09-06 08:59:40 -04:00
Gabriel Horner
b264d17309 Move db-graph property fns to its own logseq.db ns
db-graph related fns like these shouldn't be in the graph-parser dep as
that dep should only really be used with file graphs as much as possible.
This is also being done in preparation for making the create-graph ns independent of
the frontend

Also db- prefixes in fns were dropped since the ns now carries the db-
prefix
2023-09-05 17:15:45 -04:00
Tienson Qin
33f8a24397 perf enhancement
1. add :block/tx-id to check whether block has been updated
2. avoid rendering blocks if they're not updated
2023-09-04 14:15:46 +08:00
Gabriel Horner
9fff912f1e Improve on create graph script
- Split out reusable fns to their own ns
- Created graph now initializes all the same data as in the app
- Had to make a copy of block-with-timestamps for nbb compatibility
  and started using it in a couple places that are easy to QA
2023-08-20 02:38:53 -04:00
Gabriel Horner
e41adc6399 Disable more property editing for publishing app
Also fix some minor lints
2023-08-17 09:42:08 -04:00
Tienson Qin
6087d3dfbd fix: browser db loading 2023-08-16 13:37:35 +08:00
Gabriel Horner
172ee0ae24 Provide sqlite.cli for reusable sqlite fns
Already had to do read-graph 3 times and will soon need to it outside
logseq so worth putting this behind an api ns
2023-08-15 18:08:44 -04:00
Tienson Qin
4bff0b975f Add :block/link to ref-type-attributes 2023-08-15 19:22:49 +08:00
Tienson Qin
d75e5c6e72 chore: rename :block/instance to :block/link 2023-08-15 15:15:49 +08:00
rcmerci
aff2620505 persist edit-operation 2023-08-02 22:54:05 +08:00
Gabriel Horner
0b09b6af56 Fix db lint 2023-07-28 10:46:40 -04:00
Gabriel Horner
84b80e8b76 Fix electron code breaking db deps again
Introduced by last commit /cc @rcmerci. This has happened previously at
0c533a9032 and
8a1c54173b. Please run `yarn test` in
deps/db to catch this
2023-07-28 10:27:24 -04:00
rcmerci
be7cb85e35 update some rtc related ns 2023-07-28 18:52:51 +08:00
Gabriel Horner
0ad7796b19 Fix db lints 2023-07-27 16:45:11 -04:00
Gabriel Horner
cd4059c890 Add support for page property queries
page-property-queries test passes
2023-07-27 11:57:10 -04:00
Gabriel Horner
2bd7a8d496 Fix querying for multi non-ref vals and single page-ref
Also fixed db lint
2023-07-25 17:27:43 -04:00
Gabriel Horner
3f52860cf1 Fix perf issue with property rules for db graphs
Use multiple clauses instead as confirmed by perf test.
Using multiple clauses made rule preparation for d/q more complex
so introduced extract-rules
2023-07-25 17:20:17 -04:00
Gabriel Horner
e9fecfa280 Fix property rules for advanced queries with db graphs
and provide a rules var just for db graphs.
Also simplify query-dsl db-graph support as query-dsl/parse-query
doesn't need to know about db graphs for how it's used
2023-07-25 13:53:18 -04:00