Commit Graph

49 Commits

Author SHA1 Message Date
Gabriel Horner
a6c3569ea3 fix: remove most file-graph references from frontend and electron
- Remove references to old files under logseq/ e.g.
  logseq/version-files
- Remove flashcard commands and translations that applied to file graph flashcards
- Remove unused electron and frontend events
- Remove timetracking config which was for file graphs
2026-01-22 13:19:58 -05:00
Gabriel Horner
173898240e fix: remove most file graph uses in deps
except for graph-parser and publish deps

- Removed most mentions of 'repo' in deps, which cleaned up a lot related
  to export cli and worker
- Removed db-based-graph? checks in deps except for unknown use
  in entity-plus?
- Removing db-based-graph? checks resulted in deleting unused file graph
  code paths e.g. get-pid
- Removed file graph handling in cli list command
- Remove file-based-graph? checks from deps
2026-01-22 13:19:58 -05:00
Gabriel Horner
37af8f690e fix: remove remaining uses of file graph specific attributes
Removed all file graph uses of :block/namespace, :block/file, :block/type and
:block/properties except for graph-parser which still uses them for db
importer.
Removed all uses of :block/format except for graph-parser and
src/main/frontend
2026-01-22 13:19:58 -05:00
Tienson Qin
bcc478b5f7 refactor: separate og and db version (#12276)
separate og and new version apps

remove file sync, tldraw, excalidraw and zotero
2025-12-29 15:39:32 +08:00
Gabriel Horner
18db6b1937 chore: mv db namespaces common to both graphs to logseq.db.common 2025-02-19 16:29:26 -05:00
Tienson Qin
1d9fbc8a3d perf: reduce :block/properties calls on db graphs
`:block.temp/property-keys` was added to get all the properties
for given entity.
2025-01-15 19:35:09 +08:00
Gabriel Horner
04b25a9240 chore: add basic tests for sqlite.build
and added a couple db-graph specific for query-dsl. Also
moved fns in pu that should be in db-pu
2024-06-10 11:52:39 -04:00
Gabriel Horner
3d9c606899 fix: query function for db graphs 2024-06-06 10:57:34 -04:00
Gabriel Horner
2117245b28 fix: fetching built-in property values
Fixes :number properties like hl-stamp and hl-page which returned
refs instead of actual values. This will also fix it for
future usage of built-in :default props. Also fixed a db test
2024-05-15 12:23:14 -04:00
Tienson Qin
ce4cad2cc7 Refactor/move property handler to outliner dep (#11311)
The end goal is to get rid of `db/transact!` and send outliner ops to
the db worker.

Currently, some property ops are async, set-block-property! will also
need to be async because when setting a non-ref value (e.g. a number
str "2"), we need to query whether a block with the value exists, this
unfortunately, will be an async query, so we're risking turning more
functions to async in the future which makes it hard to reason about
the implementation.
2024-05-13 18:16:21 +08:00
Gabriel Horner
24c48e7a87 fix: multiple fixes related to lookup-by-name
- only use it for user properties
- don't use create ident fn to lookup names
- fixed get-area-block-asset-url which didn't work for db graphs without
  the frontend
2024-05-02 15:16:03 -04:00
Gabriel Horner
0aa4bda66c fix: inlined db-based-graph? calls in db-property
Addressed fixmes for db-based-graph fns that were inlined to prevent
circular dependencies b/n db-property and sqlite-util.  Moved multi
graph fns to db-property-util and existing db-property-util to
db-property-build to address this
2024-04-16 14:43:28 -04:00
Gabriel Horner
6a2b6d2913 fix: adding class properties can result
in clobbered db idents. Also rename fn to make its
purpose explicit
2024-04-08 16:32:27 -04:00
Gabriel Horner
009e5b6d62 enhance: consistently create sanitized property ident
for new properties. Also made build-new-property easier to
use by making property name optional
2024-04-05 16:55:40 -04:00
Tienson Qin
13a5f91cd4 fix: use property db/ident instead of name 2024-04-02 11:59:57 +08:00
Tienson Qin
d48e45eaa7 enhance: property db ident doesn't allow # 2024-04-01 14:53:25 +08:00
Tienson Qin
958507262e Merge branch 'feat/db' into refactor/db-properties-schema 2024-03-29 15:51:28 +08:00
Tienson Qin
da42189deb fix: property ref value 2024-03-29 09:02:51 +08:00
Gabriel Horner
9c5309da47 enhance: frontend consistently uses :db/ident
for fetching built-in properties instead of :block/name
2024-03-27 20:36:48 -04:00
Gabriel Horner
9b8540921e enhance: more property helper fns uses db-ident
instead of name
2024-03-25 16:34:51 -04:00
Gabriel Horner
0bba0a2ca9 enhance: import built-in logseq.* props - part of LOG-2977 2024-02-15 15:01:01 -05:00
Tienson Qin
b06b01b88b Merge branch 'master' into feat/db 2024-01-22 12:08:37 +08: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
cf1e4691c2 fix: lint warnings 2024-01-03 16:45:11 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Tienson Qin
48b5593008 wip: outliner refactor 2024-01-02 18:07:17 +08:00
Tienson Qin
dda11a33a7 Move outliner tree to the outliner dep 2023-12-27 02:53:00 +08:00
Tienson Qin
f342303e6a Add initial tests on property handler 2023-11-30 00:34:04 +08:00
Gabriel Horner
e95531869a chore: move db only property util fns to their own ns
by doing this found a couple places where we accidentally called db fns
in file graph contexts
2023-11-17 16:36:49 -05:00
Tienson Qin
6a47648c6c Replace enum type with available choices (#10438)
* Add type schema for enum values

* Refactor: closed values instead of enum to limit values

There's no need to add the enum type, we just want to limit the
values.

* feat: :page type supports closed values

* fix: can't set property values for text/number types

* fix: don't trigger on-chosen when unmounting any select component

* fix: can't apply both page classes limitation and closed values

* fix: merge conflicts

* fix: ui not refresh when changing closed value

* fix: can't set icon for closed value
2023-11-14 18:48:34 +08:00
Gabriel Horner
cda755ef36 fix: 2 bugs with collapsible block state and properties
When 2 db graphs exist, the built-in-properties check failed because it
failed to db lookup for the new repo. Just simplified it so that db
lookup is only needed once across repos. Also limited check to hidden
built-in properties since visible built-in properties should be
treated like user properties and be collapsable
2023-10-31 11:40:03 -04:00
Tienson Qin
8c7098b21f enhance: move enum property choices to hidden page
related to LOG-2871
2023-10-30 20:35:39 +08:00
Gabriel Horner
241384c9be chore: clean up repeated uses of fetching page+property uuids 2023-10-24 09:29:30 -04:00
Gabriel Horner
f1d17ad56b fix: typing markdown heading displays correctly
Also fixed structured tag popup displaying
in heading which didn't make sense. Since this was fixed
right after gp-block/extract-blocks is called, this likely
fixed related issues where format/extract-blocks is called e.g. paste.
Fixes LOG-2821.
2023-10-23 18:01:50 -04:00
Gabriel Horner
2c1ccf99dc fix: markdown tables didn't recognize built-in v2 properties
also fix enum values not usable for api fn
2023-10-23 12:28:55 -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
Tienson Qin
336cdfbfc5 fix: whiteboard e2e tests 2023-10-18 10:34:29 +08: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
6daef07c5c fix: multi-word tags should be stripped from content
Also fixed an unrelated docstring
2023-10-12 15:14:34 -04:00
Tienson Qin
9f0eec2402 fix: whiteboard not working because of properties 2023-10-12 21:17:31 +08:00
Gabriel Horner
4b0100cb25 chore: cleanup page-property file based ns
All of frontend.util.page-property was file based except for one line.
Moved that ns to a file-based ns and moved the line out to the more
appropriate property-handler
2023-10-02 15:59:43 -04:00
Gabriel Horner
b2802e9a54 fix: named blocks and function macro
Had to update properties queries. Also loosened pu/lookup so that
user properties can use it
2023-09-20 16:26:13 -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
Gabriel Horner
2327fa3103 Fix query table settings failing on click and enhance dev commands
to display properties as named maps
2023-08-22 16:18:21 -04:00
Tienson Qin
3a530496e3 fix: built-in property id changes after app reload 2023-08-07 20:32:38 +08:00
Tienson Qin
15cb78fbf7 fix: add pre-configured properties when creating a new db graph 2023-08-02 01:49:23 +08:00
Tienson Qin
8e9a189ba1 handle whiteboard built-in properties 2023-08-01 21:48:36 +08:00
Tienson Qin
2913af2d96 fix: order list 2023-08-01 20:14:49 +08:00
Tienson Qin
dbcd082f08 wip: handle built-in properties 2023-08-01 19:03:16 +08:00