Commit Graph

102 Commits (213aa261fcd422bb9b5e0cfbcc90888fe088b478)

Author SHA1 Message Date
Gabriel Horner effde81161 enhance: all user classes have :db/ident
This is important as a user's ontology (properties + classes) is now describable
with unique identifiers. This will allow for easy sharing and
importing of ontologies between users.
Also <create-class! now exists to create classes consistently. Will
be helpful when we want to provide some validation for classes
2024-05-28 16:52:12 -04:00
Gabriel Horner d1d50a5b85 chore: mv marker + priority fns to file specific ns
part of LOG-3042
2024-05-06 14:52:28 -04: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 5c81b61774 fix: file graphs can't load b/c db specific attribute fetched 2024-05-01 09:07:23 -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 97367c3d4f fix: add timestamps to built-in property pair
Also cleanup build-initial-properties and remove unused ns
2024-04-11 18:23:52 -04:00
rcmerci 2772592720 enhance(undo): batch process undo/redo-ops 2024-04-09 12:27:33 +08:00
rcmerci ef834cdaf7 feat: add defkeyword to define keyword
- add docstring for common used keywords
- support jump to definition in editors
- register malli-schema for keywords if provided
2024-04-07 15:40:30 +08:00
Gabriel Horner f728b7b9f6 fix: multiple bugs with built-in pages, fixes LOG-3046
- file graph wasn't creating built in pages
- 3 places where db graphs were incorrectly using file graph built in
  page names
- file graphs creating default pages with incorrect format
2024-03-29 16:21:19 -04:00
Gabriel Horner bd49f8d750 enhance: add shui components to import form
Also tweaked import messages and made shui alias consistent
2024-02-27 13:47:41 -05:00
Gabriel Horner bfc5bf9ccc enhance: allow user macros for :url property values
and single line :default values
2024-02-22 14:49:03 -05:00
Gabriel Horner f28cf73ef4 enhance: validate db once for an import
and notify if there are invalid blocks. Removed validating per tx during
import which speeds up import 5-10% on small graphs and more on larger
graphs. Also print some useful stats in the console
2024-02-19 15:34:58 -05:00
Gabriel Horner 26bc6f0d1d chore: mv logseq.graph-parser.util.db to db dep
This ns is more appropriate in db and was only in graph-parser because
the date-time-util lib wasn't accessible to db until #10933 landed.
graph-parser dep is specific to file graphs and as much as possible
anything unrelated to this should not be in this dep
2024-02-09 16:16:33 -05:00
Gabriel Horner 58b2888729 fix: test and lints
also remove unused binding not caught by linter b/c it's used
2024-02-07 12:23:14 -05:00
Gabriel Horner b1bcc1b2dd fix: unit test, lint + script 2024-02-07 04:09:01 +08:00
Gabriel Horner 6a73ffa5f7 fix: lints and a docstring 2024-02-05 17:03:44 -05:00
Gabriel Horner e0059892aa chore: mv file-based repo and repo-config fns as well nfs
to file-based namespaces. Confirmed and QAed these are only for
file-based. This moves the majority of graph-parser/parse-file calls
into file-based namespaces. The only ones left are in handler.file which
can be done later
2024-02-02 14:40:05 -05:00
Gabriel Horner 073f37dcc7 fix: kondo lint and add worker aliases
also fixed location of a test ns and fixed some inconsistent worker
aliases
2024-01-17 12:57:16 -05:00
Gabriel Horner cdddce0120 fix deps db test and most lints
Also deleted duplicated gp-util.{page-ref,block-ref} files that were moved to common
and moved a related test to common dep
2024-01-11 14:35:04 -05:00
Tienson Qin eb6e5942f8 fix: lint warnings 2024-01-10 01:34:15 +08:00
Gabriel Horner 6f8badf18f add frontend.persist.db* to list of db namespaces
also cleaned up inconsistent alias and fixed export-db calling
db-based-graph? when caller fns already do this
2023-12-15 09:50:22 -05:00
Gabriel Horner 2554016d63 enhance: make closed values scriptable
Added closed value examples of all 5 property types
to properties graph. Part of LOG-2903
2023-12-04 10:11:52 -05:00
Gabriel Horner 4058b43d1c chore: move db specific page components to their own ns
Components were disorganized enough that we were resorting to declare
2023-11-27 16:17:01 -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 61eeb96709 fix: 3 bugs with persisting whiteboard data
- :block/uuid was a string
- no timestamps on whiteboard blocks
- no created-at on whiteboard shape blocks

Also added missing page attributes for whiteboard page. Initially I
modeled whiteboards as its own schema type with fewer page attributes
but then I noticed it got format and journal? when referenced so just
added the missing attributes. Fixes LOG-2915
2023-11-09 11:21:18 -05:00
Gabriel Horner d6db27ce22 chore: split out class components from page
also fix LOG-2881
2023-10-31 10:53:10 -04:00
rcmerci 9eb2806305 enhance(rtc): add testcases, mock idb-keyval ns 2023-10-30 22:25:22 +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 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 ccc0bf9bad Add validation for property values
Reuse schema for property types and values from frontend. Moved into db
deps as it will soon be needed for a db namespace. Also tweaked schema
for :template type
2023-10-10 17:31:30 -04: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 fceb6ddb72 chore: split up page-handler into file-based, db-based and graph
Did this cleanup as I noticed that multiple fns were checking if they are in a
db context when they didn't need to. By organizing these namespaces, the
db and file versions will be easier to maintain.

While doing this refactor, I didn't change any logic except for removing
unnecessary db-based-graph? checks.  Also renamed a few fns to remove
redundant file- and db- prefixes
2023-10-02 14:32:02 -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 b3efb93335 Move initial namespaces to start outliner dep 2023-09-01 17:23:34 -04:00
Gabriel Horner 6d303a9d02 enhance: add class to a new object option
If a user enters new option in an object property, give
the new option the user's intended class rather than error out
2023-08-24 10:22:07 -04:00
Gabriel Horner 11991a0919 fix query builder not starting
Also fix hidden properties showing up in property dropdown of query
builder
2023-08-04 12:00:59 -04:00
Gabriel Horner 7bca841afe Fix lints again to try to keep branch as green as possible 2023-07-27 10:15:27 -04:00
Gabriel Horner 045c51cded Use sqlite.db ns in electron.db
- Add more tests for sqlite.db
- Update readme and CI for db's tests
2023-06-30 17:36:01 -04:00
Tienson Qin c81e114a1c fix: lint 2023-06-28 15:20:22 +08:00
Gabriel Horner 29ebf73476 Upgrade clj-kondo in frontend with new fixes
- Couple tests didn't have an is so nothing was tested
- test-non-consecutive-blocks->vec-tree test was fixed
  by updating block->entity-map to include nil attributes
  as the original test wanted
- Also removed a stray :focus
2023-06-13 14:48:50 +08:00
Gabriel Horner e2214b9963 Add tests for function macro
Split out macros ns that it can be tested. Merged in handler ns as it is
only used for the function macro
2023-06-06 22:12:08 +08:00
Gabriel Horner 47508ac2ac Add :hidden config support to graph-parser.cli
Also fix lints and tests from previous commits
2023-05-18 23:25:15 +08:00
Gabriel Horner 9628fc52b9 Split out property related fns
in order to make editor ns more maintainable
2023-05-04 13:50:09 +08:00
Gabriel Horner 7d801c0f10 Add tests for result related transform and grouping
Also fixed two bugs related to new :group-by-page? option
2023-04-19 14:03:34 +08:00
Tienson Qin 551122e839 Update .clj-kondo/hooks/regex_checks.clj
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-03-30 13:56:20 +08:00
Junyi Du 770fdc5894 clj-kondo: check regex error prone double escaping 2023-03-30 13:56:20 +08:00
Gabriel Horner d4cbe248f0 Finish making node-path consistent with electron renames 2023-03-30 12:57:22 +08:00
Gabriel Horner 1e9fac25e4 Add aliase and replace an outdated alias
Also start making node-path consistent for frontend
2023-03-30 12:57:22 +08:00
Tienson Qin db6fc6b7ee
feat: simple query builder (#8774)
Simple query builder

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: charlie <xyhp915@qq.com>
2023-03-21 14:27:00 +08:00
rcmerci 974e91c995 dev(lint): set :path-invalid-construct/string-join level to :info 2023-03-01 11:59:00 -05:00