Commit Graph

98 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
094b65336a chore: rename new property to be feature specific
and encourage for more varied use
2026-01-22 00:52:47 +08:00
Tienson Qin
c978675abc add enable-bidirectional? property to excludes 2026-01-22 00:52:47 +08:00
Tienson Qin
e5521da233 enhance: able to edit property value of :string type
able to set plural form for tags
2026-01-22 00:52:47 +08: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
Tienson Qin
404c316d4c Merge branch 'feat/db' into refactor/page-parent 2025-05-22 19:15:47 +08:00
Tienson Qin
65f5b9cd64 enhance(ux): tag properties using select 2025-05-22 19:03:24 +08:00
Tienson Qin
ad57526b9d fix: set number property 2025-04-30 17:57:43 +08:00
Tienson Qin
54e54ebd63 fix: get-pid not works for non-built-in properties in file graphs 2024-06-15 23:20:13 +08:00
Tienson Qin
71584905a7 Move set-block-properties! to property handler 2024-06-13 14:37:12 +08:00
Tienson Qin
8b1302b28e chore: remove unused property state 2024-05-27 21:46:39 +08: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
Tienson Qin
9df8918f94 Remove more :block/name lookup ref usage 2024-04-04 15:57:48 +08:00
Tienson Qin
8d6916cfd7 wip: fix property-related tests 2024-04-01 12:24:41 +08:00
Tienson Qin
cda9ac3e26 fix: display class properties 2024-03-29 10:02:29 +08:00
Tienson Qin
1b2771fe42 enhance: use eid instead of uuid for set block's properties 2024-03-28 21:33:36 +08:00
Tienson Qin
41e2944720 Replace more property name usage with db/ident 2024-03-28 20:41:12 +08:00
Tienson Qin
f5f38800c4 enhance: mod+p works for both editing and non-editing mode
The first selected block will be choosed in a non-editing mode,
we can improve this to choose the hovering block in the future.
2024-02-28 18:38:37 +08:00
Tienson Qin
5b5f0f59e9 fix: mod+p to add property 2024-01-26 17:53:55 +08:00
Tienson Qin
bceb5b4895 fix: add property blink 2024-01-26 15:44:20 +08:00
Tienson Qin
f342303e6a Add initial tests on property handler 2023-11-30 00:34:04 +08:00
Gabriel Horner
be747bd728 chore: move db graph property fns to db-based.property
Doing this revealed db graph fns were being called on file graphs for
every block and linked reference. Also removed property.handler fns
that were just wrapping a graph-specific fn as they were making handlers
less explicit and adding duplicate config/db-based-graph? checks
2023-11-17 23:37:17 -05: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
Gabriel Horner
c65958f5ec fix: duplicate closed value validation
wasn't working for hidden block or page uuid cases
2023-11-15 15:15:49 -05:00
Gabriel Horner
b359694c4b fix: multiple fixes for property validation
- couldn't use :default block property values
- couldn't add new closed number value
- couldn't select existing :page or :date closed values
- editor/CLI validation wasn't working - see failing db-graph-test job
- update schema for closed-value
Part of LOG-2871. Also fixed typo in ui.cljs
2023-11-15 14:55:57 -05:00
Tienson Qin
443eb3f2b8 fix: closed value validation
A closed value must be a UUID and exists in the predefined schema
values from its property.

Related to LOG-2871.
2023-11-15 22:58:05 +08:00
Tienson Qin
c9d01bc333 fix: no need to set :block/left for closed value blocks
related to LOG-2871
2023-11-15 21:29:51 +08:00
Gabriel Horner
86eb1b394d fix: update schema for latest changes to closed values
part of LOG-2871
2023-11-14 16:08:03 -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
Tienson Qin
8c7098b21f enhance: move enum property choices to hidden page
related to LOG-2871
2023-10-30 20:35:39 +08:00
Tienson Qin
9c251ff413 fix: hidden page names displayed in references or query results
ref LOG-2854
2023-10-26 21:54:23 +08:00
Gabriel Horner
0715b03b8f chore: cleanup file-based.property* namespaces
Split out multi-graph fns from frontend.handler.file-based.property into
frontend.handler.property.file. This cleaned up the last of the namespaces
that didn't follow the convention of file-based.* and db-based.*
namespaces are for file graph and db graph only functionality
respectively. It's important to keep the two graph implementations separate as
it's simpler and easier to maintain them. We had already
introduced needless coupling between batch-set-block-property-aux and
multi-graph fns like remove-properties-when-file-based as
batch-set-block-property-aux is _only_ run in file graphs
2023-10-24 16:49:43 -04:00
Gabriel Horner
241384c9be chore: clean up repeated uses of fetching page+property uuids 2023-10-24 09:29:30 -04:00
Gabriel Horner
c29bd3cd39 fix: enum property display should display as "properties"
since it's config defaults to it
2023-10-19 09:05: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
Tienson Qin
874c06821f fix: Searching for block property values leads to the hidden page
Fixes LOG-2836
2023-10-13 20:44:58 +08:00
Tienson Qin
c3e002aade fix: search for porperty block values leads to hidden page
Fixes LOG-2647
2023-10-11 13:11:33 +08:00
Tienson Qin
5f6e2596e8 enhance: make property type immutable for db safety 2023-10-09 21:30:51 +08:00
Tienson Qin
9a69518e96 enhance: create only one child block when press Enter 2023-10-09 20:56:45 +08:00
Tienson Qin
f56b37d9bc fix: add hidden pages for blocks created from properties 2023-10-09 20:48:01 +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
Tienson Qin
0e63baedef enhance: add switch between page and class/property properties 2023-10-04 18:49:31 +08:00
Tienson Qin
a8e7bdc37f enhance: enable reorder for class properties 2023-10-03 19:57:14 +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
Tienson Qin
38c96018b5 enhance: display enum icon in block's title only if it has a value 2023-10-02 20:56:05 +08:00
Tienson Qin
7c9edcba6d enhance: enum support other positions than in block properties 2023-10-02 09:38:28 +08:00
Tienson Qin
22d3d71040 multiple values select enhancements 2023-09-26 01:25:14 +08:00
Tienson Qin
b2161ac5ec feat: collapse/expand block values 2023-09-13 18:45:15 +08: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
6ad560e4cb fix: query table column selection
also fix lint in related ns
2023-08-22 16:27:04 -04:00