Commit Graph

3732 Commits

Author SHA1 Message Date
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
Gabriel Horner
953d9e39cf fix: users can't change parent property of built in classes
This was still possible from a couple of places so hiding parent wasn't
helping
2024-12-17 22:04:29 +08:00
Tienson Qin
a42d4a8f7d fix: can't create an Asset from the Asset page 2024-12-17 22:04:28 +08:00
Gabriel Horner
3dff9e26c0 fix: aliasing of namespaced pages broken
Also fixes docs graph warnings about ignored attributes
2024-12-17 22:04:28 +08:00
Gabriel Horner
f58f83eb38 fix: more imported properties and tags
that had extra :logseq.class/Page. Explains the page
count change in this branch
2024-12-17 22:04:28 +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
06b9f6107d fix: tests 2024-12-17 22:04:28 +08:00
Tienson Qin
3fe71cc023 fix: tests 2024-12-17 22:04:28 +08:00
Gabriel Horner
596700c6a3 fix: imported tags aren't both a Page and a Tag
imported tags should behave like app
2024-12-17 22:04:28 +08:00
Gabriel Horner
afab95f8fc fix: imported properties aren't both a Page and Property
imported property should behave like app
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
Gabriel Horner
066b50589d fix: notify user when rejecting internal tag
In some contexts silent failure will seem like a bug as new users
may try to accidentally use or create some of these
2024-12-17 22:04:28 +08:00
Tienson Qin
7d961ca915 fix: disallow setting internal type tags to any block 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
a2a08ef647 fix: graph parser tests 2024-12-17 22:04:28 +08:00
Gabriel Horner
87caca8c68 fix: some imported pages were missing Page class
Also fix error reporting for users wasn't working. Also fix lint
and add another attribute to linter
2024-12-17 22:04:28 +08:00
Tienson Qin
380628650e fix: more tests 2024-12-17 22:04:28 +08:00
Tienson Qin
1269d1c277 fix: more tests 2024-12-17 22:04:28 +08:00
Tienson Qin
c6c925d40e fix: exporter whiteboards tests 2024-12-17 22:04:28 +08:00
Tienson Qin
916a3e5bb1 fix: lint 2024-12-17 22:04:28 +08:00
Tienson Qin
a025b4b096 wip: fix exporter tests 2024-12-17 22:04:28 +08:00
Tienson Qin
e737a69583 fix: importing tags that have the same names as internal tags 2024-12-17 22:04:28 +08:00
Tienson Qin
c78d019389 fix: don't overwrite internal tags when importing md files 2024-12-17 22:04:28 +08:00
Tienson Qin
c02270f349 fix: outliner tests 2024-12-17 22:04:28 +08:00
Tienson Qin
37747507d1 fix: lint 2024-12-17 22:04:28 +08:00
Tienson Qin
caab95af52 fix: Page tag in exporter 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
6505d535c3 Add shadcn tabs 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
Tienson Qin
c7e26a671e fix: schema validate 2024-12-17 22:04:27 +08:00