Commit Graph

658 Commits

Author SHA1 Message Date
Gabriel Horner
a0d4e43d18 enhance: add /Advanced Query for db graphs
Related to
https://linear.app/logseq/issue/LOG-3246/improve-advanced-query-editor.
Had to upgrade promesa to get p/doseq
2024-09-26 10:55:50 -04:00
Gabriel Horner
30a652631d fix: incorrect return values when edn parsing fails for queries
safe-read-string assumed all parsed strings were maps by returning {}
on failure. This could lead to subtle bugs in our new query layer and
other non-map features like hiccup
2024-09-25 11:39:29 -04:00
Gabriel Horner
f41ce9d6df fix: parser large var 2024-09-24 16:56:31 -04:00
Tienson Qin
0641490fc8 fix: graph-parser tests 2024-09-25 02:12:45 +08:00
Tienson Qin
fb2cc14444 fix: don't parse parent from namespace pages 2024-09-25 01:54:42 +08:00
Gabriel Horner
afe4280c6a refactor: DRY up spread out definition of db's
namespace/parent feature. Following up to #11517, provide vars
so it's clear how a feature is used and coupled throughout the codebase
2024-09-23 14:53:12 -04:00
Tienson Qin
f494ef9786 fix: "/" page error 2024-09-21 09:51:22 +08:00
Gabriel Horner
fdc0ca58d4 fix: changing tag cases should not break their identity
Fixes logseq/db-test#83. Also add a handy log to toggle when tracing sources
of ui bugs
2024-09-20 16:11:39 -04:00
Gabriel Horner
27c5d120ef fix: import fails hard on page names with '#'
Follow up to c3f0cc1953
2024-09-19 14:57:18 -04:00
Gabriel Horner
c0e7ffe444 fix: graph-parser lint 2024-09-19 10:33:35 -04:00
Tienson Qin
b37a268706 fix: lint and test 2024-09-19 19:46:30 +08:00
Tienson Qin
e7e579d3de fix: pasting differently formatted dates disappear after entry
fixes https://github.com/logseq/db-test/issues/103
2024-09-19 18:39:02 +08:00
Tienson Qin
c3f0cc1953 fix: disallow # in page name
Because it creates ambiguity in some cases:
1. With cmd-k we can’t tell the difference between an Apple page
tagged with Fruit and a page named "Apple #Fruit"
2. What should we do with [[Apple #Fruit king]]?
3. Is `#` for Markdown heading or part of a page name?

Fixes https://github.com/logseq/db-test/issues/100
Fixes https://github.com/logseq/db-test/issues/106
Fixes https://github.com/logseq/db-test/issues/105
2024-09-19 06:31:26 +08:00
Gabriel Horner
55ce311173 fix: type page failing for docs graph
Looks like the introduction of :logseq.property.view/type
triggered a bug with new pages having the same name as a built-in
and having a page property. This is a followup fix to LOG-3039
2024-09-18 16:26:56 -04:00
Gabriel Horner
9423eda275 fix: imported queries don't have #Query
Fixes LOG-3233. Also fix some test idents not being valid
2024-09-17 12:27:46 -04:00
Gabriel Horner
85af06beb3 fix: most imported journal pages didn't have #Journal
Fixes LOG-3234
2024-09-17 11:31:26 -04:00
Gabriel Horner
de14dbe800 enhance: import query properties to use new tables
Allows imported queries to use new query tables. Fixes LOG-3232
2024-09-13 18:33:53 -04:00
Gabriel Horner
a246db8a82 fix: remove built-in properties only used by file graphs
In #11508 we switched to a new table component for db graph queries which left
these built-in properties unused. Also moved file query code to
file-based namespaces and fixed a bug where multiple query properties
couldn't be set for a file graph query
2024-09-13 12:08:42 -04:00
Gabriel Horner
8b9d2a601e enhance(dev): print ignored properties for CLI import 2024-09-12 17:25:42 -04:00
Gabriel Horner
2059eaa4f2 fix: test assertions changed by last commit 2024-09-09 15:53:40 -04:00
Gabriel Horner
4962aad8ba fix: file graph console error while typing priority
Typed '[#' and saw an error. build-new-class shouldn't be
be called for file graphs
2024-09-09 15:35:02 -04:00
Gabriel Horner
39b0e3e368 enhance: all journal pages have #Journal class
Also add some support for importer to do the same
2024-09-06 18:27:58 -04:00
Gabriel Horner
04742d6922 fix: db import of 'parent' property
Bug only triggered by user properties that happen to have same name as a
built-in property and the built-in is capitalized. Added a helper fn to
avoid this bug in the future. Removed hack from #11494 as assuming
a user properties are built-in ones would result in surprised users with
buggy imports. Also fixed lint from previous commit
2024-09-05 17:14:20 -04:00
Tienson Qin
f3c59a9db3 fix: graph-parser tests 2024-09-04 12:55:37 +08:00
Tienson Qin
c23c15ca7e fix: node references do not appear on blocks that contain a tag
fixes https://github.com/logseq/db-test/issues/43
2024-09-04 11:10:14 +08:00
Gabriel Horner
c36984c433 refactor: don't couple internal ref types to places it's not used
Follow up to #11494. Internal ref types are not used in most of the UI
and in any of the outliner layer.  Have separate vars for internal and
user ref types so we can see how they're used
2024-09-03 16:23:04 -04:00
Tienson Qin
c7677c813e refactor: set parent for any page, not just tags (#11494)
* refactor: replace :class/parent with :logseq.property/parent

* replace :class/schema.properties with property.class/properties

* enhance: display schema properties directly in Tag properties

* tag properties style tweaks

* fix: properties view context

* fix: limit parent to be classes or pages depends on the current node

* enhance: display ancestors in Parent

* fix: ancestors

* enhance: display tag properties always for tags

* enhance: display tag block container instead of properties area

* enhance: show add property as popup instead of dialog

* fix: tag parent must be a tag

* enhance: display properties in the right sidebar

* fix: tags style

* fix: icon style

* fix: positioned icons

* fix: lint

* fix: tests

* fix: remove properties from rtc watched attrs

* fix: graph-parser tests

* enhance: style tweaks

* enhance: page/create parses tags from user-input title

* enhance(ux): [[ref]] followed by # (no whitespace) to add tags

* fix: tests

* fix: graph-parser lint and tests

* fix: allow tagged nodes to be parents

* enhance(ux): display tag property descriptions

Also, make it editable.
2024-09-03 07:32:38 +08:00
Gabriel Horner
de6c6aedd2 chore: bump nbb-logseq for datascript bump in #11483 2024-08-26 11:22:40 -04:00
Gabriel Horner
f2b38b5963 fix: stop shadowing vars in deps and turn on related lint
Follow up to last commit. Added some exceptions for cljs.core
to minimize change for now
2024-08-23 16:58:08 -04:00
Tienson Qin
f11932e0c5 fix: putting the text "#Task" in a block breaks creating new tasks
fixes https://github.com/logseq/db-test/issues/24
2024-08-23 14:37:46 +08:00
Gabriel Horner
85e358e57b fix: not able to create case sensitive classes
Also important to keep db graphs decoupled from file specific
:block/name. Made sure that related fix in logseq/db-test#9 still works
2024-08-20 17:08:14 -04:00
Gabriel Horner
3a4cc55cda fix: graph-parser test and lint
Removed test as no error handling is needed for ident generation. Also
removed all related downstream uses of catch for
db-ident/create-db-ident-from-name that are no longer needed
2024-08-19 15:40:28 -04:00
Gabriel Horner
658ea25a21 fix: two db importer bugs introduced last week
- Graphs with description page failed to import
- Graphs that had a page with a built-in class name mangled the block
  types. Reverted fix for logseq/db-test#17
- Also updated test for datom count as some parser changes were made
  last week to alter it
2024-08-19 12:45:12 -04:00
Tienson Qin
7778e0fa7e fix: unable to create page if tag exists
fixes https://github.com/logseq/db-test/issues/6
2024-08-16 17:32:57 +08:00
Tienson Qin
3aae90b7fb fix: can't create tag from existing page 2024-08-16 10:57:12 +08:00
Tienson Qin
8ce71bd413 fix: can't create a new date property
Fixes https://github.com/logseq/db-test/issues/17
2024-08-16 10:18:26 +08:00
Tienson Qin
8f3cdc9d94 fix: inline tag are not created if it doesn't exist in db 2024-08-15 20:59:54 +08:00
Tienson Qin
e3dd075a55 enhance: Tag support inline display 2024-08-15 19:02:49 +08:00
charlie
837a32f03d fix(pdf): incorrect highlight value 2024-08-15 18:27:06 +08:00
Gabriel Horner
a2df9564c6 refactor: list file-graph properties that are supported
by export rather than listing db-graph properties which would
change a lot. This is a follow up to fixing built-in property conflicts
as part of LOG-3039
2024-08-08 15:16:21 -04:00
Gabriel Horner
4a69e75e88 fix: import doesn't fail if it has a page with new class name
fixes LOG-3039
2024-08-08 15:16:21 -04:00
Gabriel Horner
48df03a1fa fix: finish removing arweave
Follow up to a6e0b0a092
2024-08-08 09:24:02 -04:00
Gabriel Horner
3d8e579e67 refactor: decouple block extraction for db graphs and exporting
Coupling db graph app to export needs could lead to bugs and is harder
to maintain. Also fix a test assertion
2024-08-07 18:12:31 -04:00
Gabriel Horner
dcb73b1003 fix: db import of advanced queries
Fixes LOG-3082
2024-08-07 16:30:20 -04:00
Gabriel Horner
66439dde68 fix: db import of markdown tables and multiline blocks
Fixes LOG-3072 and fixes LOG-3070
2024-08-07 12:33:13 -04:00
Gabriel Horner
f811ab242c fix: test count changed by #11458 2024-08-06 15:53:07 -04:00
Gabriel Horner
4b4fa45ae2 fix: db import broken by type changes in #11458 and other import bugs
New data model of allowing a single :block/type failed a lot of import tx
because properties and class types could be overwritten by a single page ref.
Also this fixes page-properties-tx which wasn't just transacting the
page properties. Also fixes importing pages like 'Tags' which were
incorrectly getting associated to built-in properties with the same name
2024-08-06 15:35:21 -04:00
Tienson Qin
72552d6224 fix: avoid :block/refs self cycle 2024-08-06 15:21:13 +08:00
Tienson Qin
9c60742519 Merge branch 'feat/db' into refactor/single-block-type 2024-08-06 07:24:29 +08:00
Tienson Qin
f46372b346 chore: keep using class instead of tag for internal usage 2024-08-06 07:15:41 +08:00