Commit Graph

70 Commits (14222a546fd008e51564508c9f47432a325c3769)

Author SHA1 Message Date
Tienson Qin 1ec4796eff refactor: replace :block/left with :block/order
Finally no need to worry about parent-left conflicts and broken chain.
With :block/order, we only need to re-compute new orders for siblings
with same order (it can happens if there're bugs in our code, or
updates from rtc), but it doesn't break UI.

Another huge potential benefit after discussing with Zhiyuan is:
Ee might be able to simplify both RTC and undo/redo, currently, we
need to handle each new op for both of them, with recently
refactorings like properties being db attributes, :block/order
is a string instead of a ref, we can handle most property value
conflicts using last-write-wins, and others (e.g. :block/parent,
property with :default type) specifically.

I haven't fixed the issues of using :block/left in RTC and undo/redo,
because we might change both soon.
2024-05-02 01:12:22 +08: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
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 283d084de2 Simplify fn translations in light of #10868
- Reverted overly complex fn translations from #10810
- Updated guidelines so it's clear that fn translations need to remain
simple. They shouldn't be so complex that they fail for edge cases
- Updated catch so we are aware when translations fail
2024-01-18 23:39:37 +08:00
Gabriel Horner 72f5218b39 dev: add tasks for saving and diffing datoms
part of LOG-2974
2023-12-19 13:19:10 -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 f64f1461a3 enhance: make bb dev:db-transact usable for any task
closes LOG-2647. This task was used to update multiple graphs
that were now invalid with the removal of :block/type "object"
2023-11-16 16:40:35 -05:00
Gabriel Horner 3ccf80fcba add docs for new linter
also fix outliner lint
2023-11-02 09:32:51 -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 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 36edf87db3 Move config.edn template to a library
so it can be used outside Electron e.g. when creating graphs from CLI.
Put a symlink in the old templates/config.edn location to make new
location easier to find but it's not needed for anything to work
2023-09-08 13:52:45 -04:00
Gabriel Horner 25c8cfc6ab Address remaining feedback for #9801 and #9757
Also add more explicit translation guidance for reviewers
2023-07-05 11:08:48 -04:00
Gabriel Horner 6b7a76e927 Forgot linebreak in doc section 2023-06-28 15:20:25 -04:00
Gabriel Horner 71fa4cb6f4 Add a relevant description about security practice for resources 2023-06-28 15:11:08 -04:00
Konstantinos Kaloutas 516d98864c fix: typo 2023-06-12 17:05:11 +03:00
Konstantinos Kaloutas 7c17f4d110 update dev practices 2023-06-12 13:05:00 +03:00
Gabriel Horner f5771d293f Update doc missed in #9516 2023-05-30 11:58:41 -04:00
Gabriel Horner 8fca36629f Document repl test workflow as a followup to #9372
Also organized unit test sections more
2023-05-16 14:25:26 -04:00
Gabriel Horner 50ff53ea72 Mention setup required for bb command 2023-04-09 23:13:33 +08:00
Gabriel Horner fef07fe812 Add docs and workflow for dep
Also rename dep to publishing for consistency with existing names
2023-04-09 23:13:33 +08:00
Gabriel Horner 06fa65861f Minor clean up and help with feedback
- basic clj-kondo config and cleanup unused binding
- Add some unit tests
- Add a basic readme
2023-03-28 09:14:42 +08:00
Gabriel Horner b78c689458 Fix remaining todos and add a section to practices about this new action 2023-02-21 12:01:58 -05:00
Gabriel Horner c4d15ec848 Document dev commands and dev tools 2023-02-03 10:58:24 -05:00
Gabriel Horner d58a2a95dc Make optional fns section more readable 2023-01-20 17:28:55 -05:00
Gabriel Horner 0d60dfd953 Make first bb cmd more readable per Bad3r. Close #8394 2023-01-20 17:15:28 -05:00
Gabriel Horner 2a56dc133e Add a section for fn instrumentation and make test section less confusing
Follow up to #8265
2023-01-13 14:36:18 -05:00
Junyi Du 7790c791fa
chore: update dev-practices for E2E dump 2023-01-13 22:25:10 +08:00
Bad3r d8303d055c docs(dev): maintain style 2023-01-12 18:28:53 +08:00
Bad3r 55971f085b docs(dev): update linting to match bb dev:lint
update to match `$ bb dev:lint`
```cljs
(defn lint
  "Run all lint tasks
  - clj-kondo lint
  - carve lint for unused vars
  - lint for vars that are too large
  - lint invalid translation entries"
  []
  (doseq [cmd ["clojure -M:clj-kondo --parallel --lint src --cache false"
               "bb lint:carve"
               "bb lint:large-vars"
               "bb lang:invalid-translations"
               "bb lint:ns-docstrings"]]
    (println cmd)
    (shell cmd)))
```

not sure if we should just add `$ bb dev:lint` since it doesn't seem to be documented anywhere

this update is a pre-req to adding docs for data validation with Malli from https://github.com/logseq/logseq/blob/dev/malli-schema%2526kondo-config/

```sh
bb dev:gen-malli-kondo-config
```

Note that it will also need to be added to `build.yaml`
https://github.com/logseq/logseq/blob/dev/malli-schema%26kondo-config/.github/workflows/build.yml

CC: @RCmerci
2023-01-12 18:28:53 +08:00
Junyi Du cfce689632
chore: upgrade dev-practivce on upgrading electron 2023-01-12 17:26:42 +08:00
Bad3r a2bb85331e fix: do not link to a specific cljfmt version docs
the link https://cljdoc.org/d/cljfmt/ will always load the most up to date documentation of cljfmt. 
It should be used instead of a specific version number
2023-01-04 12:53:41 -05:00
Gabriel Horner 4eec463cbb Tweaks to PR
- Move auto-formatting down as it's not as important as other sections
- Reword to have focus be on auto-formatting and less so on cljfmt
2023-01-04 12:38:40 -05:00
Phoenix Eliot 133028c043 Update per CR feedback 2023-01-04 12:37:27 -05:00
Phoenix Eliot 83a7beea3a Add note about auto-formatting 2023-01-04 12:37:27 -05:00
Junyi Du f45317e569 chore: query performance: enlarge test timeout and add dev doc 2022-12-15 20:37:17 +08:00
Gabriel Horner effaf0f741 Doc e2e debugging workflow available with #7505 2022-11-30 14:42:39 -05:00
Junyi Du 14ee3d0cca
Update e2e practices 2022-11-24 20:17:59 +08:00
Gabriel Horner 2685cd1325 Fix bug with certain plugins and misc cleanup
- Plugins that used effects weren't loading correctly e.g.
  logseq-power-plugin
- Cleaned up translation, docs and some fn naming
2022-10-17 10:31:07 -04:00
Gabriel Horner 784ad7cce3 Add unit tests for create-if-not-exists and misc test improvements
- Added unit test as it is used by several handlers
- Fixed test suite failing from last commit now that a test fs is used
- Fixed test stat implementation
- Extracted out Plugin schema to make usage of it less impl dependent
- Made test.helper alias consistent
- Made async testing consistent for export-test
2022-10-17 10:13:27 -04:00
Gabriel Horner c8cda90373 Fix plugin install bugs and add plugin-config tests
- Add validation for plugins.edn with malli
- Add bb task using malli schema
- Add first async test that interacts with frontend.fs
- Add test helpers to make future async testing easier
2022-10-17 10:13:27 -04:00
Gabriel Horner 1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Gabriel Horner a368cab5e4 Add ns linter to deps libs and then add+update ns docstrings 2022-09-21 10:17:15 +08:00
Konstantinos Kaloutas fc7141518d feat: accessibility guidelines 2022-08-26 11:52:23 +08:00
Gabriel Horner f26681c2ee Skip intermittent failing test and add more testing advice 2022-07-25 14:17:46 -04:00
Gabriel Horner 981b1ad69e Fix autorun tests doc, close #5967 2022-07-19 21:04:02 -04:00
Gabriel Horner f39f26c8d3 Improve and update lint documentation 2022-07-07 09:34:08 -04:00
Gabriel Horner ee9f390761 Localize bb-tasks for deps
Deps need to be independent to not introduce testing bugs.
These bb tasks are good candidates to move into bb-tasks gitlib
2022-06-10 15:39:11 +08:00