Sfoglia il codice sorgente

fix: remove whiteboards and tldraw from rest of codebase

Also remove some old excalidraw refs that should've been removed awhile
back
Gabriel Horner 3 giorni fa
parent
commit
b906e7181c
44 ha cambiato i file con 114 aggiunte e 293 eliminazioni
  1. 0 1
      .gitignore
  2. 0 1
      .projectile
  3. 0 1
      CODEBASE_OVERVIEW.md
  4. 0 2
      README.md
  5. 0 5
      deps/common/resources/templates/config.edn
  6. 2 7
      deps/common/src/logseq/common/config.cljs
  7. 0 2
      deps/db/src/logseq/db.cljs
  8. 1 0
      deps/db/src/logseq/db/frontend/class.cljs
  9. 1 1
      deps/db/src/logseq/db/frontend/db.cljs
  10. 1 8
      deps/db/src/logseq/db/frontend/entity_util.cljs
  11. 12 1
      deps/db/src/logseq/db/frontend/malli_schema.cljs
  12. 4 6
      deps/db/src/logseq/db/frontend/property.cljs
  13. 1 2
      deps/graph-parser/src/logseq/graph_parser/block.cljs
  14. 1 6
      deps/graph-parser/src/logseq/graph_parser/mldoc.cljc
  15. 4 8
      deps/outliner/src/logseq/outliner/page.cljs
  16. 4 6
      deps/outliner/src/logseq/outliner/tree.cljs
  17. 0 4
      docs/contributing-to-translations.md
  18. 13 17
      scripts/src/logseq/tasks/lang.clj
  19. 1 4
      src/main/electron/listener.cljs
  20. 0 3
      src/main/frontend/components/block.cljs
  21. 3 23
      src/main/frontend/components/content.cljs
  22. 29 29
      src/main/frontend/components/export.cljs
  23. 1 3
      src/main/frontend/components/file.cljs
  24. 0 2
      src/main/frontend/components/icon.cljs
  25. 2 4
      src/main/frontend/components/page_menu.cljs
  26. 1 1
      src/main/frontend/components/property/value.cljs
  27. 0 1
      src/main/frontend/components/shortcut.cljs
  28. 1 2
      src/main/frontend/db.cljs
  29. 0 8
      src/main/frontend/db/model.cljs
  30. 2 1
      src/main/frontend/handler/assets.cljs
  31. 1 1
      src/main/frontend/handler/common/page.cljs
  32. 1 10
      src/main/frontend/handler/events.cljs
  33. 0 22
      src/main/frontend/handler/paste.cljs
  34. 1 7
      src/main/frontend/handler/property/util.cljs
  35. 0 2
      src/main/frontend/handler/route.cljs
  36. 2 2
      src/main/frontend/mixins.cljs
  37. 9 12
      src/main/frontend/page.cljs
  38. 0 1
      src/main/frontend/schema/handler/common_config.cljc
  39. 0 2
      src/main/frontend/state.cljs
  40. 1 2
      src/main/frontend/worker/db_worker.cljs
  41. 0 1
      src/main/frontend/worker/handler/page.cljs
  42. 1 1
      src/main/frontend/worker/pipeline.cljs
  43. 14 42
      src/main/frontend/worker/rtc/remote_update.cljs
  44. 0 29
      src/test/frontend/handler/paste_test.cljs

+ 0 - 1
.gitignore

@@ -52,7 +52,6 @@ ios/App/App/public
 
 
 startup.png
 startup.png
 
 
-/src/main/frontend/tldraw-logseq.js
 /src/test/docs*
 /src/test/docs*
 ~*~
 ~*~
 
 

+ 0 - 1
.projectile

@@ -12,7 +12,6 @@
 -/resources/static/js/mhchem.min.js
 -/resources/static/js/mhchem.min.js
 -/resources/static/js/mldoc.min.js
 -/resources/static/js/mldoc.min.js
 -/resources/static/js/sci.min.js
 -/resources/static/js/sci.min.js
--/resources/static/js/excalidraw.min.js
 -/resources/static/js/react-force-graph.min.js
 -/resources/static/js/react-force-graph.min.js
 -/resources/js/lsplugin.user.js
 -/resources/js/lsplugin.user.js
 -/resources/js/pdf_viewer2.js
 -/resources/js/pdf_viewer2.js

+ 0 - 1
CODEBASE_OVERVIEW.md

@@ -60,7 +60,6 @@ This is overview of this repository's most important directories and files.
 
 
 - `packages/` contains JavaScript dependencies used by the frontend
 - `packages/` contains JavaScript dependencies used by the frontend
   - `packages/ui/` - The frontend's component system based on shadcn
   - `packages/ui/` - The frontend's component system based on shadcn
-  - `packags/tldraw/` - Custom fork of tldraw which powers whiteboards
 - `scripts` - Dev scripts
 - `scripts` - Dev scripts
 - `clj-e2e/` - end to end clj frontend tests
 - `clj-e2e/` - end to end clj frontend tests
 - `android/` -  Android app
 - `android/` -  Android app

+ 0 - 2
README.md

@@ -83,8 +83,6 @@ To get started with the DB version:
 
 
 [Logseq](https://logseq.com) is a **knowledge management** and **collaboration** platform. It focuses on **privacy**, **longevity**, and [**user control**](https://www.gnu.org/philosophy/free-sw.en.html). Logseq offers a range of **powerful tools** for **knowledge management**, **collaboration**, **PDF annotation**, and **task management** with support for multiple file formats, including **Markdown** and **Org-mode**, and **various features** for organizing and structuring your notes.
 [Logseq](https://logseq.com) is a **knowledge management** and **collaboration** platform. It focuses on **privacy**, **longevity**, and [**user control**](https://www.gnu.org/philosophy/free-sw.en.html). Logseq offers a range of **powerful tools** for **knowledge management**, **collaboration**, **PDF annotation**, and **task management** with support for multiple file formats, including **Markdown** and **Org-mode**, and **various features** for organizing and structuring your notes.
 
 
-Logseq's **Whiteboard** feature lets you organize your knowledge and ideas using a spatial **canvas** with **shapes**, **drawings**, **website embeds**, and **connectors**. You can **visually group** and **link** your **notes** and external media (such as **videos** and **images**), enabling visual thinkers to compose, remix, **annotate**, and connect content from their knowledge base and emerging thoughts in a new way.
-
 In addition to its core features, Logseq has a growing ecosystem of **plugins** and **themes** that enable a wide range of workflows and **customization** options. **Mobile apps** are also available, providing access to most of the features of the desktop application. Whether you're a student, a professional, or anyone who values a clear and organized approach to managing your ideas and notes, Logseq is an excellent choice for anyone looking to improve their productivity and streamline their workflow.
 In addition to its core features, Logseq has a growing ecosystem of **plugins** and **themes** that enable a wide range of workflows and **customization** options. **Mobile apps** are also available, providing access to most of the features of the desktop application. Whether you're a student, a professional, or anyone who values a clear and organized approach to managing your ideas and notes, Logseq is an excellent choice for anyone looking to improve their productivity and streamline their workflow.
 
 
 ![logseq-demo](https://user-images.githubusercontent.com/25513724/221387376-4dc419c2-0d0a-460c-a920-2d211e78b456.gif)
 ![logseq-demo](https://user-images.githubusercontent.com/25513724/221387376-4dc419c2-0d0a-460c-a920-2d211e78b456.gif)

+ 0 - 5
deps/common/resources/templates/config.edn

@@ -1,7 +1,6 @@
 {:meta/version 1
 {:meta/version 1
 
 
  ;; Hide empty block properties
  ;; Hide empty block properties
- ;; This is _only_ for DB graphs.
  ;; Default value: false
  ;; Default value: false
  ;; :ui/hide-empty-properties? false
  ;; :ui/hide-empty-properties? false
 
 
@@ -34,10 +33,6 @@
  ;; Default value: true
  ;; Default value: true
  ;; :feature/enable-flashcards? true
  ;; :feature/enable-flashcards? true
 
 
- ;; Enable whiteboards.
- ;; Default value: true
- ;; :feature/enable-whiteboards? true
-
  ;; Disable the journal's built-in 'Scheduled tasks and deadlines' query.
  ;; Disable the journal's built-in 'Scheduled tasks and deadlines' query.
  ;; Default value: false
  ;; Default value: false
  ;; :feature/disable-scheduled-and-deadline-query? false
  ;; :feature/disable-scheduled-and-deadline-query? false

+ 2 - 7
deps/common/src/logseq/common/config.cljs

@@ -66,12 +66,6 @@
         (string/replace-first asset-protocol "file://"))
         (string/replace-first asset-protocol "file://"))
     s))
     s))
 
 
-(defonce default-draw-directory "draws")
-
-(defn draw?
-  [path]
-  (string/starts-with? path default-draw-directory))
-
 (defn text-formats
 (defn text-formats
   []
   []
   #{:json :org :md :yml :dat :asciidoc :rst :txt :markdown :adoc :html :js :ts :edn :clj :ml :rb :ex :erl :java :php :c :css
   #{:json :org :md :yml :dat :asciidoc :rst :txt :markdown :adoc :html :js :ts :edn :clj :ml :rb :ex :erl :java :php :c :css
@@ -103,7 +97,8 @@
      :property-pages/excludelist
      :property-pages/excludelist
      :srs/learning-fraction
      :srs/learning-fraction
      :srs/initial-interval
      :srs/initial-interval
-     :whiteboards-directory]
+     :whiteboards-directory
+     :feature/enable-whiteboards?]
     (repeat "is not used in DB graphs"))
     (repeat "is not used in DB graphs"))
    {:preferred-format
    {:preferred-format
     "is not used in DB graphs as there is only markdown mode."
     "is not used in DB graphs as there is only markdown mode."

+ 0 - 2
deps/db/src/logseq/db.cljs

@@ -206,7 +206,6 @@
 (def class? entity-util/class?)
 (def class? entity-util/class?)
 (def property? entity-util/property?)
 (def property? entity-util/property?)
 (def closed-value? entity-util/closed-value?)
 (def closed-value? entity-util/closed-value?)
-(def whiteboard? entity-util/whiteboard?)
 (def journal? entity-util/journal?)
 (def journal? entity-util/journal?)
 (def hidden? entity-util/hidden?)
 (def hidden? entity-util/hidden?)
 (def object? entity-util/object?)
 (def object? entity-util/object?)
@@ -411,7 +410,6 @@
                                     (= 1 (count children))
                                     (= 1 (count children))
                                     (contains? #{"" "-" "*"} (string/trim (:block/title first-child))))))
                                     (contains? #{"" "-" "*"} (string/trim (:block/title first-child))))))
                                 (not (contains? built-in-pages name'))
                                 (not (contains? built-in-pages name'))
-                                (not (whiteboard? page))
                                 (not (property? page))
                                 (not (property? page))
                                  ;; a/b/c might be deleted but a/b/c/d still exists (for backward compatibility)
                                  ;; a/b/c might be deleted but a/b/c/d still exists (for backward compatibility)
                                 (not (and (string/includes? name' "/")
                                 (not (and (string/includes? name' "/")

+ 1 - 0
deps/db/src/logseq/db/frontend/class.cljs

@@ -32,6 +32,7 @@
       :properties {:logseq.property.class/extends :logseq.class/Page
       :properties {:logseq.property.class/extends :logseq.class/Page
                    :logseq.property.journal/title-format "MMM do, yyyy"}}
                    :logseq.property.journal/title-format "MMM do, yyyy"}}
 
 
+     ;; TODO: Remove deprecated
      :logseq.class/Whiteboard
      :logseq.class/Whiteboard
      {:title "Whiteboard"
      {:title "Whiteboard"
       :properties {:logseq.property.class/extends :logseq.class/Page}}
       :properties {:logseq.property.class/extends :logseq.class/Page}}

+ 1 - 1
deps/db/src/logseq/db/frontend/db.cljs

@@ -29,7 +29,7 @@
         (or (entity-util/class? page) (entity-util/internal-page? page))
         (or (entity-util/class? page) (entity-util/internal-page? page))
         false
         false
         ;; Default to true for closed value and future internal types.
         ;; Default to true for closed value and future internal types.
-        ;; Other types like whiteboard are not considered because they aren't built-in
+        ;; Other types are not considered because they aren't built-in
         :else
         :else
         true))
         true))
 
 

+ 1 - 8
deps/db/src/logseq/db/frontend/entity_util.cljs

@@ -33,11 +33,6 @@
   [entity]
   [entity]
   (has-tag? entity :logseq.class/Property))
   (has-tag? entity :logseq.class/Property))
 
 
-(defn whiteboard?
-  "Given a page entity or map, check if it is a whiteboard page"
-  [entity]
-  (has-tag? entity :logseq.class/Whiteboard))
-
 (defn closed-value?
 (defn closed-value?
   [entity]
   [entity]
   (some? (:block/closed-value-property entity)))
   (some? (:block/closed-value-property entity)))
@@ -52,8 +47,7 @@
   (or (internal-page? entity)
   (or (internal-page? entity)
       (journal? entity)
       (journal? entity)
       (class? entity)
       (class? entity)
-      (property? entity)
-      (whiteboard? entity)))
+      (property? entity)))
 
 
 (defn asset?
 (defn asset?
   "Given an entity or map, check if it is an asset block"
   "Given an entity or map, check if it is an asset block"
@@ -80,7 +74,6 @@
   (let [ident->type {:logseq.class/Tag :class
   (let [ident->type {:logseq.class/Tag :class
                      :logseq.class/Property :property
                      :logseq.class/Property :property
                      :logseq.class/Journal :journal
                      :logseq.class/Journal :journal
-                     :logseq.class/Whiteboard :whiteboard
                      :logseq.class/Page :page}]
                      :logseq.class/Page :page}]
     (set (map #(ident->type (:db/ident %)) (:block/tags entity)))))
     (set (map #(ident->type (:db/ident %)) (:block/tags entity)))))
 
 

+ 12 - 1
deps/db/src/logseq/db/frontend/malli_schema.cljs

@@ -3,6 +3,7 @@
   (:require [clojure.set :as set]
   (:require [clojure.set :as set]
             [clojure.string :as string]
             [clojure.string :as string]
             [datascript.core :as d]
             [datascript.core :as d]
+            [datascript.impl.entity :as de]
             [logseq.db.common.entity-plus :as entity-plus]
             [logseq.db.common.entity-plus :as entity-plus]
             [logseq.db.common.order :as db-order]
             [logseq.db.common.order :as db-order]
             [logseq.db.frontend.class :as db-class]
             [logseq.db.frontend.class :as db-class]
@@ -408,6 +409,7 @@
    [:block/link {:optional true} :int]
    [:block/link {:optional true} :int]
    [:logseq.property/created-from-property {:optional true} :int]])
    [:logseq.property/created-from-property {:optional true} :int]])
 
 
+;; TODO: Remove deprecated
 (def whiteboard-block
 (def whiteboard-block
   "A (shape) block for whiteboard"
   "A (shape) block for whiteboard"
   (vec
   (vec
@@ -526,6 +528,14 @@
    [:block/created-at {:optional true} :int]
    [:block/created-at {:optional true} :int]
    [:block/updated-at {:optional true} :int]])
    [:block/updated-at {:optional true} :int]])
 
 
+(defn- whiteboard?
+  [entity]
+  (when (or (map? entity) (de/entity? entity))
+    (some (fn [t]
+            (or (keyword-identical? (:db/ident t) :logseq.class/Whiteboard)
+                (keyword-identical? t :logseq.class/Whiteboard)))
+          (:block/tags entity))))
+
 (defn entity-dispatch-key [db ent]
 (defn entity-dispatch-key [db ent]
   (let [d (if (:block/uuid ent) (d/entity db [:block/uuid (:block/uuid ent)]) ent)
   (let [d (if (:block/uuid ent) (d/entity db [:block/uuid (:block/uuid ent)]) ent)
         ;; order matters as some block types are a subset of others e.g. :whiteboard
         ;; order matters as some block types are a subset of others e.g. :whiteboard
@@ -536,7 +546,8 @@
                        :class
                        :class
                        (entity-util/hidden? d)
                        (entity-util/hidden? d)
                        :hidden
                        :hidden
-                       (entity-util/whiteboard? d)
+                       ;; TODO: Remove deprecated
+                       (whiteboard? d)
                        :normal-page
                        :normal-page
                        (entity-util/page? d)
                        (entity-util/page? d)
                        :normal-page
                        :normal-page

+ 4 - 6
deps/db/src/logseq/db/frontend/property.cljs

@@ -219,7 +219,7 @@
      :logseq.property/asset   {:title "Asset"
      :logseq.property/asset   {:title "Asset"
                                :schema {:type :entity
                                :schema {:type :entity
                                         :hide? true}}
                                         :hide? true}}
-     ;; used by pdf and whiteboard
+     ;; used by pdf
      ;; TODO: remove ls-type
      ;; TODO: remove ls-type
      :logseq.property/ls-type {:schema {:type :keyword
      :logseq.property/ls-type {:schema {:type :keyword
                                         :hide? true}}
                                         :hide? true}}
@@ -258,9 +258,11 @@
                                                   :schema {:type :node
                                                   :schema {:type :node
                                                            :cardinality :many
                                                            :cardinality :many
                                                            :hide? true}}
                                                            :hide? true}}
+     ;; TODO: Remove deprecated
      :logseq.property.tldraw/page {:title "Tldraw Page"
      :logseq.property.tldraw/page {:title "Tldraw Page"
                                    :schema {:type :map
                                    :schema {:type :map
                                             :hide? true}}
                                             :hide? true}}
+     ;; TODO: Remove deprecated
      :logseq.property.tldraw/shape {:title "Tldraw Shape"
      :logseq.property.tldraw/shape {:title "Tldraw Shape"
                                     :schema {:type :map
                                     :schema {:type :map
                                              :hide? true}}
                                              :hide? true}}
@@ -882,8 +884,4 @@
   [db block db-ident]
   [db block db-ident]
   (when db
   (when db
     (let [block (or (d/entity db (:db/id block)) block)]
     (let [block (or (d/entity db (:db/id block)) block)]
-      (lookup block db-ident))))
-
-(defn shape-block?
-  [db block]
-  (= :whiteboard-shape (get-block-property-value db block :logseq.property/ls-type)))
+      (lookup block db-ident))))

+ 1 - 2
deps/graph-parser/src/logseq/graph_parser/block.cljs

@@ -53,8 +53,7 @@
                   (and
                   (and
                    (= url-type "Page_ref")
                    (= url-type "Page_ref")
                    (and (string? value)
                    (and (string? value)
-                        (not (or (common-config/local-relative-asset? value)
-                                 (common-config/draw? value))))
+                        (not (common-config/local-relative-asset? value)))
                    value)
                    value)
 
 
                   (and
                   (and

+ 1 - 6
deps/graph-parser/src/logseq/graph_parser/mldoc.cljc

@@ -194,12 +194,7 @@
           (not (contains? #{"Page_ref" "Block_ref"} ref-type))
           (not (contains? #{"Page_ref" "Block_ref"} ref-type))
 
 
           (and (contains? #{"Page_ref"} ref-type)
           (and (contains? #{"Page_ref"} ref-type)
-               (or
-                ;; 2. excalidraw link
-                (common-config/draw? ref-value)
-
-                ;; 3. local asset link
-                (boolean (common-config/local-relative-asset? ref-value))))))))
+               (boolean (common-config/local-relative-asset? ref-value)))))))
 
 
 (defn mldoc-link?
 (defn mldoc-link?
   "Check whether s is a link (including page/block refs)."
   "Check whether s is a link (including page/block refs)."

+ 4 - 8
deps/outliner/src/logseq/outliner/page.cljs

@@ -86,11 +86,9 @@
                              (assoc :real-outliner-op :rename-page)))
                              (assoc :real-outliner-op :rename-page)))
             true))))))
             true))))))
 
 
-(defn- build-page-tx [db properties page {:keys [whiteboard? class? tags class-ident-namespace]}]
+(defn- build-page-tx [db properties page {:keys [class? tags class-ident-namespace]}]
   (when (:block/uuid page)
   (when (:block/uuid page)
-    (let [type-tag (cond class? :logseq.class/Tag
-                         whiteboard? :logseq.class/Whiteboard
-                         :else :logseq.class/Page)
+    (let [type-tag (if class? :logseq.class/Tag :logseq.class/Page)
           tags' (if (:block/journal-day page) tags (conj tags type-tag))
           tags' (if (:block/journal-day page) tags (conj tags type-tag))
           page' (update page :block/tags
           page' (update page :block/tags
                         (fnil into [])
                         (fnil into [])
@@ -237,7 +235,7 @@
   "Pure function without side effects"
   "Pure function without side effects"
   [db title*
   [db title*
    {uuid' :uuid
    {uuid' :uuid
-    :keys [tags properties persist-op? whiteboard?
+    :keys [tags properties persist-op?
            class? today-journal? split-namespace? class-ident-namespace]
            class? today-journal? split-namespace? class-ident-namespace]
     :or   {properties               nil
     :or   {properties               nil
            persist-op?              true}
            persist-op?              true}
@@ -251,8 +249,6 @@
         title (sanitize-title title*)
         title (sanitize-title title*)
         types (cond class?
         types (cond class?
                     #{:logseq.class/Tag}
                     #{:logseq.class/Tag}
-                    whiteboard?
-                    #{:logseq.class/Whiteboard}
                     today-journal?
                     today-journal?
                     #{:logseq.class/Journal}
                     #{:logseq.class/Journal}
                     (seq tags)
                     (seq tags)
@@ -306,7 +302,7 @@
               (outliner-validate/validate-page-title-characters (str (:block/title parent)) {:node parent})))
               (outliner-validate/validate-page-title-characters (str (:block/title parent)) {:node parent})))
 
 
           (let [page-uuid (:block/uuid page)
           (let [page-uuid (:block/uuid page)
-                page-txs (build-page-tx db properties page (select-keys options [:whiteboard? :class? :tags :class-ident-namespace]))
+                page-txs (build-page-tx db properties page (select-keys options [:class? :tags :class-ident-namespace]))
                 txs (concat
                 txs (concat
                      ;; transact doesn't support entities
                      ;; transact doesn't support entities
                      (remove de/entity? parents')
                      (remove de/entity? parents')

+ 4 - 6
deps/outliner/src/logseq/outliner/tree.cljs

@@ -2,18 +2,16 @@
   "Provides tree fns and INode protocol"
   "Provides tree fns and INode protocol"
   (:require [datascript.core :as d]
   (:require [datascript.core :as d]
             [datascript.impl.entity :as de]
             [datascript.impl.entity :as de]
-            [logseq.db :as ldb]
-            [logseq.db.frontend.property :as db-property]))
+            [logseq.db :as ldb]))
 
 
 (defprotocol INode
 (defprotocol INode
   (-save [this *txs-state conn opts])
   (-save [this *txs-state conn opts])
   (-del [this *txs-state db]))
   (-del [this *txs-state db]))
 
 
 (defn- blocks->vec-tree-aux
 (defn- blocks->vec-tree-aux
-  [db blocks root]
+  [blocks root]
   (let [root-id (:db/id root)
   (let [root-id (:db/id root)
-        blocks (remove #(db-property/shape-block? db %) blocks)
-        parent-blocks (group-by #(get-in % [:block/parent :db/id]) blocks) ;; exclude whiteboard shapes
+        parent-blocks (group-by #(get-in % [:block/parent :db/id]) blocks)
         sort-fn (fn [parent]
         sort-fn (fn [parent]
                   (when-let [children (get parent-blocks parent)]
                   (when-let [children (get parent-blocks parent)]
                     (ldb/sort-by-order children)))
                     (ldb/sort-by-order children)))
@@ -60,7 +58,7 @@
         [page? root] (get-root-and-page db root-id)]
         [page? root] (get-root-and-page db root-id)]
     (if-not root ; custom query
     (if-not root ; custom query
       blocks
       blocks
-      (let [result (blocks->vec-tree-aux db blocks root)]
+      (let [result (blocks->vec-tree-aux blocks root)]
         (if (and page? (not (:link option)))
         (if (and page? (not (:link option)))
           result
           result
           ;; include root block
           ;; include root block

+ 0 - 4
docs/contributing-to-translations.md

@@ -59,8 +59,6 @@ $ bb lang:missing es
 |                      :translation-key |                                  :string-to-translate |         :file |
 |                      :translation-key |                                  :string-to-translate |         :file |
 |---------------------------------------+-------------------------------------------------------+---------------|
 |---------------------------------------+-------------------------------------------------------+---------------|
 |    :command.editor/toggle-number-list |                                    Toggle number list | dicts/es.edn  |
 |    :command.editor/toggle-number-list |                                    Toggle number list | dicts/es.edn  |
-|     :command.whiteboard/bring-forward |                                          Move forward | dicts/es.edn  |
-|    :command.whiteboard/bring-to-front |                                         Move to front | dicts/es.edn  |
 ...
 ...
 ```
 ```
 
 
@@ -73,8 +71,6 @@ $ bb lang:missing es --copy
 
 
 ;; For dicts/es.edn
 ;; For dicts/es.edn
 :command.editor/toggle-number-list "Toggle number list"
 :command.editor/toggle-number-list "Toggle number list"
-:command.whiteboard/bring-forward "Move forward"
-:command.whiteboard/bring-to-front "Move to front"
 ...
 ...
 ```
 ```
 
 

+ 13 - 17
scripts/src/logseq/tasks/lang.clj

@@ -184,31 +184,27 @@
   "Allows certain keys in a language to have the same translation
   "Allows certain keys in a language to have the same translation
    as English. Happens more in romance languages but pretty rare otherwise"
    as English. Happens more in romance languages but pretty rare otherwise"
   {:fr #{:port :type :help/docs :search-item/page :shortcut.category/navigating :text/image
   {:fr #{:port :type :help/docs :search-item/page :shortcut.category/navigating :text/image
-         :settings-of-plugins :code :shortcut.category/plugins :whiteboard/rectangle :whiteboard/triangle}
-   :de #{:graph :host :plugins :port :right-side-bar/whiteboards
+         :settings-of-plugins :code :shortcut.category/plugins}
+   :de #{:graph :host :plugins :port
          :settings-of-plugins :shortcut.category/navigating
          :settings-of-plugins :shortcut.category/navigating
-         :settings-page/enable-tooltip :settings-page/enable-whiteboards :settings-page/plugin-system}
-   :ca #{:port :settings-page/tab-editor :settings-page/tab-general
-         :whiteboard/color :whiteboard/connector :whiteboard/text :whiteboard/triangle}
-   :es #{:settings-page/tab-general :settings-page/tab-editor :whiteboard/color}
+         :settings-page/enable-tooltip :settings-page/plugin-system}
+   :ca #{:port :settings-page/tab-editor :settings-page/tab-general}
+   :es #{:settings-page/tab-general :settings-page/tab-editor}
    :it #{:home :handbook/home :host :help/awesome-logseq
    :it #{:home :handbook/home :host :help/awesome-logseq
-         :settings-page/tab-account :settings-page/tab-editor :whiteboard/link}
+         :settings-page/tab-account :settings-page/tab-editor}
    :nl #{:plugins :type :left-side-bar/nav-recent-pages :plugin/update}
    :nl #{:plugins :type :left-side-bar/nav-recent-pages :plugin/update}
-   :pl #{:port :home :host :plugin/marketplace :whiteboard/link}
+   :pl #{:port :home :host :plugin/marketplace}
    :pt-BR #{:plugins :right-side-bar/flashcards :settings-page/enable-flashcards :page/backlinks
    :pt-BR #{:plugins :right-side-bar/flashcards :settings-page/enable-flashcards :page/backlinks
-            :host :settings-page/tab-editor :shortcut.category/plugins :whiteboard/link :settings-of-plugins :whiteboard
-            :whiteboards :on-boarding/quick-tour-journal-page-desc-2 :plugin/downloads :plugin/popular
-            :right-side-bar/whiteboards :settings-page/enable-whiteboards :settings-page/plugin-system
-            :shortcut.category/whiteboard :command.whiteboard/zoom-in :command.whiteboard/zoom-out}
+            :host :settings-page/tab-editor :shortcut.category/plugins :settings-of-plugins
+            :on-boarding/quick-tour-journal-page-desc-2 :plugin/downloads :plugin/popular
+            :settings-page/plugin-system}
    :pt-PT #{:plugins :settings-of-plugins :plugin/downloads :right-side-bar/flashcards
    :pt-PT #{:plugins :settings-of-plugins :plugin/downloads :right-side-bar/flashcards
             :settings-page/enable-flashcards :settings-page/plugin-system}
             :settings-page/enable-flashcards :settings-page/plugin-system}
-   :nb-NO #{:port :type :whiteboard :right-side-bar/flashcards :right-side-bar/whiteboards
-            :settings-page/enable-flashcards :settings-page/enable-whiteboards
-            :settings-page/tab-editor :shortcut.category/whiteboard :whiteboard/medium
-            :whiteboard/twitter-url :whiteboard/youtube-url :linked-references/filter-heading}
+   :nb-NO #{:port :type :right-side-bar/flashcards :settings-page/enable-flashcards
+            :settings-page/tab-editor :linked-references/filter-heading}
    :tr #{:help/awesome-logseq}
    :tr #{:help/awesome-logseq}
    :id #{:host :port}
    :id #{:host :port}
-   :cs #{:host :port :help/blog :settings-page/tab-editor :whiteboard/text}})
+   :cs #{:host :port :help/blog :settings-page/tab-editor}})
 
 
 (defn- validate-languages-dont-have-duplicates
 (defn- validate-languages-dont-have-duplicates
   "Looks up duplicates for all languages"
   "Looks up duplicates for all languages"

+ 1 - 4
src/main/electron/listener.cljs

@@ -8,7 +8,6 @@
             [frontend.db :as db]
             [frontend.db :as db]
             [frontend.db.async :as db-async]
             [frontend.db.async :as db-async]
             [frontend.handler.notification :as notification]
             [frontend.handler.notification :as notification]
-            [frontend.handler.property.util :as pu]
             [frontend.handler.route :as route-handler]
             [frontend.handler.route :as route-handler]
             [frontend.handler.search :as search-handler]
             [frontend.handler.search :as search-handler]
             [frontend.handler.ui :as ui-handler]
             [frontend.handler.ui :as ui-handler]
@@ -67,9 +66,7 @@
                        block-id
                        block-id
                        (p/let [block (db-async/<get-block (state/get-current-repo) block-id {:children? false})]
                        (p/let [block (db-async/<get-block (state/get-current-repo) block-id {:children? false})]
                          (if block
                          (if block
-                           (if (pu/shape-block? block)
-                             (route-handler/redirect-to-page! (get-in block [:block/page :block/uuid]) {:block-id block-id})
-                             (route-handler/redirect-to-page! block-id))
+                           (route-handler/redirect-to-page! block-id)
                            (notification/show! (str "Open link failed. Block-id `" block-id "` doesn't exist in the graph.") :error false)))))))
                            (notification/show! (str "Open link failed. Block-id `" block-id "` doesn't exist in the graph.") :error false)))))))
 
 
   (safe-api-call "foundInPage"
   (safe-api-call "foundInPage"

+ 0 - 3
src/main/frontend/components/block.cljs

@@ -1655,9 +1655,6 @@
 (defn- bullet-on-click
 (defn- bullet-on-click
   [e block uuid {:keys [on-redirect-to-page]}]
   [e block uuid {:keys [on-redirect-to-page]}]
   (cond
   (cond
-    (pu/shape-block? block)
-    (route-handler/redirect-to-page! (get-in block [:block/page :block/uuid]) {:block-id uuid})
-
     (gobj/get e "shiftKey")
     (gobj/get e "shiftKey")
     (do
     (do
       (state/sidebar-add-block!
       (state/sidebar-add-block!

+ 3 - 23
src/main/frontend/components/content.cljs

@@ -2,7 +2,6 @@
   (:require [cljs-time.coerce :as tc]
   (:require [cljs-time.coerce :as tc]
             [cljs.pprint :as pp]
             [cljs.pprint :as pp]
             [clojure.string :as string]
             [clojure.string :as string]
-            [dommy.core :as d]
             [frontend.commands :as commands]
             [frontend.commands :as commands]
             [frontend.components.editor :as editor]
             [frontend.components.editor :as editor]
             [frontend.components.export :as export]
             [frontend.components.export :as export]
@@ -72,8 +71,7 @@
                         (let [block-uuids (state/get-selection-block-ids)]
                         (let [block-uuids (state/get-selection-block-ids)]
                           (shui/popup-hide!)
                           (shui/popup-hide!)
                           (shui/dialog-open!
                           (shui/dialog-open!
-                           #(export/export-blocks block-uuids {:whiteboard? false
-                                                               :export-type :selected-nodes}))))}
+                           #(export/export-blocks block-uuids {:export-type :selected-nodes}))))}
     (t :content/copy-export-as))
     (t :content/copy-export-as))
 
 
    (shui/dropdown-menu-item
    (shui/dropdown-menu-item
@@ -168,8 +166,7 @@
         {:key      "Copy as"
         {:key      "Copy as"
          :on-click (fn [_]
          :on-click (fn [_]
                      (shui/dialog-open!
                      (shui/dialog-open!
-                      #(export/export-blocks [block-id] {:whiteboard? false
-                                                         :export-type :block})))}
+                      #(export/export-blocks [block-id] {:export-type :block})))}
         (t :content/copy-export-as))
         (t :content/copy-export-as))
 
 
        (when-not property-default-value?
        (when-not property-default-value?
@@ -336,25 +333,8 @@
            [:div.cursor (t :content/click-to-edit)]
            [:div.cursor (t :content/click-to-edit)]
            content)]))))
            content)]))))
 
 
-(defn- set-draw-iframe-style!
-  []
-  (let [width (gobj/get js/window "innerWidth")]
-    (when (>= width 1024)
-      (let [draws (d/by-class "draw-iframe")
-            width (- width 200)]
-        (doseq [draw draws]
-          (d/set-style! draw :width (str width "px"))
-          (let [height (max 700 (/ width 2))]
-            (d/set-style! draw :height (str height "px")))
-          (d/set-style! draw :margin-left (str (- (/ (- width 570) 2)) "px")))))))
-
 (rum/defcs content < rum/reactive
 (rum/defcs content < rum/reactive
-  {:did-mount (fn [state]
-                (set-draw-iframe-style!)
-                state)
-   :did-update (fn [state]
-                 (set-draw-iframe-style!)
-                 state)}
+  {}
   [state id {:keys [format
   [state id {:keys [format
                     config
                     config
                     hiccup
                     hiccup

+ 29 - 29
src/main/frontend/components/export.cljs

@@ -227,7 +227,7 @@
   (rum/local nil ::content)
   (rum/local nil ::content)
   {:will-mount (fn [state]
   {:will-mount (fn [state]
                  (let [top-level-uuids (get-top-level-uuids (first (:rum/args state)))]
                  (let [top-level-uuids (get-top-level-uuids (first (:rum/args state)))]
-                   (reset! *export-block-type (if (:whiteboard? (last (:rum/args state))) :png :text))
+                   (reset! *export-block-type :text)
                    (if (= @*export-block-type :png)
                    (if (= @*export-block-type :png)
                      (do (reset! (::content state) nil)
                      (do (reset! (::content state) nil)
                          (get-image-blob top-level-uuids
                          (get-image-blob top-level-uuids
@@ -238,7 +238,7 @@
                    (reset! (::text-indent-style state) (state/get-export-block-text-indent-style))
                    (reset! (::text-indent-style state) (state/get-export-block-text-indent-style))
                    (reset! (::text-other-options state) (state/get-export-block-text-other-options))
                    (reset! (::text-other-options state) (state/get-export-block-text-other-options))
                    (assoc state ::top-level-uuids top-level-uuids)))}
                    (assoc state ::top-level-uuids top-level-uuids)))}
-  [state _selection-ids {:keys [whiteboard? export-type] :as options}]
+  [state _selection-ids {:keys [export-type] :as options}]
   (let [top-level-uuids (::top-level-uuids state)
   (let [top-level-uuids (::top-level-uuids state)
         tp @*export-block-type
         tp @*export-block-type
         *text-other-options (::text-other-options state)
         *text-other-options (::text-other-options state)
@@ -249,34 +249,34 @@
     [:div.export.resize
     [:div.export.resize
      {:class "-m-5"}
      {:class "-m-5"}
      [:div.p-6
      [:div.p-6
-      (when-not whiteboard?
-        [:div.flex.pb-3
-         (ui/button "Text"
+      [:div.flex.pb-3
+       (ui/button "Text"
+                  :class "mr-4 w-20"
+                  :on-click #(do (reset! *export-block-type :text)
+                                 (reset! *content (export-helper top-level-uuids))))
+       (ui/button "OPML"
+                  :class "mr-4 w-20"
+                  :on-click #(do (reset! *export-block-type :opml)
+                                 (reset! *content (export-helper top-level-uuids))))
+       (ui/button "HTML"
+                  :class "mr-4 w-20"
+                  :on-click #(do (reset! *export-block-type :html)
+                                 (reset! *content (export-helper top-level-uuids))))
+       ;; TODO: Remove if this is no longer used after whiteboard removal
+       (when-not (seq? top-level-uuids)
+         (ui/button "PNG"
                     :class "mr-4 w-20"
                     :class "mr-4 w-20"
-                    :on-click #(do (reset! *export-block-type :text)
-                                   (reset! *content (export-helper top-level-uuids))))
-         (ui/button "OPML"
-                    :class "mr-4 w-20"
-                    :on-click #(do (reset! *export-block-type :opml)
-                                   (reset! *content (export-helper top-level-uuids))))
-         (ui/button "HTML"
-                    :class "mr-4 w-20"
-                    :on-click #(do (reset! *export-block-type :html)
-                                   (reset! *content (export-helper top-level-uuids))))
-         (when-not (seq? top-level-uuids)
-           (ui/button "PNG"
-                      :class "mr-4 w-20"
-                      :on-click #(do (reset! *export-block-type :png)
-                                     (reset! *content nil)
-                                     (get-image-blob top-level-uuids (merge options {:transparent-bg? false}) (fn [blob] (reset! *content blob))))))
-         (ui/button "EDN"
-                    :class "w-20"
-                    :on-click #(do (reset! *export-block-type :edn)
-                                   (p/let [result (<export-edn-helper top-level-uuids export-type)
-                                           pull-data (with-out-str (pprint/pprint result))]
-                                     (if (:export-edn-error result)
-                                       (notification/show! (:export-edn-error result) :error)
-                                       (reset! *content pull-data)))))])
+                    :on-click #(do (reset! *export-block-type :png)
+                                   (reset! *content nil)
+                                   (get-image-blob top-level-uuids (merge options {:transparent-bg? false}) (fn [blob] (reset! *content blob))))))
+       (ui/button "EDN"
+                  :class "w-20"
+                  :on-click #(do (reset! *export-block-type :edn)
+                                 (p/let [result (<export-edn-helper top-level-uuids export-type)
+                                         pull-data (with-out-str (pprint/pprint result))]
+                                   (if (:export-edn-error result)
+                                     (notification/show! (:export-edn-error result) :error)
+                                     (reset! *content pull-data)))))]
       (if (= :png tp)
       (if (= :png tp)
         [:div.flex.items-center.justify-center.relative
         [:div.flex.items-center.justify-center.relative
          (when (not @*content) [:div.absolute (ui/loading "")])
          (when (not @*content) [:div.absolute (ui/loading "")])

+ 1 - 3
src/main/frontend/components/file.cljs

@@ -49,9 +49,7 @@
         (let [file-id file]
         (let [file-id file]
           [:tr {:key file-id}
           [:tr {:key file-id}
            [:td
            [:td
-            (let [href (if (common-config/draw? file)
-                         (rfe/href :draw nil {:file (string/replace file (str common-config/default-draw-directory "/") "")})
-                         (rfe/href :file {:path file-id}))]
+            (let [href (rfe/href :file {:path file-id})]
               [:a {:href href}
               [:a {:href href}
                file])]
                file])]
            (when-not mobile?
            (when-not mobile?

+ 0 - 2
src/main/frontend/components/icon.cljs

@@ -60,8 +60,6 @@
           (ldb/class? node-entity)
           (ldb/class? node-entity)
           "hash"
           "hash"
           (ldb/property? node-entity)
           (ldb/property? node-entity)
-          "letter-p"
-          (ldb/whiteboard? node-entity)
           "writing"
           "writing"
           (ldb/page? node-entity)
           (ldb/page? node-entity)
           "file"
           "file"

+ 2 - 4
src/main/frontend/components/page_menu.cljs

@@ -81,8 +81,7 @@
   [page]
   [page]
   (when-let [page-name (and page (db/page? page) (:block/name page))]
   (when-let [page-name (and page (db/page? page) (:block/name page))]
     (let [page-title (str (:block/uuid page))
     (let [page-title (str (:block/uuid page))
-          whiteboard? (ldb/whiteboard? page)
-          block? (and page (util/uuid-string? page-name) (not whiteboard?))
+          block? (and page (util/uuid-string? page-name))
           contents? (= page-name "contents")
           contents? (= page-name "contents")
           public? (:logseq.property/publishing-public? page)
           public? (:logseq.property/publishing-public? page)
           _favorites-updated? (state/sub :favorites/updated?)
           _favorites-updated? (state/sub :favorites/updated?)
@@ -116,8 +115,7 @@
             {:title   (t :export-page)
             {:title   (t :export-page)
              :options {:on-click #(shui/dialog-open!
              :options {:on-click #(shui/dialog-open!
                                    (fn []
                                    (fn []
-                                     (export/export-blocks [(:block/uuid page)] {:whiteboard? whiteboard?
-                                                                                 :export-type :page}))
+                                     (export/export-blocks [(:block/uuid page)] {:export-type :page}))
                                    {:class "w-auto md:max-w-4xl max-h-[80vh] overflow-y-auto"})}})
                                    {:class "w-auto md:max-w-4xl max-h-[80vh] overflow-y-auto"})}})
 
 
           (when (and page (not config/publishing?))
           (when (and page (not config/publishing?))

+ 1 - 1
src/main/frontend/components/property/value.cljs

@@ -770,7 +770,7 @@
                                 :label label
                                 :label label
                                 :value id
                                 :value id
                                 :disabled? (and tags? (contains?
                                 :disabled? (and tags? (contains?
-                                                       (set/union #{:logseq.class/Journal :logseq.class/Whiteboard}
+                                                       (set/union #{:logseq.class/Journal}
                                                                   (set/difference ldb/internal-tags #{:logseq.class/Page}))
                                                                   (set/difference ldb/internal-tags #{:logseq.class/Page}))
                                                        (:db/ident node)))))) nodes)
                                                        (:db/ident node)))))) nodes)
         classes' (remove (fn [class] (= :logseq.class/Root (:db/ident class))) classes)
         classes' (remove (fn [class] (= :logseq.class/Root (:db/ident class))) classes)

+ 0 - 1
src/main/frontend/components/shortcut.cljs

@@ -27,7 +27,6 @@
           :shortcut.category/block-selection
           :shortcut.category/block-selection
           :shortcut.category/formatting
           :shortcut.category/formatting
           :shortcut.category/toggle
           :shortcut.category/toggle
-          :shortcut.category/whiteboard
           :shortcut.category/plugins
           :shortcut.category/plugins
           :shortcut.category/others))
           :shortcut.category/others))
 
 

+ 1 - 2
src/main/frontend/db.cljs

@@ -28,8 +28,7 @@
   get-block-immediate-children get-file
   get-block-immediate-children get-file
   get-latest-journals get-page get-case-page
   get-latest-journals get-page get-case-page
   get-page-format journal-page? page? sub-block
   get-page-format journal-page? page? sub-block
-  page-exists? get-alias-source-page
-  has-children? whiteboard-page?])
+  page-exists? get-alias-source-page has-children?])
 
 
 (defn start-db-conn!
 (defn start-db-conn!
   ([repo]
   ([repo]

+ 0 - 8
src/main/frontend/db/model.cljs

@@ -288,14 +288,6 @@ independent of format as format specific heading characters are stripped"
   (when (string? page-name)
   (when (string? page-name)
     (ldb/journal? (ldb/get-page (conn/get-db) page-name))))
     (ldb/journal? (ldb/get-page (conn/get-db) page-name))))
 
 
-(defn whiteboard-page?
-  "Given a page entity, page object or page name, check if it is a whiteboard page"
-  [page]
-  (let [page (if (string? page)
-               (get-page page)
-               page)]
-    (ldb/whiteboard? page)))
-
 ;; FIXME: use `Untitled` instead of UUID for db based graphs
 ;; FIXME: use `Untitled` instead of UUID for db based graphs
 (defn untitled-page?
 (defn untitled-page?
   [page-name]
   [page-name]

+ 2 - 1
src/main/frontend/handler/assets.cljs

@@ -128,7 +128,8 @@
    If path is relative path, return blob url or file url according to environment."
    If path is relative path, return blob url or file url according to environment."
   ([path] (<make-asset-url path (try (js/URL. path) (catch :default _ nil))))
   ([path] (<make-asset-url path (try (js/URL. path) (catch :default _ nil))))
   ([path ^js js-url]
   ([path ^js js-url]
-   ;; path start with "/assets"(editor) or compatible for "../assets"(whiteboards)
+   ;; path start with "/assets"(editor)
+   ;; TODO: Remove compatible for "../assets" related to whiteboards?
    (if config/publishing?
    (if config/publishing?
      ;; Relative path needed since assets are not under '/' if published graph is not under '/'
      ;; Relative path needed since assets are not under '/' if published graph is not under '/'
      (string/replace-first path #"^/" "")
      (string/replace-first path #"^/" "")

+ 1 - 1
src/main/frontend/handler/common/page.cljs

@@ -175,7 +175,7 @@
         page (db/entity repo page-id)]
         page (db/entity repo page-id)]
 
 
     ;; Redirect to the newly renamed page
     ;; Redirect to the newly renamed page
-    (when (and redirect? (not (db/whiteboard-page? page)))
+    (when redirect?
       (route-handler/redirect! {:to          :page
       (route-handler/redirect! {:to          :page
                                 :push        false
                                 :push        false
                                 :path-params {:name (str (:block/uuid page))}}))
                                 :path-params {:name (str (:block/uuid page))}}))

+ 1 - 10
src/main/frontend/handler/events.cljs

@@ -64,8 +64,7 @@
   (page-handler/init-commands!)
   (page-handler/init-commands!)
   ;; load config
   ;; load config
   (repo-config-handler/restore-repo-config! graph)
   (repo-config-handler/restore-repo-config! graph)
-  (when-not (= :draw (state/get-current-route))
-    (route-handler/redirect-to-home!))
+  (route-handler/redirect-to-home!)
   (graph-handler/settle-metadata-to-local! {:last-seen-at (js/Date.now)}))
   (graph-handler/settle-metadata-to-local! {:last-seen-at (js/Date.now)}))
 
 
 ;; Parameters for the `persist-db` function, to show the notification messages
 ;; Parameters for the `persist-db` function, to show the notification messages
@@ -203,14 +202,6 @@
   (when-not (mobile-util/native-platform?)
   (when-not (mobile-util/native-platform?)
     (state/pub-event! [:graph/ready graph])))
     (state/pub-event! [:graph/ready graph])))
 
 
-(defmethod handle :whiteboard-link [[_ shapes]]
-  (route-handler/go-to-search! :whiteboard/link)
-  (state/set-state! :whiteboard/linked-shapes shapes))
-
-(defmethod handle :whiteboard-go-to-link [[_ link]]
-  (route-handler/redirect! {:to :page
-                            :path-params {:name link}}))
-
 (defmethod handle :graph/save-db-to-disk [[_ _opts]]
 (defmethod handle :graph/save-db-to-disk [[_ _opts]]
   (persist-db/export-current-graph! {:succ-notification? true :force-save? true}))
   (persist-db/export-current-graph! {:succ-notification? true :force-save? true}))
 
 

+ 0 - 22
src/main/frontend/handler/paste.cljs

@@ -64,19 +64,6 @@
         (re-matches #"^https://x\.com.*?$" url))
         (re-matches #"^https://x\.com.*?$" url))
     (util/format "{{twitter %s}}" url)))
     (util/format "{{twitter %s}}" url)))
 
 
-(defn- try-parse-as-json
-  "Result is not only to be an Object.
-   Maybe JSON types like string, number, boolean, null, array"
-  [text]
-  (try (js/JSON.parse text)
-       (catch :default _ #js{})))
-
-(defn- get-whiteboard-tldr-from-text
-  [text]
-  (when-let [matched-text (util/safe-re-find #"<whiteboard-tldr>(.*)</whiteboard-tldr>"
-                                             (common-util/safe-decode-uri-component text))]
-    (try-parse-as-json (second matched-text))))
-
 (defn- selection-within-link?
 (defn- selection-within-link?
   [selection-and-format]
   [selection-and-format]
   (let [{:keys [selection-start selection-end selection value]} selection-and-format]
   (let [{:keys [selection-start selection-end selection value]} selection-and-format]
@@ -125,17 +112,10 @@
                            (commands/simple-insert! input-id text nil)))
                            (commands/simple-insert! input-id text nil)))
         text (string/replace *text "\r\n" "\n") ;; Fix for Windows platform
         text (string/replace *text "\r\n" "\n") ;; Fix for Windows platform
         input-id (state/get-edit-input-id)
         input-id (state/get-edit-input-id)
-        shape-refs-text (when (and (not (string/blank? html))
-                                   (get-whiteboard-tldr-from-text html))
-                          ;; text should always be prepared block-ref generated in tldr
-                          text)
         {:keys [selection] :as selection-and-format} (editor-handler/get-selection-and-format)
         {:keys [selection] :as selection-and-format} (editor-handler/get-selection-and-format)
         text-url? (common-util/url? text)
         text-url? (common-util/url? text)
         selection-url? (common-util/url? selection)]
         selection-url? (common-util/url? selection)]
     (cond
     (cond
-      (not (string/blank? shape-refs-text))
-      (commands/simple-insert! input-id shape-refs-text nil)
-
       ;; When a url is selected in a formatted link, replaces it with pasted text
       ;; When a url is selected in a formatted link, replaces it with pasted text
       (or (and (or text-url? selection-url?)
       (or (and (or text-url? selection-url?)
                (selection-within-link? selection-and-format))
                (selection-within-link? selection-and-format))
@@ -178,7 +158,6 @@
           (replace-text-f text'))))))
           (replace-text-f text'))))))
 
 
 (defn- paste-copied-blocks-or-text
 (defn- paste-copied-blocks-or-text
-  ;; todo: logseq/whiteboard-shapes is now text/html
   [input text e html]
   [input text e html]
   (util/stop e)
   (util/stop e)
   (let [repo (state/get-current-repo)]
   (let [repo (state/get-current-repo)]
@@ -258,7 +237,6 @@
 - pastes file if it exists
 - pastes file if it exists
 - wraps certain urls with macros
 - wraps certain urls with macros
 - wraps selected urls with link formatting
 - wraps selected urls with link formatting
-- whiteboard friendly pasting
 - paste replaces selected text"
 - paste replaces selected text"
   [id]
   [id]
   (fn [e]
   (fn [e]

+ 1 - 7
src/main/frontend/handler/property/util.cljs

@@ -12,10 +12,4 @@
   "Get the value of a built-in block's property by its db-ident"
   "Get the value of a built-in block's property by its db-ident"
   [block db-ident]
   [block db-ident]
   (let [db (conn/get-db (state/get-current-repo))]
   (let [db (conn/get-db (state/get-current-repo))]
-    (db-property/get-block-property-value db block db-ident)))
-
-(defn shape-block?
-  [block]
-  (let [repo (state/get-current-repo)
-        db (conn/get-db repo)]
-    (db-property/shape-block? db block)))
+    (db-property/get-block-property-value db block db-ident)))

+ 0 - 2
src/main/frontend/handler/route.cljs

@@ -146,8 +146,6 @@
     (str "#"  (:name path-params))
     (str "#"  (:name path-params))
     :diff
     :diff
     "Git diff"
     "Git diff"
-    :draw
-    "Draw"
     :settings
     :settings
     "Settings"
     "Settings"
     :import
     :import

+ 2 - 2
src/main/frontend/mixins.cljs

@@ -131,10 +131,10 @@
                            (swap! open? not)))))))
                            (swap! open? not)))))))
 
 
 (def container-id
 (def container-id
-  "Notice: the first parameter needs to be a `config` with `id`, optional `sidebar?`, `whiteboard?`"
+  "Notice: the first parameter needs to be a `config` with `id`, optional `sidebar?`"
   {:init (fn [state]
   {:init (fn [state]
            (let [config (first (:rum/args state))
            (let [config (first (:rum/args state))
-                 key (select-keys config [:id :sidebar? :whiteboard? :embed? :custom-query? :query :current-block :table? :block? :db/id :page-name])
+                 key (select-keys config [:id :sidebar? :embed? :custom-query? :query :current-block :table? :block? :db/id :page-name])
                  container-id (or (:container-id config) (state/get-container-id key))]
                  container-id (or (:container-id config) (state/get-container-id key))]
              (assoc state :container-id container-id)))})
              (assoc state :container-id container-id)))})
 
 

+ 9 - 12
src/main/frontend/page.cljs

@@ -126,16 +126,13 @@
                      (teardown)))}
                      (teardown)))}
   []
   []
   (if-let [route-match (state/sub :route-match)]
   (if-let [route-match (state/sub :route-match)]
-    (let [route-name (get-in route-match [:data :name])]
-      (when-let [view (:view (:data route-match))]
-        (ui/catch-error-and-notify
-         (helpful-default-error-screen)
-         [:<>
-          (if (= :draw route-name)
-            (view route-match)
-            (container/root-container
-             route-match
-             (view route-match)))
-          (when config/lsp-enabled?
-            (plugin/hook-daemon-renderers))])))
+    (when-let [view (:view (:data route-match))]
+      (ui/catch-error-and-notify
+       (helpful-default-error-screen)
+       [:<>
+        (container/root-container
+         route-match
+         (view route-match))
+        (when config/lsp-enabled?
+          (plugin/hook-daemon-renderers))]))
     (not-found)))
     (not-found)))

+ 0 - 1
src/main/frontend/schema/handler/common_config.cljc

@@ -11,7 +11,6 @@
     [:feature/enable-search-remove-accents? :boolean]
     [:feature/enable-search-remove-accents? :boolean]
     [:feature/enable-journals? :boolean]
     [:feature/enable-journals? :boolean]
     [:feature/enable-flashcards? :boolean]
     [:feature/enable-flashcards? :boolean]
-    [:feature/enable-whiteboards? :boolean]
     [:feature/disable-scheduled-and-deadline-query? :boolean]
     [:feature/disable-scheduled-and-deadline-query? :boolean]
     [:scheduled/future-days :int]
     [:scheduled/future-days :int]
     [:start-of-week [:enum 0 1 2 3 4 5 6]]
     [:start-of-week [:enum 0 1 2 3 4 5 6]]

+ 0 - 2
src/main/frontend/state.cljs

@@ -82,7 +82,6 @@
       :network/online?         true
       :network/online?         true
       :me                      nil
       :me                      nil
       :git/current-repo        current-graph
       :git/current-repo        current-graph
-      :draw?                   false
       :db/restoring?           nil
       :db/restoring?           nil
 
 
       :search/q                              ""
       :search/q                              ""
@@ -148,7 +147,6 @@
       :editor/start-pos                      (atom nil)
       :editor/start-pos                      (atom nil)
       :editor/async-unsaved-chars            (atom nil)
       :editor/async-unsaved-chars            (atom nil)
       :editor/hidden-editors                 #{} ;; page names
       :editor/hidden-editors                 #{} ;; page names
-      :editor/draw-mode?                     false
 
 
       :editor/action                         (atom nil)
       :editor/action                         (atom nil)
       :editor/action-data                    nil
       :editor/action-data                    nil

+ 1 - 2
src/main/frontend/worker/db_worker.cljs

@@ -513,8 +513,7 @@
                        tx-data)
                        tx-data)
             _ (when context (worker-state/set-context! context))
             _ (when context (worker-state/set-context! context))
             tx-meta' (cond-> tx-meta
             tx-meta' (cond-> tx-meta
-                       (and (not (:whiteboard/transact? tx-meta))
-                            (not (:rtc-download-graph? tx-meta))) ; delay writes to the disk
+                       (not (:rtc-download-graph? tx-meta)) ; delay writes to the disk
                        (assoc :skip-store? true)
                        (assoc :skip-store? true)
 
 
                        true
                        true

+ 0 - 1
src/main/frontend/worker/handler/page.cljs

@@ -25,7 +25,6 @@
 
 
    * :uuid                     - when set, use this uuid instead of generating a new one.
    * :uuid                     - when set, use this uuid instead of generating a new one.
    * :class?                   - when true, adds a :block/tags ':logseq.class/Tag'
    * :class?                   - when true, adds a :block/tags ':logseq.class/Tag'
-   * :whiteboard?              - when true, adds a :block/tags ':logseq.class/Whiteboard'
    * :tags                     - tag uuids that are added to :block/tags
    * :tags                     - tag uuids that are added to :block/tags
    * :persist-op?              - when true, add an update-page op
    * :persist-op?              - when true, add an update-page op
    * :properties               - properties to add to the page
    * :properties               - properties to add to the page

+ 1 - 1
src/main/frontend/worker/pipeline.cljs

@@ -126,7 +126,7 @@
                 [:db/add eid :logseq.property.class/extends :logseq.class/Root]
                 [:db/add eid :logseq.property.class/extends :logseq.class/Root]
                 [:db/retract eid :block/tags :logseq.class/Page]])
                 [:db/retract eid :block/tags :logseq.class/Page]])
 
 
-             ;; remove #Page from tags/journals/whiteboards, etc.
+             ;; remove #Page from tags/journals etc.
              (= (:db/id page-tag) (:v datom))
              (= (:db/id page-tag) (:v datom))
              (let [tags (->> entity
              (let [tags (->> entity
                              :block/tags
                              :block/tags

+ 14 - 42
src/main/frontend/worker/rtc/remote_update.cljs

@@ -123,27 +123,6 @@
                   :gen-undo-ops? false
                   :gen-undo-ops? false
                   :rtc-op? true}))
                   :rtc-op? true}))
 
 
-(defmethod transact-db! :delete-whiteboard-blocks [_ conn block-uuids]
-  (ldb/transact! conn
-                 (mapv (fn [block-uuid] [:db/retractEntity [:block/uuid block-uuid]]) block-uuids)
-                 {:persist-op? false
-                  :gen-undo-ops? false
-                  :rtc-op? true}))
-
-(defmethod transact-db! :upsert-whiteboard-block [_ conn blocks]
-  (ldb/transact! conn blocks {:persist-op? false
-                              :gen-undo-ops? false
-                              :rtc-op? true}))
-
-(defn- group-remote-remove-ops-by-whiteboard-block
-  "return {true [<whiteboard-block-ops>], false [<other-ops>]}"
-  [db remote-remove-ops]
-  (group-by (fn [{:keys [block-uuid]}]
-              (boolean
-               (when-let [block (d/entity db [:block/uuid block-uuid])]
-                 (ldb/whiteboard? (:block/parent block)))))
-            remote-remove-ops))
-
 (defn- apply-remote-remove-ops-helper
 (defn- apply-remote-remove-ops-helper
   [conn remove-ops]
   [conn remove-ops]
   (let [block-uuid->entity (into {}
   (let [block-uuid->entity (into {}
@@ -164,32 +143,28 @@
      :block-uuids-to-remove block-uuid-set}))
      :block-uuids-to-remove block-uuid-set}))
 
 
 (defn- apply-remote-remove-ops
 (defn- apply-remote-remove-ops
-  [conn remove-ops]
-  (let [{whiteboard-block-ops true other-ops false} (group-remote-remove-ops-by-whiteboard-block @conn remove-ops)]
-    (transact-db! :delete-whiteboard-blocks conn (map :block-uuid whiteboard-block-ops))
-
-    (let [{:keys [block-uuids-need-move block-uuids-to-remove]}
-          (apply-remote-remove-ops-helper conn other-ops)]
+  [conn other-ops]
+  (let [{:keys [block-uuids-need-move block-uuids-to-remove]}
+        (apply-remote-remove-ops-helper conn other-ops)]
       ;; move to page-block's first child
       ;; move to page-block's first child
-      (doseq [block-uuid block-uuids-need-move]
-        (when-let [b (d/entity @conn [:block/uuid block-uuid])]
-          (when-let [target-b
-                     (d/entity @conn (:db/id (:block/page (d/entity @conn [:block/uuid block-uuid]))))]
-            (transact-db! :move-blocks&persist-op conn [b] target-b {:sibling? false}))))
-      (let [deleting-blocks (keep (fn [block-uuid]
-                                    (d/entity @conn [:block/uuid block-uuid]))
-                                  block-uuids-to-remove)]
-        (when (seq deleting-blocks)
-          (transact-db! :delete-blocks conn deleting-blocks {}))))))
+    (doseq [block-uuid block-uuids-need-move]
+      (when-let [b (d/entity @conn [:block/uuid block-uuid])]
+        (when-let [target-b
+                   (d/entity @conn (:db/id (:block/page (d/entity @conn [:block/uuid block-uuid]))))]
+          (transact-db! :move-blocks&persist-op conn [b] target-b {:sibling? false}))))
+    (let [deleting-blocks (keep (fn [block-uuid]
+                                  (d/entity @conn [:block/uuid block-uuid]))
+                                block-uuids-to-remove)]
+      (when (seq deleting-blocks)
+        (transact-db! :delete-blocks conn deleting-blocks {})))))
 
 
 (defn- insert-or-move-block
 (defn- insert-or-move-block
   [conn block-uuid remote-parents remote-block-order move? op-value]
   [conn block-uuid remote-parents remote-block-order move? op-value]
   (when (or (seq remote-parents) remote-block-order) ;at least one of parent|order exists
   (when (or (seq remote-parents) remote-block-order) ;at least one of parent|order exists
     (let [first-remote-parent (first remote-parents)
     (let [first-remote-parent (first remote-parents)
           local-parent (when first-remote-parent (d/entity @conn [:block/uuid first-remote-parent]))
           local-parent (when first-remote-parent (d/entity @conn [:block/uuid first-remote-parent]))
-          whiteboard-page-block? (boolean (ldb/whiteboard? local-parent))
           b (d/entity @conn [:block/uuid block-uuid])]
           b (d/entity @conn [:block/uuid block-uuid])]
-      (case [whiteboard-page-block? (some? local-parent) (some? remote-block-order)]
+      (case [false (some? local-parent) (some? remote-block-order)]
         [false true true]
         [false true true]
         (do
         (do
           (if move?
           (if move?
@@ -209,9 +184,6 @@
         (when (and (empty? remote-parents) move?)
         (when (and (empty? remote-parents) move?)
           (transact-db! :update-block-order-directly conn block-uuid nil remote-block-order))
           (transact-db! :update-block-order-directly conn block-uuid nil remote-block-order))
 
 
-        ([true false false] [true false true] [true true false] [true true true])
-        (throw (ex-info "Not implemented yet for whiteboard" {:op-value op-value}))
-
         (let [e (ex-info "Don't know where to insert" {:block-uuid block-uuid
         (let [e (ex-info "Don't know where to insert" {:block-uuid block-uuid
                                                        :remote-parents remote-parents
                                                        :remote-parents remote-parents
                                                        :remote-block-order remote-block-order
                                                        :remote-block-order remote-block-order

+ 0 - 29
src/test/frontend/handler/paste_test.cljs

@@ -1,7 +1,6 @@
 (ns frontend.handler.paste-test
 (ns frontend.handler.paste-test
   (:require [cljs.test :refer [deftest are is testing]]
   (:require [cljs.test :refer [deftest are is testing]]
             [frontend.test.helper :as test-helper :include-macros true :refer [deftest-async]]
             [frontend.test.helper :as test-helper :include-macros true :refer [deftest-async]]
-            [goog.object :as gobj]
             ["/frontend/utils" :as utils]
             ["/frontend/utils" :as utils]
             [frontend.state :as state]
             [frontend.state :as state]
             [frontend.commands :as commands]
             [frontend.commands :as commands]
@@ -12,34 +11,6 @@
             [frontend.handler.editor :as editor-handler]
             [frontend.handler.editor :as editor-handler]
             [frontend.handler.paste :as paste-handler]))
             [frontend.handler.paste :as paste-handler]))
 
 
-(deftest try-parse-as-json-result-parse-test
-  (are [x y] (let [result (#'paste-handler/try-parse-as-json x)
-                   obj-result (if (object? result) result #js{})]
-               (gobj/get obj-result "foo") ;; This op shouldn't throw
-               (gobj/getValueByKeys obj-result "foo" "bar") ;; This op shouldn't throw
-               (gobj/equals result y))
-    "{\"number\": 1234}" #js{:number 1234}
-    "1234" 1234
-    "null" nil
-    "true" true
-    "[1234, 5678]" #js[1234 5678]
-    ;; invalid JSON
-    "{number: 1234}" #js{}))
-
-(deftest try-parse-as-json-result-get-test
-  (are [x y z] (let [result (#'paste-handler/try-parse-as-json x)
-                     obj-result (if (object? result) result #js{})]
-                 (and (gobj/equals (gobj/get obj-result "foo") y)
-                      (gobj/equals (gobj/getValueByKeys obj-result "foo" "bar") z)))
-    "{\"foo\": {\"bar\": 1234}}" #js{:bar 1234} 1234
-    "{\"number\": 1234}" nil nil
-    "1234" nil nil
-    "null" nil nil
-    "true" nil nil
-    "[{\"number\": 1234}]" nil nil
-    ;; invalid JSON
-    "{number: 1234}" nil nil))
-
 (deftest selection-within-link-test
 (deftest selection-within-link-test
   (are [x y] (= (#'paste-handler/selection-within-link? x) y)
   (are [x y] (= (#'paste-handler/selection-within-link? x) y)
     {:format :markdown
     {:format :markdown