Commit Graph

266 Commits (05b582e91f3827920b5781c1bfb134174b8fd09f)

Author SHA1 Message Date
Gabriel Horner 12c667fabb Update nbb-logseq to latest datascript 2024-04-02 09:36:28 -04:00
Gabriel Horner c4fc3a193e fix: new graph should be valid
closed values were invalid. Also fixed a couple db tests
2024-04-01 16:40:01 -04:00
Tienson Qin 1ea6b6fff3 fix: property tests 2024-04-01 13:54:04 +08:00
Tienson Qin 8d6916cfd7 wip: fix property-related tests 2024-04-01 12:24:41 +08:00
Tienson Qin 958507262e Merge branch 'feat/db' into refactor/db-properties-schema 2024-03-29 15:51:28 +08:00
Tienson Qin 8d31f94b24 Remove :block/uuid and :block/name for properties 2024-03-28 17:37:28 +08:00
Gabriel Horner c5f72221ea fix: update schema and script to use new attribute 2024-03-26 12:20:41 -04:00
Gabriel Horner 8296426614 fix: lookup hardcoded db names by db/ident
also fix lint
2024-03-25 10:07:24 -04:00
Gabriel Horner b6177c758c fix: remove built-in pages for CLI db graphs
built-in pages no longer called for DB graphs. Related to LOG-3046.
Also fixed frontend lint
2024-03-14 09:56:50 -04:00
Gabriel Horner 00ddbdea7a enhance: properties graph script supports additional config
e.g. `-c '{:publishing/all-pages-public? true}'` to turn on publishing
by default
2024-03-11 16:29:04 -04:00
Gabriel Horner 96b35c0252 Update nbb-logseq to stub in cljs-bean.transit 2024-03-11 15:19:50 -04:00
Gabriel Horner 15825bd2ea fix: page-property queries for closed values
Also update properties graph to demo all the page property equivalents
to block property examples
2024-03-09 00:16:54 -05:00
Gabriel Horner 62e6084b45 fix: page/date closed values for *property queries
Also updated example graph to show closed value queries working
2024-03-08 10:17:22 -05:00
Tienson Qin 22a9b61b32 fix: remove :block/metadata
Use built-in properties
2024-03-08 01:01:55 +08:00
Gabriel Horner c6e358c983 fix: outliner test failing b/c not nbb compatible
bumped to latest nbb-logseq which is
2024-03-06 11:06:18 -05:00
Gabriel Horner 121bc212e5 chore: simplify create script with date helpers now available in dep 2024-02-07 12:42:00 -05:00
Gabriel Horner b1bcc1b2dd fix: unit test, lint + script 2024-02-07 04:09:01 +08:00
Gabriel Horner 42c1785bb8 enhance: add script to build large graphs with configurable sizes 2024-02-06 12:51:02 -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 1448ac8b7e fix lint failing due to moved dir 2024-02-01 08:50:49 -05:00
Gabriel Horner 28e637e855 chore: merge 2 new property fns together
refactor possible since page-name-sanity-lc in common-util
2024-01-29 09:55:34 -05:00
Gabriel Horner c4f6873a58 fix: schema.org graph silently failing to use new tasks
A new existing page was silently being overwritten by a schema.org page
Added detection for future conflicts with existing pages as well
as conflicts of renamed pages. Renamed conflicting properties
in same way as classes. Also added a debug option to create an edn
file which is idempotent and helpful to confirm there are no
regressions
2024-01-26 12:58:40 -05:00
Gabriel Horner c0569e83c5 fix: publishing --dev with file graphs 2024-01-24 09:24:19 -05:00
Gabriel Horner b55fe07768 Merge branch 'master' into feat/db 2024-01-24 09:08:41 -05:00
Gabriel Horner dc5127b48a enhance: publishing --dev also watches frontend
also provide a dedicated backend command for simpler
rebuilding of backend
2024-01-24 08:53:48 -05:00
Gabriel Horner 3cd7b2d762 enhance: add a --dev mode to publishing that pairs with shadow's watch 2024-01-24 08:53:48 -05:00
Taylor Hoffmann 8710bb9d61
enhance: added brazilian portuguese translations (#10891) 2024-01-24 08:39:37 -05:00
Gabriel Horner 77bc1d5d6b chore: update better-sqlite3 and mldoc in deps to match app 2024-01-23 11:36:32 -05:00
Gabriel Horner 0768809a86 fix: lints and disable intermittent failing test
- Reverted config/db-based-graph? check in a db only namespace
- Removed unused ns as it appears we just used another fn instead.
- /cc @RCmerci on failing test
2024-01-23 10:48:14 -05:00
Gabriel Horner 7831476c70 enhance: add a --dev mode to publishing that pairs with shadow's watch 2024-01-22 14:35:36 -05:00
Tienson Qin b06b01b88b Merge branch 'master' into feat/db 2024-01-22 12:08:37 +08:00
Gabriel Horner d232a8e08c fix: new db graph couldn't be created
Caused by duplicate transacting of default-pages. Also
removed reference to deleted ns
2024-01-16 11:37:25 -05:00
Gabriel Horner 34222b3436 chore: bump nbb-logseq that points to upstream nbb 2024-01-15 18:07:49 -05:00
Gabriel Horner 2305d09cc8 chore: DRY up duplicated vars and needless/confusing aliases 2024-01-15 16:51:27 -05:00
Gabriel Horner ca020fcdb3 fix: loading all new deps namespaces in nbb
- bb test:load-all-namespaces-with-nbb now passes for all deps
- Updated nbb-logseq to support cljs.core/Atom
- Adjusted datascript.impl.entity with previous datascript.db require
  so that correct loading occurs in nbb
- fixed missing deps in logseq.outliner
- Converted a minor cljs.spec to malli since malli is nbb compatible
- Changed exists? to some? since they are functionally equivalent for
  the given arg and some? is nbb compatible
2024-01-15 12:43:16 -05:00
ingepettersen 88b23c2266
enhance(i18n): Update Norwegian translation (#10849)
* Update Norwegian translation

* Minor fixes to translation files
2024-01-15 08:44:03 -05:00
Gabriel Horner 74a76f0365 chore: dry up db-based vars and update related lint 2024-01-12 17:25:21 -05:00
Gabriel Horner a81e18e9a6 fix: update nbb-logseq and make entity-plus nbb compatible
deps can now load in nbb and all nbb tests pass except for db
2024-01-11 13:10:06 -05:00
Tienson Qin 9ee04feeb5 Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-10 16:13:56 +08:00
Tienson Qin eb6e5942f8 fix: lint warnings 2024-01-10 01:34:15 +08:00
Gabriel Horner c7ab2e763c fix: api call that failed with new async call
Also update lint for recent change with frontend.db.async
2024-01-04 14:29:42 -05:00
Gabriel Horner 4fd0b65639 bump nbb-logseq to use datascript with dirty flag fix 2024-01-02 17:07:11 -05:00
Tienson Qin 4016f93884 Move db validate to worker 2023-12-28 21:25:00 +08:00
Tienson Qin eb679bd941 wip: file worker 2023-12-28 17:32:43 +08:00
Tienson Qin 822001aace Merge branch 'feat/db' into refactor/worker-search 2023-12-22 21:33:53 +08:00
Gabriel Horner d4f438f228 bump nbb-logseq for latest datascript 2023-12-21 13:00:44 -05:00
Tienson Qin 77a8ea13ab Merge branch 'feat/db' into refactor/worker-search 2023-12-21 21:35:41 +08:00
Gabriel Horner 1026e1eb22 fix: add graph name warning to import as well 2023-12-20 12:25:27 -05:00
Tienson Qin cd36c1a0ce Merge branch 'feat/db' into refactor/worker-search 2023-12-20 19:46:10 +08:00
Gabriel Horner 52f7afa18f bump nbb-logseq to latest datascript with another storage delete fix
part of LOG-2974
2023-12-19 13:42:13 -05:00
Gabriel Horner 72f5218b39 dev: add tasks for saving and diffing datoms
part of LOG-2974
2023-12-19 13:19:10 -05:00
Tienson Qin 2811dc7d51 Merge branch 'enhance/write-to-disk' into refactor/worker-search 2023-12-20 01:34:48 +08:00
Gabriel Horner de3d82baba bump to latest nbb-logseq with datascript.storage delete fix 2023-12-18 11:10:59 -05: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
Tienson Qin b8a6f820ad New file based graphs works with opfs db 2023-12-14 02:12:24 +08:00
Gabriel Horner ffa6aaae29 fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be
  used in other electron ns
- remove sqlite-db/connections atom as its not needed
- remove read-graph as its not necessary
- rename cli.persist-graph as its primary purpose has changed
- update effected scripts
2023-12-13 12:06:24 -05:00
Gabriel Horner e228bd1fb6 fix: tweak schema to be valid for new db graphs
Also reuse initialization data
2023-12-12 16:05:06 -05:00
Gabriel Horner ea65a659d6 chore: remove bb task for validating previous sqlite data 2023-12-12 15:44:06 -05:00
Gabriel Horner 0f4cdbbadf bump outdated nbb-logseq and fix lint 2023-12-11 15:55:38 -05:00
Gabriel Horner e0901b9d04 bump nbb-logseq to first version
that works for forked datascript. Deps tests pass locally
without needing to rely on local builds
2023-12-11 13:52:15 -05:00
Gabriel Horner e847c0899a enhance: bring back built-in properties using closed values
Fixes LOG-2903. Also fixed a bug with logseq.color property
not working with latest accent color
2023-12-04 17:29:41 -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 f5e339293f fix: add validation for property types and :schema attributes
Part of LOG-2953. We shouldn't persist unusuable property type
configurations as shown by this bug. By enumerating what schema
attributes are allowed for each type, we can prevent future bugs
like this. When changing between property types, this also cleans up
:classes, :position and :values that were accidentally hanging around
for certain types. Also modify test since we don't allow users
to use a :default property with :cardinality
2023-11-30 16:24:11 -05:00
Gabriel Horner 6517f6f12a Merge branch 'master' into feat/db 2023-11-29 09:56:12 -05:00
Gabriel Horner 548fa98605 enhance: allow CLI and github action to set color accent 2023-11-28 22:32:34 +08: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
ormai 9bdcfcf791 Update italian translation 2023-11-27 08:45:42 -05:00
Gabriel Horner 15642394fc fix: misleading re-index messages show up in db graphs
re-index a graph should only show up for file graphs.
Also moved db.migrate to file-based since it contains re-index
and multiple file graph query assumptions
2023-11-22 17:11:04 -05:00
Gabriel Horner 6f9143df4f chore: add db and file graph linter to CI
This has run successfully locally for weeks. Also fix install doc for
bb tasks
2023-11-17 10:35:01 -05:00
Gabriel Horner d43fb23ef0 enhance: allow CLI and github action to set color accent 2023-11-15 16:37:03 -05:00
Tienson Qin ee3442a44b Merge branch 'master' into feat/db 2023-11-14 20:40:36 +08:00
Gabriel Horner e8b26954a0 fix: property completion for db graphs
Also complete page-tags filter with original case so that resulting query is
case sensitive. As much as possible the query builder should result what
users would type in the editor and users would type case sensitive page
refs. Also update scripts to reflect that property values should be
written as page refs for :date and :page properties
2023-11-06 12:48:12 -05:00
Tienson Qin 90c2b3800f fix: lint warnings 2023-11-06 16:06:29 +08:00
Tienson Qin b91fd4e6c8 Remove old cmdk && command palette 2023-11-06 15:25:35 +08:00
Gabriel Horner 1280f4e05d fix: disable file sync for db graphs 2023-11-02 14:29:05 -04:00
Gabriel Horner 3ccf80fcba add docs for new linter
also fix outliner lint
2023-11-02 09:32:51 -04:00
Gabriel Horner 3700cc37e6 fix: disable filename format config for db graphs
How to persist filenames and handle titles isn't relevant for db graphs.
Also updated lint to add related file-specific nss and concepts
2023-11-01 16:26:48 -04:00
Gabriel Horner e847fce255 add additional db namespaces to linter 2023-11-01 14:23:45 -04:00
Gabriel Horner 54ecf01cd7 add lint for keeping file and db graphs separate
Detected some minor unused code. May run this in CI later.
Writing this script demonstrates more namespaces could be split
up but will wait till at least enum PR lands
2023-11-01 11:28:50 -04:00
Gabriel Horner c88b0a2a4e fix: remove broken built-in enum properties from app and script
It's too complicated for now but hope to bring this back
Part of LOG-2871
2023-10-30 10:43:58 -04:00
Gabriel Horner 5f392a2260 fix: update schema to include new enum value block
Part of LOG-2871.
Also fixed create-graph failing due to renamed ns
2023-10-30 10:43:58 -04:00
Gabriel Horner 2ce35667c5 First pass at a general transact script for db graphs
Moved persist-graph ns into outliner dep so it can be used
by scripts
2023-10-27 17:40:12 -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 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
Gabriel Horner f8fea1d7b0 Add enum to properties test graph
Also test classes with schema script for now
2023-10-13 17:20:37 -04:00
Gabriel Horner 8756600fd7 Add CI job to test creating and validating a db graph
also update older actions
2023-10-13 10:53:01 -04:00
Gabriel Horner fe7a46eac9 Move db malli schema into db dep since it's stable
Also add a validate-db task. Part of LOG-2739
2023-10-11 08:40:26 -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 32e9e6c06d fix: malli db schema for blocks having object
also updated object-page to require tags
2023-10-09 12:24:41 -04:00
Gabriel Horner 3ebcfcd3d2 fix: hidden pages showing up in all pages and probably other places
Also updated schema to reflect new multi-line :default prop vals
implementation
2023-10-09 11:44:03 -04: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
Gabriel Horner 83e9cda446 fix: new properties that didn't have :block/journal?
Some page queries depend on the existence of this attribute including
graph view ones. This was caught by the validation script. After the fix
all pages have this attribute. Creation scripts also updated to use
standard timestamp approach
2023-10-06 12:29:33 -04:00
Gabriel Horner e9c6fee11a Improve db schema with different page types
Also improved group-errors option, addressed some attributes that hadn't
been typed yet and fixes multi-arity attributes
2023-10-05 16:49:33 -04:00
Gabriel Horner 05390f66e9 update db schema since multi-line :default properties have no left or parent 2023-10-04 17:15:53 -04:00
Gabriel Horner a2a7f47057 add group-errors option to validation script
Reduces error noise and helped fix last two bugs.
Also improved schema by making left, parent and format
required for all normal blocks
2023-10-04 16:09:51 -04:00
Gabriel Horner a19806839c fix: blocks shouldn't have journal attributes
only pages should. Found no use for them in db graphs. TBD if they are
needed in file graphs. Part of LOG-2818
2023-10-04 12:59:17 -04:00
Gabriel Horner 4c525814b9 fix: some blocks didn't have timestamps
blocks created using editor-handler/api-insert-new-block! didn't have
timestamps. This includes quick capture and dummy blocks but there were
more cases this bug would occur since this was missing at the
outliner.core level

The dummy block can now be removed from the schema b/c it only existed
because it didn't have timestamps
2023-10-04 11:28:52 -04:00
Gabriel Horner 8541f85389 validation script can now validate multiple graphs
Also improved schema to differentiate between pages and a couple
types of blocks
2023-10-03 17:53:12 -04:00
Gabriel Horner 73b3748bb8 fix: property update causing inconsistent schema
Property :many values should be a set. Fixed one and there is still one
more to fix
2023-09-29 17:04:45 -04:00
Gabriel Horner 9c640fad9a fix: remove invalid attribute for db graphs
added and used verbose option on a graph to find the cause of this error
2023-09-29 14:24:28 -04:00