- 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
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.
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
- 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
* 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
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
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
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