mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
refactor: plugin libs (#12395)
This pull request refactors the plugin library infrastructure and adds new experimental features for hosted/sidebar renderers. The main changes include: Purpose: Refactor plugin communication library (Postmate) to support MessageChannel for improved performance, add support for hosted/sidebar renderers in plugins, add new debug APIs, and consolidate helper functions. Changes: Added MessageChannel support to Postmate for optimized plugin-host communication with backward compatibility Introduced hosted renderer and sidebar renderer APIs for plugins to register custom UI components Added new app APIs: get_current_route, export_debug_log_db, reset_debug_log_db Refactored helper functions from helpers.ts to common.ts and updated all import paths Extended block property APIs to include class properties with default values Added comprehensive documentation for experiments APIs and plugin development Added E2E test for plugin marketplace installation Version bump from 0.2.12 to 0.3.1
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
[logseq.e2e.multi-tabs-basic-test]
|
||||
[logseq.e2e.outliner-basic-test]
|
||||
[logseq.e2e.plugins-basic-test]
|
||||
[logseq.e2e.plugins-marketplace-test]
|
||||
[logseq.e2e.property-basic-test]
|
||||
[logseq.e2e.property-scoped-choices-test]
|
||||
[logseq.e2e.reference-basic-test]
|
||||
@@ -89,6 +90,11 @@
|
||||
(->> (future (run-tests 'logseq.e2e.plugins-basic-test))
|
||||
(swap! *futures assoc :plugins-test)))
|
||||
|
||||
(defn run-plugins-marketplace-test
|
||||
[]
|
||||
(->> (future (run-tests 'logseq.e2e.plugins-marketplace-test))
|
||||
(swap! *futures assoc :plugins-marketplace-test)))
|
||||
|
||||
(defn run-rtc-extra-test
|
||||
[]
|
||||
(->> (future (run-tests 'logseq.e2e.rtc-extra-test))
|
||||
@@ -131,38 +137,38 @@
|
||||
(defn start
|
||||
[]
|
||||
(future
|
||||
(fixtures/open-page
|
||||
repl/pause
|
||||
{:headless false})))
|
||||
(fixtures/open-page
|
||||
repl/pause
|
||||
{:headless false})))
|
||||
|
||||
(comment
|
||||
|
||||
;; You can call or put `(repl/pause)` in any test to pause the tests,
|
||||
;; this allows us to continue experimenting with the current page.
|
||||
(repl/pause)
|
||||
;; You can call or put `(repl/pause)` in any test to pause the tests,
|
||||
;; this allows us to continue experimenting with the current page.
|
||||
(repl/pause)
|
||||
|
||||
;; To resume the tests, close the page/context/browser
|
||||
(repl/resume)
|
||||
;; To resume the tests, close the page/context/browser
|
||||
(repl/resume)
|
||||
|
||||
;; Run specific test
|
||||
(future (run-test logseq.e2e.commands-test/new-property-test))
|
||||
;; Run specific test
|
||||
(future (run-test logseq.e2e.commands-test/new-property-test))
|
||||
|
||||
;; after the test has been paused, you can do anything with the current page like this
|
||||
(repl/with-page
|
||||
(w/wait-for (first (util/get-edit-block-container))
|
||||
{:state :detached}))
|
||||
;; after the test has been paused, you can do anything with the current page like this
|
||||
(repl/with-page
|
||||
(w/wait-for (first (util/get-edit-block-container))
|
||||
{:state :detached}))
|
||||
|
||||
(run-tests 'logseq.e2e.commands-basic-test
|
||||
'logseq.e2e.multi-tabs-basic-test
|
||||
'logseq.e2e.outliner-basic-test
|
||||
'logseq.e2e.rtc-basic-test)
|
||||
(run-tests 'logseq.e2e.commands-basic-test
|
||||
'logseq.e2e.multi-tabs-basic-test
|
||||
'logseq.e2e.outliner-basic-test
|
||||
'logseq.e2e.rtc-basic-test)
|
||||
|
||||
(do
|
||||
(reset! config/*headless true)
|
||||
(reset! config/*slow-mo 10)
|
||||
(run-tests 'logseq.e2e.reference-basic-test)
|
||||
(dotimes [i 10]
|
||||
(run-tests 'logseq.e2e.reference-basic-test)))
|
||||
(do
|
||||
(reset! config/*headless true)
|
||||
(reset! config/*slow-mo 10)
|
||||
(run-tests 'logseq.e2e.reference-basic-test)
|
||||
(dotimes [i 10]
|
||||
(run-tests 'logseq.e2e.reference-basic-test)))
|
||||
|
||||
;;
|
||||
)
|
||||
;;
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user