Commit Graph

1079 Commits

Author SHA1 Message Date
rcmerci
fe5ba4ff42 enhance: update entity-memoized 2024-12-29 16:36:07 +08:00
Tienson Qin
5a374c9e11 fix: don't cache nil as seen immutable entities 2024-12-29 15:20:45 +08:00
rcmerci
201a18fe5f fix: has-tag? need nbb compatible 2024-12-29 12:15:19 +08:00
rcmerci
4ad4019bf5 perf: faster has-tag? 2024-12-28 23:37:57 +08:00
rcmerci
a82d4ba150 fix: db/entid not found in nbb 2024-12-28 17:20:27 +08:00
rcmerci
70777ea473 fix: deps/ test 2024-12-28 17:03:52 +08:00
rcmerci
f7815b487d fix: nbb test 2024-12-28 16:39:33 +08:00
rcmerci
26e2fad13d fix: move missionary_util to deps/common, fix some deps issue 2024-12-28 14:22:16 +08:00
rcmerci
d36f1c35f2 perf: cache d/entity result for immutable entities 2024-12-27 19:46:07 +08:00
Tienson Qin
a46499904a fix: test 2024-12-25 16:43:44 +08:00
Tienson Qin
bee0e27d19 fix: tests 2024-12-25 15:41:00 +08:00
Tienson Qin
60c9b7c7e0 fix: demo page crash 2024-12-25 15:35:15 +08:00
Tienson Qin
a3f6e074c9 Merge branch 'feat/db' into refactor/tag-as-type 2024-12-24 17:43:58 +08:00
Gabriel Horner
513f52ce50 fix: new and imported graphs invalid b/c of user migration
Follow up to f5f857148b
2024-12-20 11:20:19 -05:00
rcmerci
f5f857148b refactor: rename :logseq.user/xxx to :logseq.property.user/xxx 2024-12-20 13:03:55 +08:00
Gabriel Horner
dbb84f0327 Merge branch 'feat/db' into refactor/tag-as-type 2024-12-19 15:29:25 -05:00
rcmerci
f33fac9563 feat(rtc): inject users info into graphs 2024-12-19 20:33:23 +08:00
rcmerci
c75aad8bff enhance: add properties logseq.user/<xxx> 2024-12-19 15:09:02 +08:00
Gabriel Horner
9ba95a0beb fix: tagging with a built-in property causes invalid blocks
Display error to user rather than cause invalid state
2024-12-18 17:15:34 -05:00
Gabriel Horner
e5b32b16f5 fix: invalid entity when user class is used as a property 2024-12-18 15:56:26 -05:00
Gabriel Horner
3638644dab enhance: improve :block/tags validation
The move from :block/type to :block/tags allows for a couple
types of bugs that weren't possible before. Add validations
to ensure built-in entities aren't being accidentally modified
by the UI and that :logseq.class/Page remains simple and a useful
tag for features later. The Page validation is turned off until an
importer bug is fixed
2024-12-18 15:11:32 -05:00
Gabriel Horner
4897519815 fix: remove unused core schema attrs
:block/alias and :block/tags are validated as properties and thus no
longer need attribute definitions. This should've been updated with attribute properties refactor.
:block/namespace has not been in db graphs for awhile
2024-12-17 14:21:10 -05:00
Gabriel Horner
bc0f63694a fix: Don't show 'New page' in page autocompletion for
an existing tag or property. This made sense when pages were split by
type but it doesn't make sense now that a Tag or Property can be a Page.
The 'New page' that showed up was also buggy as it didn't actually
create a new page. Also fixed page-exists? doing a case sensitive check
when a Page and Tag were in the same tags
2024-12-17 22:04:29 +08:00
Gabriel Horner
5399278bb6 fix: page-exists? not returning anything for db graphs
Caused some buggy page creation. While [?b :block/tags ?db-ident] for an
individual db-ident, it doesn't work when db-ident is a destructure :in
arg. For that case only integers worked
2024-12-17 22:04:29 +08:00
Gabriel Horner
f391f19e7b fix: logseq.class/Tag did not have a Tag leading to
buggy exceptions for :logseq.class/Tag anywhere :block/tags queries
:logseq.class/Tag is used e.g. validation, page existence and querying.
Perhaps before 89cdf5f9f6940dba48cacd82056ad62253ce46c7, this wasn't
possible because of the way the graph was initialized. Also removed
one parent assertion for previous fix since we didn't need both
assertions to prevent a regression
2024-12-17 22:04:29 +08:00
Gabriel Horner
f72370d21e fix(regression): blocks can't have duplicate content
This wouldn't allow tasks with the same name or even any two blocks have
the same content. See ddabf90263 for the
original fix for more. Also fixed lint and tweaked test
2024-12-17 22:04:29 +08:00
Gabriel Horner
05a31b7d76 fix: importer had incorrect set of Page based classes
Just derive from built-in-classes so this doesn't keep happening
2024-12-17 22:04:29 +08:00
Gabriel Horner
5036b976ab fix: Tag and Property not storing their parents correctly
They weren't visible on their Root Page but bigger bug is that their
:logseq.property/parent wasn't storing or querying correctly.
Also changed their parent to Root as they aren't dependent on Page
and no need to make bootstrapping more complex
2024-12-17 22:04:29 +08:00
Gabriel Horner
d624d5e7db fix: users cant change tags of built-in classes like Tag
Could cause all kinds of bugs. Also moved tags vars to db-class
to have a central ns like we do with properties and l.db.frontend.property
2024-12-17 22:04:29 +08:00
Tienson Qin
0ec09b6f0a fix: allow #Journal, #Tag, #Property to be shown for tags property 2024-12-17 22:04:28 +08:00
Tienson Qin
2eb86ba253 fix: tests 2024-12-17 22:04:28 +08:00
Tienson Qin
7bacc1fc5d enhance: assert not transacting entities 2024-12-17 22:04:28 +08:00
Tienson Qin
3fe71cc023 fix: tests 2024-12-17 22:04:28 +08:00
Gabriel Horner
ee6fd77c4a enhance(dev): reuse test helper from graph-parser with other deps
Also bring back page test helper which doesn't have file graph assumptions
2024-12-17 22:04:28 +08:00
Tienson Qin
9cac93c452 fix: page? and whiteboard? should work for file graphs 2024-12-17 22:04:28 +08:00
Tienson Qin
2a37311307 fix: disallow removing #journal 2024-12-17 22:04:28 +08:00
Tienson Qin
380628650e fix: more tests 2024-12-17 22:04:28 +08:00
Tienson Qin
37747507d1 fix: lint 2024-12-17 22:04:28 +08:00
Tienson Qin
1979b70b32 fix: db tests 2024-12-17 22:04:28 +08:00
Tienson Qin
a97714e7fe fix: tests 2024-12-17 22:04:27 +08:00
Tienson Qin
3d84993d6d remove :logseq.class/Closed-Value
Because we know a entity is a closed value if it has the property
`block/closed-value-property`.
2024-12-17 22:04:27 +08:00
Tienson Qin
253d068e33 fix: set internal classes parent to :logseq.class/Page 2024-12-17 22:04:27 +08:00
Tienson Qin
a73606155b enhance: allow existing page and property to be used as tags 2024-12-17 22:04:27 +08:00
Tienson Qin
57912bda15 chore: hide internal tags from all pages and graph view 2024-12-17 22:04:27 +08:00
Tienson Qin
93ae0047be feat: allow tags to be used as properties 2024-12-17 22:04:27 +08:00
Tienson Qin
a2bba9e27a fix: entity type 2024-12-17 22:04:27 +08:00
Tienson Qin
77c514e3de Disable users to add or delete internal tags 2024-12-17 22:04:27 +08:00
Tienson Qin
16f0491104 hide internal tags for node types 2024-12-17 22:04:27 +08:00
Tienson Qin
6e2839c36a fix: transact depend classes ahead of properties
Because properties rely on typed classes such as
:logseq.property/Property, :logseq.property/Tag.
2024-12-17 22:04:27 +08:00
Tienson Qin
f2fa4848bb fix: property type 2024-12-17 22:04:27 +08:00