Parcourir la source

refactor: rename :block/original-name to :block/title

Tienson Qin il y a 1 an
Parent
commit
a1f352773b
100 fichiers modifiés avec 543 ajouts et 547 suppressions
  1. 2 2
      deps/common/src/logseq/common/util.cljs
  2. 4 4
      deps/db/script/create_graph/inferred.edn
  3. 8 8
      deps/db/src/logseq/db.cljs
  4. 6 6
      deps/db/src/logseq/db/frontend/class.cljs
  5. 7 7
      deps/db/src/logseq/db/frontend/content.cljs
  6. 1 1
      deps/db/src/logseq/db/frontend/entity_plus.cljc
  7. 1 1
      deps/db/src/logseq/db/frontend/malli_schema.cljs
  8. 10 10
      deps/db/src/logseq/db/frontend/property.cljs
  9. 1 1
      deps/db/src/logseq/db/frontend/property/build.cljs
  10. 4 4
      deps/db/src/logseq/db/frontend/property/type.cljs
  11. 2 2
      deps/db/src/logseq/db/frontend/rules.cljc
  12. 1 2
      deps/db/src/logseq/db/frontend/schema.cljs
  13. 22 22
      deps/db/src/logseq/db/sqlite/build.cljs
  14. 3 3
      deps/db/src/logseq/db/sqlite/common_db.cljs
  15. 8 8
      deps/db/src/logseq/db/sqlite/create_graph.cljs
  16. 5 5
      deps/db/src/logseq/db/sqlite/util.cljs
  17. 2 2
      deps/db/test/logseq/db/frontend/content_test.cljs
  18. 2 2
      deps/db/test/logseq/db/frontend/inputs_test.cljs
  19. 28 28
      deps/db/test/logseq/db/frontend/rules_test.cljs
  20. 13 13
      deps/db/test/logseq/db/sqlite/build_test.cljs
  21. 1 1
      deps/db/test/logseq/db/sqlite/common_db_test.cljs
  22. 2 2
      deps/db/test/logseq/db/sqlite/create_graph_test.cljs
  23. 4 4
      deps/graph-parser/src/logseq/graph_parser/block.cljs
  24. 1 1
      deps/graph-parser/src/logseq/graph_parser/db.cljs
  25. 18 18
      deps/graph-parser/src/logseq/graph_parser/exporter.cljs
  26. 7 7
      deps/graph-parser/src/logseq/graph_parser/extract.cljc
  27. 2 2
      deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs
  28. 1 1
      deps/graph-parser/test/logseq/graph_parser/cli_test.cljs
  29. 6 6
      deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs
  30. 2 2
      deps/graph-parser/test/logseq/graph_parser/extract_test.cljs
  31. 9 9
      deps/graph-parser/test/logseq/graph_parser_test.cljs
  32. 4 4
      deps/outliner/src/logseq/outliner/property.cljs
  33. 3 4
      deps/outliner/test/logseq/outliner/pipeline_test.cljs
  34. 18 18
      deps/outliner/test/logseq/outliner/property_test.cljs
  35. 1 1
      deps/publishing/src/logseq/publishing/db.cljs
  36. 1 1
      resources/whiteboard/onboarding.edn
  37. 3 3
      scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs
  38. 26 26
      scripts/src/logseq/tasks/db_graph/create_graph_with_properties.cljs
  39. 11 11
      scripts/src/logseq/tasks/db_graph/create_graph_with_schema_org.cljs
  40. 1 1
      src/main/electron/listener.cljs
  41. 1 1
      src/main/frontend/common_keywords.cljs
  42. 1 1
      src/main/frontend/components/all_pages.cljs
  43. 11 11
      src/main/frontend/components/block.cljs
  44. 5 5
      src/main/frontend/components/class.cljs
  45. 2 2
      src/main/frontend/components/cmdk/core.cljs
  46. 5 5
      src/main/frontend/components/container.cljs
  47. 1 1
      src/main/frontend/components/export.cljs
  48. 7 7
      src/main/frontend/components/file.cljs
  49. 2 2
      src/main/frontend/components/file_based/hierarchy.cljs
  50. 1 1
      src/main/frontend/components/file_sync.cljs
  51. 26 26
      src/main/frontend/components/page.cljs
  52. 6 6
      src/main/frontend/components/page_menu.cljs
  53. 11 11
      src/main/frontend/components/property.cljs
  54. 1 1
      src/main/frontend/components/property/closed_value.cljs
  55. 1 1
      src/main/frontend/components/property/util.cljs
  56. 8 8
      src/main/frontend/components/property/value.cljs
  57. 4 4
      src/main/frontend/components/query/builder.cljs
  58. 3 3
      src/main/frontend/components/query_table.cljs
  59. 2 2
      src/main/frontend/components/reference.cljs
  60. 1 1
      src/main/frontend/components/reference_filters.cljs
  61. 2 2
      src/main/frontend/components/right_sidebar.cljs
  62. 10 10
      src/main/frontend/components/views.cljs
  63. 2 2
      src/main/frontend/components/whiteboard.cljs
  64. 8 9
      src/main/frontend/db/async.cljs
  65. 1 1
      src/main/frontend/db/file_based/async.cljs
  66. 12 12
      src/main/frontend/db/model.cljs
  67. 1 1
      src/main/frontend/db/query_dsl.cljs
  68. 1 1
      src/main/frontend/extensions/pdf/assets.cljs
  69. 1 1
      src/main/frontend/extensions/slide.cljs
  70. 1 1
      src/main/frontend/external/roam_export.cljs
  71. 1 1
      src/main/frontend/format/block.cljs
  72. 2 2
      src/main/frontend/handler/block.cljs
  73. 1 1
      src/main/frontend/handler/common/developer.cljs
  74. 2 2
      src/main/frontend/handler/db_based/editor.cljs
  75. 3 3
      src/main/frontend/handler/db_based/property/util.cljs
  76. 2 2
      src/main/frontend/handler/editor.cljs
  77. 1 1
      src/main/frontend/handler/export.cljs
  78. 1 1
      src/main/frontend/handler/export/opml.cljs
  79. 1 1
      src/main/frontend/handler/file_based/repo.cljs
  80. 12 12
      src/main/frontend/handler/graph.cljs
  81. 1 1
      src/main/frontend/handler/route.cljs
  82. 5 5
      src/main/frontend/handler/whiteboard.cljs
  83. 2 2
      src/main/frontend/search.cljs
  84. 1 1
      src/main/frontend/template.cljs
  85. 1 1
      src/main/frontend/util.cljc
  86. 2 2
      src/main/frontend/util/page.cljs
  87. 2 2
      src/main/frontend/worker/export.cljs
  88. 1 1
      src/main/frontend/worker/file/core.cljs
  89. 31 31
      src/main/frontend/worker/handler/page/db_based/rename.cljs
  90. 16 16
      src/main/frontend/worker/handler/page/file_based/rename.cljs
  91. 2 2
      src/main/frontend/worker/rtc/client.cljs
  92. 2 3
      src/main/frontend/worker/rtc/const.cljs
  93. 3 3
      src/main/frontend/worker/rtc/db_listener.cljs
  94. 2 2
      src/main/frontend/worker/rtc/remote_update.cljs
  95. 6 6
      src/main/frontend/worker/search.cljs
  96. 1 1
      src/main/logseq/api.cljs
  97. 6 6
      src/test/frontend/db/query_dsl_test.cljs
  98. 2 2
      src/test/frontend/handler/db_based/recent_test.cljs
  99. 40 40
      src/test/frontend/handler/export_test.cljs
  100. 2 2
      src/test/frontend/test/helper.cljs

+ 2 - 2
deps/common/src/logseq/common/util.cljs

@@ -285,9 +285,9 @@
   []
   []
   (tc/to-long (t/now)))
   (tc/to-long (t/now)))
 
 
-(defn get-page-original-name
+(defn get-page-title
   [page]
   [page]
-  (or (:block/original-name page)
+  (or (:block/title page)
       (:block/name page)))
       (:block/name page)))
 
 
 (defn string-join-path
 (defn string-join-path

+ 4 - 4
deps/db/script/create_graph/inferred.edn

@@ -15,7 +15,7 @@
   :attendee {:block/schema {:type :object :cardinality :many}
   :attendee {:block/schema {:type :object :cardinality :many}
              :build/schema-classes [:Person]}}
              :build/schema-classes [:Person]}}
  :pages-and-blocks
  :pages-and-blocks
- [{:page {:block/original-name "Matt-Damon" :build/tags [:Person]}}
-  {:page {:block/original-name "Ben-Affleck" :build/tags [:Person]}}
-  {:page {:block/original-name "Tienson" :build/tags [:Person]}}
-  {:page {:block/original-name "Zhiyuan" :build/tags [:Person]}}]}
+ [{:page {:block/title "Matt-Damon" :build/tags [:Person]}}
+  {:page {:block/title "Ben-Affleck" :build/tags [:Person]}}
+  {:page {:block/title "Tienson" :build/tags [:Person]}}
+  {:page {:block/title "Zhiyuan" :build/tags [:Person]}}]}

+ 8 - 8
deps/db/src/logseq/db.cljs

@@ -44,7 +44,7 @@
     :block/heading-level
     :block/heading-level
     :block/file
     :block/file
     :class/parent
     :class/parent
-    {:block/page [:db/id :block/name :block/original-name :block/journal-day]}
+    {:block/page [:db/id :block/name :block/title :block/journal-day]}
     {:block/_parent ...}])
     {:block/_parent ...}])
 
 
 (defonce *transact-fn (atom nil))
 (defonce *transact-fn (atom nil))
@@ -176,10 +176,10 @@
 (defn get-pages
 (defn get-pages
   [db]
   [db]
   (->> (d/q
   (->> (d/q
-        '[:find ?page-original-name
+        '[:find ?page-title
           :where
           :where
           [?page :block/name ?page-name]
           [?page :block/name ?page-name]
-          [(get-else $ ?page :block/original-name ?page-name) ?page-original-name]]
+          [(get-else $ ?page :block/title ?page-name) ?page-title]]
         db)
         db)
        (map first)
        (map first)
        (remove hidden-page?)))
        (remove hidden-page?)))
@@ -208,7 +208,7 @@
     (if-let [id (if (uuid? page-name-or-uuid) page-name-or-uuid
     (if-let [id (if (uuid? page-name-or-uuid) page-name-or-uuid
                     (parse-uuid page-name-or-uuid))]
                     (parse-uuid page-name-or-uuid))]
       (d/entity db [:block/uuid id])
       (d/entity db [:block/uuid id])
-      (d/entity db (sqlite-common-db/get-first-page-by-original-name db page-name-or-uuid)))))
+      (d/entity db (sqlite-common-db/get-first-page-by-title db page-name-or-uuid)))))
 
 
 (defn page-empty?
 (defn page-empty?
   "Whether a page is empty. Does it has a non-page block?
   "Whether a page is empty. Does it has a non-page block?
@@ -473,7 +473,7 @@
    [(sqlite-util/block-with-timestamps
    [(sqlite-util/block-with-timestamps
      {:block/uuid (common-uuid/gen-uuid)
      {:block/uuid (common-uuid/gen-uuid)
       :block/name common-config/favorites-page-name
       :block/name common-config/favorites-page-name
-      :block/original-name common-config/favorites-page-name
+      :block/title common-config/favorites-page-name
       :block/type #{"page" "hidden"}
       :block/type #{"page" "hidden"}
       :block/format :markdown})]))
       :block/format :markdown})]))
 
 
@@ -493,7 +493,7 @@
      [(sqlite-util/block-with-timestamps
      [(sqlite-util/block-with-timestamps
        {:block/uuid page-id
        {:block/uuid page-id
         :block/name common-config/views-page-name
         :block/name common-config/views-page-name
-        :block/original-name common-config/views-page-name
+        :block/title common-config/views-page-name
         :block/type #{"page" "hidden"}
         :block/type #{"page" "hidden"}
         :block/format :markdown})
         :block/format :markdown})
       (sqlite-util/block-with-timestamps
       (sqlite-util/block-with-timestamps
@@ -530,7 +530,7 @@
   [db namespace {:keys [db-graph?]}]
   [db namespace {:keys [db-graph?]}]
   (assert (string? namespace))
   (assert (string? namespace))
   (let [namespace (common-util/page-name-sanity-lc namespace)
   (let [namespace (common-util/page-name-sanity-lc namespace)
-        pull-attrs  (cond-> [:db/id :block/name :block/original-name :block/namespace]
+        pull-attrs  (cond-> [:db/id :block/name :block/title :block/namespace]
                       (not db-graph?)
                       (not db-graph?)
                       (conj {:block/file [:db/id :file/path]}))]
                       (conj {:block/file [:db/id :file/path]}))]
     (d/q
     (d/q
@@ -554,7 +554,7 @@
                    (map :e))]
                    (map :e))]
       (when (seq ids)
       (when (seq ids)
         (d/pull-many db
         (d/pull-many db
-                     '[:db/id :block/name :block/original-name]
+                     '[:db/id :block/name :block/title]
                      ids)))))
                      ids)))))
 
 
 (defn get-all-properties
 (defn get-all-properties

+ 6 - 6
deps/db/src/logseq/db/frontend/class.cljs

@@ -5,13 +5,13 @@
 
 
 (def ^:large-vars/data-var built-in-classes
 (def ^:large-vars/data-var built-in-classes
   "Map of built-in classes for db graphs with their :db/ident as keys"
   "Map of built-in classes for db graphs with their :db/ident as keys"
-  {:logseq.class/Root {:original-name "Root class"}
+  {:logseq.class/Root {:title "Root class"}
 
 
    :logseq.class/task
    :logseq.class/task
-   {:original-name "Task"
+   {:title "Task"
     :schema {:properties [:logseq.task/status :logseq.task/priority :logseq.task/deadline]}}
     :schema {:properties [:logseq.task/status :logseq.task/priority :logseq.task/deadline]}}
 
 
-   :logseq.class/Card {:original-name "Card"
+   :logseq.class/Card {:title "Card"
                        ;; :schema {:property []}
                        ;; :schema {:property []}
                        }
                        }
    ;; TODO: Add more classes such as :book, :paper, :movie, :music, :project
    ;; TODO: Add more classes such as :book, :paper, :movie, :music, :project
@@ -27,12 +27,12 @@
   "Builds a new class with a unique :db/ident. Also throws exception for user
   "Builds a new class with a unique :db/ident. Also throws exception for user
   facing messages when name is invalid"
   facing messages when name is invalid"
   [db page-m]
   [db page-m]
-  {:pre [(string? (:block/original-name page-m))]}
-  (let [db-ident (try (create-user-class-ident-from-name (:block/original-name page-m))
+  {:pre [(string? (:block/title page-m))]}
+  (let [db-ident (try (create-user-class-ident-from-name (:block/title page-m))
                       (catch :default e
                       (catch :default e
                         (throw (ex-info (str e)
                         (throw (ex-info (str e)
                                         {:type :notification
                                         {:type :notification
                                          :payload {:message "Failed to create class. Please try a different class name."
                                          :payload {:message "Failed to create class. Please try a different class name."
                                                    :type :error}}))))
                                                    :type :error}}))))
         db-ident' (db-ident/ensure-unique-db-ident db db-ident)]
         db-ident' (db-ident/ensure-unique-db-ident db db-ident)]
-    (sqlite-util/build-new-class (assoc page-m :db/ident db-ident'))))
+    (sqlite-util/build-new-class (assoc page-m :db/ident db-ident'))))

+ 7 - 7
deps/db/src/logseq/db/frontend/content.cljs

@@ -28,11 +28,11 @@
                                 page-ref-special-chars
                                 page-ref-special-chars
                                 (:block/uuid ref)
                                 (:block/uuid ref)
                                 page-ref/right-brackets)
                                 page-ref/right-brackets)
-                           (:block/original-name ref))
+                           (:block/title ref))
            (string/replace
            (string/replace
                 (str "#" page-ref-special-chars
                 (str "#" page-ref-special-chars
                      (:block/uuid ref))
                      (:block/uuid ref))
-                (str "#" (:block/original-name ref))))
+                (str "#" (:block/title ref))))
        content))
        content))
    content
    content
    refs))
    refs))
@@ -53,12 +53,12 @@
                      page-ref-special-chars
                      page-ref-special-chars
                      (:block/uuid ref)
                      (:block/uuid ref)
                      page-ref/right-brackets)
                      page-ref/right-brackets)
-                (page-ref/->page-ref (:block/original-name ref)))
+                (page-ref/->page-ref (:block/title ref)))
                ;; Replace tags
                ;; Replace tags
                (string/replace
                (string/replace
                 (str "#" page-ref-special-chars
                 (str "#" page-ref-special-chars
                      (:block/uuid ref))
                      (:block/uuid ref))
-                (str "#" (:block/original-name ref))))
+                (str "#" (:block/title ref))))
 
 
            content))
            content))
        content
        content
@@ -80,7 +80,7 @@
    (fn [content ref]
    (fn [content ref]
      (string/replace content
      (string/replace content
                      (str page-ref/left-brackets
                      (str page-ref/left-brackets
-                          (:block/original-name ref)
+                          (:block/title ref)
                           page-ref/right-brackets)
                           page-ref/right-brackets)
                      (str page-ref/left-brackets
                      (str page-ref/left-brackets
                           page-ref-special-chars
                           page-ref-special-chars
@@ -122,10 +122,10 @@
    (fn [content tag]
    (fn [content tag]
      (common-util/replace-ignore-case
      (common-util/replace-ignore-case
       content
       content
-      (str "#" (:block/original-name tag))
+      (str "#" (:block/title tag))
       (str page-ref/left-brackets
       (str page-ref/left-brackets
            page-ref-special-chars
            page-ref-special-chars
            (:block/uuid tag)
            (:block/uuid tag)
            page-ref/right-brackets)))
            page-ref/right-brackets)))
    content
    content
-   (sort-by :block/original-name > tags)))
+   (sort-by :block/title > tags)))

+ 1 - 1
deps/db/src/logseq/db/frontend/entity_plus.cljc

@@ -59,7 +59,7 @@
             (sort-by :block/order))
             (sort-by :block/order))
 
 
        :object/name
        :object/name
-       (or (lookup-entity e :block/original-name nil)
+       (or (lookup-entity e :block/title nil)
            (lookup-entity e :block/content nil))
            (lookup-entity e :block/content nil))
 
 
        (or (get (.-kv e) k)
        (or (get (.-kv e) k)

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

@@ -213,7 +213,7 @@
 (def page-attrs
 (def page-attrs
   "Common attributes for pages"
   "Common attributes for pages"
   [[:block/name :string]
   [[:block/name :string]
-   [:block/original-name :string]
+   [:block/title :string]
    [:block/type [:set [:enum "page" "class" "property" "whiteboard" "journal" "hidden"]]]
    [:block/type [:set [:enum "page" "class" "property" "whiteboard" "journal" "hidden"]]]
    [:block/alias {:optional true} [:set :int]]
    [:block/alias {:optional true} [:set :int]]
     ;; TODO: Should this be here or in common?
     ;; TODO: Should this be here or in common?

+ 10 - 10
deps/db/src/logseq/db/frontend/property.cljs

@@ -19,25 +19,25 @@
      * :view-context - Keyword to indicate which view contexts a property can be
      * :view-context - Keyword to indicate which view contexts a property can be
        seen in when :public? is set. Valid values are :page and :block. Property can
        seen in when :public? is set. Valid values are :page and :block. Property can
        be viewed in any context if not set
        be viewed in any context if not set
-   * :original-name - Property's :block/original-name
+   * :title - Property's :block/title
    * :name - Property's :block/name as a keyword. If none given, one is derived from the db/ident
    * :name - Property's :block/name as a keyword. If none given, one is derived from the db/ident
    * :attribute - Property keyword that is saved to a datascript attribute outside of :block/properties
    * :attribute - Property keyword that is saved to a datascript attribute outside of :block/properties
    * :closed-values - Vec of closed-value maps for properties with choices. Map
    * :closed-values - Vec of closed-value maps for properties with choices. Map
      has keys :value, :db-ident, :uuid and :icon"
      has keys :value, :db-ident, :uuid and :icon"
   (ordered-map
   (ordered-map
-   :block/alias           {:original-name "Alias"
+   :block/alias           {:title "Alias"
                            :attribute :block/alias
                            :attribute :block/alias
                            :schema {:type :page
                            :schema {:type :page
                                     :cardinality :many
                                     :cardinality :many
                                     :view-context :page
                                     :view-context :page
                                     :public? true}}
                                     :public? true}}
-   :block/tags           {:original-name "Tags"
+   :block/tags           {:title "Tags"
                           :attribute :block/tags
                           :attribute :block/tags
                           :schema {:type :page
                           :schema {:type :page
                                    :cardinality :many
                                    :cardinality :many
                                    :public? true
                                    :public? true
                                    :classes #{:logseq.class/Root}}}
                                    :classes #{:logseq.class/Root}}}
-   :logseq.property/page-tags {:original-name "pageTags"
+   :logseq.property/page-tags {:title "pageTags"
                                :schema {:type :page
                                :schema {:type :page
                                         :public? true
                                         :public? true
                                         :view-context :page
                                         :view-context :page
@@ -99,7 +99,7 @@
 
 
    ;; Task props
    ;; Task props
    :logseq.task/status
    :logseq.task/status
-   {:original-name "Status"
+   {:title "Status"
     :schema
     :schema
     {:type :default
     {:type :default
      :public? true
      :public? true
@@ -117,7 +117,7 @@
            [:logseq.task/status.done "Done" "Done"]
            [:logseq.task/status.done "Done" "Done"]
            [:logseq.task/status.canceled "Canceled" "Cancelled"]])}
            [:logseq.task/status.canceled "Canceled" "Cancelled"]])}
    :logseq.task/priority
    :logseq.task/priority
-   {:original-name "Priority"
+   {:title "Priority"
     :schema
     :schema
     {:type :default
     {:type :default
      :public? true
      :public? true
@@ -133,14 +133,14 @@
            [:logseq.task/priority.medium "Medium" "priorityLvlMedium"]
            [:logseq.task/priority.medium "Medium" "priorityLvlMedium"]
            [:logseq.task/priority.low "Low" "priorityLvlLow"]])}
            [:logseq.task/priority.low "Low" "priorityLvlLow"]])}
    :logseq.task/deadline
    :logseq.task/deadline
-   {:original-name "Deadline"
+   {:title "Deadline"
     :schema {:type :date
     :schema {:type :date
              :public? true
              :public? true
              :position :block-below}}
              :position :block-below}}
 
 
    ;; TODO: Add more props :Assignee, :Estimate, :Cycle, :Project
    ;; TODO: Add more props :Assignee, :Estimate, :Cycle, :Project
 
 
-   :logseq.property/icon {:original-name "Icon"
+   :logseq.property/icon {:title "Icon"
                           :schema {:type :map}}
                           :schema {:type :map}}
    :logseq.property/public {:schema
    :logseq.property/public {:schema
                             {:type :checkbox
                             {:type :checkbox
@@ -259,7 +259,7 @@
   (or (:block/content ent)
   (or (:block/content ent)
       (if-some [content (:property.value/content ent)]
       (if-some [content (:property.value/content ent)]
         content
         content
-        (:block/original-name ent))))
+        (:block/title ent))))
 
 
 (defn ref->property-value-content
 (defn ref->property-value-content
   "Given a ref from a pulled query e.g. `{:db/id X}`, gets a readable name for
   "Given a ref from a pulled query e.g. `{:db/id X}`, gets a readable name for
@@ -317,6 +317,6 @@
   [db block]
   [db block]
   (->> (properties block)
   (->> (properties block)
        (map (fn [[k v]]
        (map (fn [[k v]]
-              [(:block/original-name (d/entity db k))
+              [(:block/title (d/entity db k))
                (ref->property-value-contents db v)]))
                (ref->property-value-contents db v)]))
        (into {})))
        (into {})))

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

@@ -42,7 +42,7 @@
    the hidden page and closed value blocks as needed"
    the hidden page and closed value blocks as needed"
   [db-ident prop-name property {:keys [property-attributes]}]
   [db-ident prop-name property {:keys [property-attributes]}]
   (let [property-schema (:block/schema property)
   (let [property-schema (:block/schema property)
-        property-tx (merge (sqlite-util/build-new-property db-ident property-schema {:original-name prop-name
+        property-tx (merge (sqlite-util/build-new-property db-ident property-schema {:title prop-name
                                                                                      :ref-type? true})
                                                                                      :ref-type? true})
                            property-attributes)]
                            property-attributes)]
     (into [property-tx]
     (into [property-tx]

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

@@ -43,8 +43,8 @@
 
 
 (def ref-property-types
 (def ref-property-types
   "User facing ref types. Property values that users see are stored in either
   "User facing ref types. Property values that users see are stored in either
-  :property.value/content, :block/content or :block/original-name.
-  :block/original-name is for all the page related types"
+  :property.value/content, :block/content or :block/title.
+  :block/title is for all the page related types"
   (into #{:page :date :object} value-ref-property-types))
   (into #{:page :date :object} value-ref-property-types))
 
 
 (assert (set/subset? ref-property-types
 (assert (set/subset? ref-property-types
@@ -120,7 +120,7 @@
 (defn- page?
 (defn- page?
   [db val]
   [db val]
   (when-let [ent (d/entity db val)]
   (when-let [ent (d/entity db val)]
-    (some? (:block/original-name ent))))
+    (some? (:block/title ent))))
 
 
 (defn- object-entity?
 (defn- object-entity?
   [db val]
   [db val]
@@ -130,7 +130,7 @@
 (defn- date?
 (defn- date?
   [db val]
   [db val]
   (when-let [ent (d/entity db val)]
   (when-let [ent (d/entity db val)]
-    (and (some? (:block/original-name ent))
+    (and (some? (:block/title ent))
          (contains? (:block/type ent) "journal"))))
          (contains? (:block/type ent) "journal"))))
 
 
 
 

+ 2 - 2
deps/db/src/logseq/db/frontend/rules.cljc

@@ -173,7 +173,7 @@
       [?p ?prop ?pv]
       [?p ?prop ?pv]
       (or [?pv :block/content ?val]
       (or [?pv :block/content ?val]
           [?pv :property.value/content ?val]
           [?pv :property.value/content ?val]
-          [?pv :block/original-name ?val])
+          [?pv :block/title ?val])
       [?prop-e :db/ident ?prop]
       [?prop-e :db/ident ?prop]
       [?prop-e :block/type "property"]]
       [?prop-e :block/type "property"]]
 
 
@@ -189,7 +189,7 @@
       [?b ?prop ?pv]
       [?b ?prop ?pv]
       (or [?pv :block/content ?val]
       (or [?pv :block/content ?val]
           [?pv :property.value/content ?val]
           [?pv :property.value/content ?val]
-          [?pv :block/original-name ?val])
+          [?pv :block/title ?val])
       [(missing? $ ?b :block/name)]
       [(missing? $ ?b :block/name)]
       [?prop-e :db/ident ?prop]
       [?prop-e :db/ident ?prop]
       [?prop-e :block/type "property"]]
       [?prop-e :block/type "property"]]

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

@@ -52,7 +52,6 @@
    :block/alias {:db/valueType :db.type/ref
    :block/alias {:db/valueType :db.type/ref
                  :db/cardinality :db.cardinality/many}
                  :db/cardinality :db.cardinality/many}
 
 
-   ;; full-text for current block
    :block/content {}
    :block/content {}
 
 
    ;; todo keywords, e.g. "TODO", "DOING", "DONE"
    ;; todo keywords, e.g. "TODO", "DOING", "DONE"
@@ -88,7 +87,7 @@
    :block/name {:db/unique :db.unique/identity}
    :block/name {:db/unique :db.unique/identity}
 
 
    ;; page's original name
    ;; page's original name
-   :block/original-name {:db/index true}
+   :block/title {:db/index true}
 
 
    ;; page's journal day
    ;; page's journal day
    :block/journal-day {}
    :block/journal-day {}

+ 22 - 22
deps/db/src/logseq/db/sqlite/build.cljs

@@ -68,7 +68,7 @@
   [pages-and-blocks]
   [pages-and-blocks]
   (->> pages-and-blocks
   (->> pages-and-blocks
        (map :page)
        (map :page)
-       (map (juxt :block/original-name :block/uuid))
+       (map (juxt :block/title :block/uuid))
        (into {})))
        (into {})))
 
 
 (def current-db-id (atom 0))
 (def current-db-id (atom 0))
@@ -132,10 +132,10 @@
                      (let [block-refs (mapv #(hash-map :block/uuid
                      (let [block-refs (mapv #(hash-map :block/uuid
                                                        (or (page-uuids %)
                                                        (or (page-uuids %)
                                                            (throw (ex-info (str "No uuid for page ref name" (pr-str %)) {})))
                                                            (throw (ex-info (str "No uuid for page ref name" (pr-str %)) {})))
-                                                       :block/original-name %)
+                                                       :block/title %)
                                             ref-names)]
                                             ref-names)]
                        {:block/content (db-content/page-ref->special-id-ref (:block/content m) block-refs)
                        {:block/content (db-content/page-ref->special-id-ref (:block/content m) block-refs)
-                        :block/refs (map #(dissoc % :block/original-name) block-refs)})))))))
+                        :block/refs block-refs})))))))
 
 
 (defn- build-properties-tx [properties page-uuids all-idents]
 (defn- build-properties-tx [properties page-uuids all-idents]
   (let [property-db-ids (->> (keys properties)
   (let [property-db-ids (->> (keys properties)
@@ -186,7 +186,7 @@
                        (let [new-block
                        (let [new-block
                              (sqlite-util/build-new-class
                              (sqlite-util/build-new-class
                               {:block/name (common-util/page-name-sanity-lc (name class-name))
                               {:block/name (common-util/page-name-sanity-lc (name class-name))
-                               :block/original-name (name class-name)
+                               :block/title (name class-name)
                                :block/uuid (or (:block/uuid class-m) (d/squuid))
                                :block/uuid (or (:block/uuid class-m) (d/squuid))
                                :db/ident (get-ident all-idents class-name)
                                :db/ident (get-ident all-idents class-name)
                                :db/id (or (class-db-ids class-name)
                                :db/id (or (class-db-ids class-name)
@@ -228,14 +228,14 @@
                         [:build/tags {:optional true} [:vector Class]]]}}
                         [:build/tags {:optional true} [:vector Class]]]}}
    [:page [:and
    [:page [:and
            [:map
            [:map
-            [:block/original-name {:optional true} :string]
+            [:block/title {:optional true} :string]
             [:build/journal {:optional true} :int]
             [:build/journal {:optional true} :int]
             [:build/properties {:optional true} User-properties]
             [:build/properties {:optional true} User-properties]
             [:build/tags {:optional true} [:vector Class]]]
             [:build/tags {:optional true} [:vector Class]]]
-           [:fn {:error/message ":block/original-name or :build/journal required"
-                 :error/path [:block/original-name]}
+           [:fn {:error/message ":block/title or :build/journal required"
+                 :error/path [:block/title]}
             (fn [m]
             (fn [m]
-              (or (:block/original-name m) (:build/journal m)))]]]
+              (or (:block/title m) (:build/journal m)))]]]
    [:blocks {:optional true} [:vector ::block]]])
    [:blocks {:optional true} [:vector ::block]]])
 
 
 (def Properties
 (def Properties
@@ -338,11 +338,11 @@
       (let [new-page (merge
       (let [new-page (merge
                       ;; TODO: Use sqlite-util/build-new-page
                       ;; TODO: Use sqlite-util/build-new-page
                       {:db/id (or (:db/id page) (new-db-id))
                       {:db/id (or (:db/id page) (new-db-id))
-                       :block/original-name (or (:block/original-name page) (string/capitalize (:block/name page)))
-                       :block/name (or (:block/name page) (common-util/page-name-sanity-lc (:block/original-name page)))
+                       :block/title (or (:block/title page) (string/capitalize (:block/name page)))
+                       :block/name (or (:block/name page) (common-util/page-name-sanity-lc (:block/title page)))
                        :block/type #{"page"}
                        :block/type #{"page"}
                        :block/format :markdown}
                        :block/format :markdown}
-                      (dissoc page :build/properties :db/id :block/name :block/original-name :build/tags))
+                      (dissoc page :build/properties :db/id :block/name :block/title :build/tags))
             pvalue-tx-m (->property-value-tx-m new-page (:build/properties page) properties all-idents)]
             pvalue-tx-m (->property-value-tx-m new-page (:build/properties page) properties all-idents)]
         (into
         (into
          ;; page tx
          ;; page tx
@@ -392,7 +392,7 @@
 
 
 (defn- add-new-pages-from-refs
 (defn- add-new-pages-from-refs
   [pages-and-blocks]
   [pages-and-blocks]
-  (let [existing-pages (->> pages-and-blocks (keep #(get-in % [:page :block/original-name])) set)
+  (let [existing-pages (->> pages-and-blocks (keep #(get-in % [:page :block/title])) set)
         new-pages-from-refs
         new-pages-from-refs
         (->> pages-and-blocks
         (->> pages-and-blocks
              (mapcat
              (mapcat
@@ -401,15 +401,15 @@
                      (mapcat #(extract-content-refs (:block/content %)))
                      (mapcat #(extract-content-refs (:block/content %)))
                      (remove existing-pages))))
                      (remove existing-pages))))
              distinct
              distinct
-             (map #(hash-map :page {:block/original-name %})))]
+             (map #(hash-map :page {:block/title %})))]
     (when (seq new-pages-from-refs)
     (when (seq new-pages-from-refs)
-      (println "Building additional pages from content refs:" (pr-str (mapv #(get-in % [:page :block/original-name]) new-pages-from-refs))))
+      (println "Building additional pages from content refs:" (pr-str (mapv #(get-in % [:page :block/title]) new-pages-from-refs))))
     (concat pages-and-blocks new-pages-from-refs)))
     (concat pages-and-blocks new-pages-from-refs)))
 
 
 (defn- add-new-pages-from-properties
 (defn- add-new-pages-from-properties
   [properties pages-and-blocks]
   [properties pages-and-blocks]
   (let [used-properties (get-used-properties-from-options {:pages-and-blocks pages-and-blocks :properties properties})
   (let [used-properties (get-used-properties-from-options {:pages-and-blocks pages-and-blocks :properties properties})
-        existing-pages (->> pages-and-blocks (keep #(get-in % [:page :block/original-name])) set)
+        existing-pages (->> pages-and-blocks (keep #(get-in % [:page :block/title])) set)
         new-pages (->> (mapcat val used-properties)
         new-pages (->> (mapcat val used-properties)
                        (mapcat (fn [val-or-vals]
                        (mapcat (fn [val-or-vals]
                                  (if (coll? val-or-vals)
                                  (if (coll? val-or-vals)
@@ -417,9 +417,9 @@
                                    (when (page-prop-value? val-or-vals) (second val-or-vals)))))
                                    (when (page-prop-value? val-or-vals) (second val-or-vals)))))
                        distinct
                        distinct
                        (remove existing-pages)
                        (remove existing-pages)
-                       (map #(hash-map :page {:block/original-name %})))]
+                       (map #(hash-map :page {:block/title %})))]
     (when (seq new-pages)
     (when (seq new-pages)
-      (println "Building additional pages from property values:" (pr-str (mapv #(get-in % [:page :block/original-name]) new-pages))))
+      (println "Building additional pages from property values:" (pr-str (mapv #(get-in % [:page :block/title]) new-pages))))
     (concat pages-and-blocks new-pages)))
     (concat pages-and-blocks new-pages)))
 
 
 (defn- expand-build-children
 (defn- expand-build-children
@@ -460,7 +460,7 @@
                                      (let [page-name (date-time-util/int->journal-title date-int "MMM do, yyyy")]
                                      (let [page-name (date-time-util/int->journal-title date-int "MMM do, yyyy")]
                                        (-> (dissoc page :build/journal)
                                        (-> (dissoc page :build/journal)
                                            (merge {:block/journal-day date-int
                                            (merge {:block/journal-day date-int
-                                                   :block/original-name page-name
+                                                   :block/title page-name
                                                    :block/uuid (common-uuid/gen-uuid date-int)
                                                    :block/uuid (common-uuid/gen-uuid date-int)
                                                    :block/type #{"journal" "page"}})))))
                                                    :block/type #{"journal" "page"}})))))
                            m))]
                            m))]
@@ -552,8 +552,8 @@
    * :pages-and-blocks - This is a vector of maps containing a :page key and optionally a :blocks
    * :pages-and-blocks - This is a vector of maps containing a :page key and optionally a :blocks
      key when defining a page's blocks. More about each key:
      key when defining a page's blocks. More about each key:
      * :page - This is a datascript attribute map for pages with
      * :page - This is a datascript attribute map for pages with
-       :block/original-name required e.g. `{:block/original/name \"foo\"}`. Additional keys available:
-       * :build/journal - Define a journal pages as an integer e.g. 20240101 is Jan 1, 2024. :block/original-name
+       :block/title required e.g. `{:block/original/name \"foo\"}`. Additional keys available:
+       * :build/journal - Define a journal pages as an integer e.g. 20240101 is Jan 1, 2024. :block/title
          is not required if using this since it generates one
          is not required if using this since it generates one
        * :build/properties - Defines properties on a page
        * :build/properties - Defines properties on a page
      * :blocks - This is a vec of datascript attribute maps for blocks with
      * :blocks - This is a vec of datascript attribute maps for blocks with
@@ -568,7 +568,7 @@
      * :build/closed-values - Define closed values with a vec of maps. A map contains keys :uuid, :value and :icon.
      * :build/closed-values - Define closed values with a vec of maps. A map contains keys :uuid, :value and :icon.
      * :build/schema-classes - Vec of class name keywords. Defines a property's range classes
      * :build/schema-classes - Vec of class name keywords. Defines a property's range classes
    * :classes - This is a map to configure classes where the keys are class name keywords
    * :classes - This is a map to configure classes where the keys are class name keywords
-     and the values are maps of datascript attributes e.g. `{:block/original-name \"Foo\"}`.
+     and the values are maps of datascript attributes e.g. `{:block/title \"Foo\"}`.
      Additional keys available:
      Additional keys available:
      * :build/properties - Define properties on a class page
      * :build/properties - Define properties on a class page
      * :build/class-parent - Add a class parent by its keyword name
      * :build/class-parent - Add a class parent by its keyword name
@@ -598,4 +598,4 @@
         {:keys [init-tx block-props-tx]} (build-blocks-tx options')]
         {:keys [init-tx block-props-tx]} (build-blocks-tx options')]
     (d/transact! conn init-tx)
     (d/transact! conn init-tx)
     (when (seq block-props-tx)
     (when (seq block-props-tx)
-      (d/transact! conn block-props-tx))))
+      (d/transact! conn block-props-tx))))

+ 3 - 3
deps/db/src/logseq/db/sqlite/common_db.cljs

@@ -21,12 +21,12 @@
   (when (and db (string? page-name))
   (when (and db (string? page-name))
     (first (sort (map :e (get-pages-by-name db page-name))))))
     (first (sort (map :e (get-pages-by-name db page-name))))))
 
 
-(defn get-first-page-by-original-name
-  "Return the oldest page's db id for :block/original-name"
+(defn get-first-page-by-title
+  "Return the oldest page's db id for :block/title"
   [db page-name]
   [db page-name]
   {:pre [(string? page-name)]}
   {:pre [(string? page-name)]}
   (first (sort (map :e
   (first (sort (map :e
-                    (d/datoms db :avet :block/original-name page-name)))))
+                    (d/datoms db :avet :block/title page-name)))))
 
 
 (comment
 (comment
   (defn- get-built-in-files
   (defn- get-built-in-files

+ 8 - 8
deps/db/src/logseq/db/sqlite/create_graph.cljs

@@ -14,8 +14,8 @@
 (defn build-initial-properties*
 (defn build-initial-properties*
   [built-in-properties]
   [built-in-properties]
   (mapcat
   (mapcat
-   (fn [[db-ident {:keys [schema original-name closed-values] :as m}]]
-     (let [prop-name (or original-name (name (:name m)))
+   (fn [[db-ident {:keys [schema title closed-values] :as m}]]
+     (let [prop-name (or title (name (:name m)))
            blocks (if closed-values
            blocks (if closed-values
                     (db-property-build/build-closed-values
                     (db-property-build/build-closed-values
                      db-ident
                      db-ident
@@ -25,7 +25,7 @@
                     [(sqlite-util/build-new-property
                     [(sqlite-util/build-new-property
                       db-ident
                       db-ident
                       schema
                       schema
-                      {:original-name prop-name})])]
+                      {:title prop-name})])]
        blocks))
        blocks))
    (dissoc built-in-properties :logseq.property/built-in?)))
    (dissoc built-in-properties :logseq.property/built-in?)))
 
 
@@ -37,7 +37,7 @@
         built-in-property (sqlite-util/build-new-property
         built-in-property (sqlite-util/build-new-property
                            :logseq.property/built-in?
                            :logseq.property/built-in?
                            built-in-property-schema
                            built-in-property-schema
-                           {:original-name (name :logseq.property/built-in?)})
+                           {:title (name :logseq.property/built-in?)})
         built-in-prop-value (db-property-build/build-property-value-block
         built-in-prop-value (db-property-build/build-property-value-block
                              {:db/id [:block/uuid (:block/uuid built-in-property)]}
                              {:db/id [:block/uuid (:block/uuid built-in-property)]}
                              {:db/ident :logseq.property/built-in?
                              {:db/ident :logseq.property/built-in?
@@ -84,8 +84,8 @@
 
 
 (defn- build-initial-classes [db-ident->properties built-in-prop-value]
 (defn- build-initial-classes [db-ident->properties built-in-prop-value]
   (map
   (map
-   (fn [[db-ident {:keys [schema original-name]}]]
-     (let [original-name' (or original-name (name db-ident))]
+   (fn [[db-ident {:keys [schema title]}]]
+     (let [title' (or title (name db-ident))]
        (mark-block-as-built-in
        (mark-block-as-built-in
         (sqlite-util/build-new-class
         (sqlite-util/build-new-class
          (let [properties (mapv
          (let [properties (mapv
@@ -95,8 +95,8 @@
                                db-ident))
                                db-ident))
                            (:properties schema))]
                            (:properties schema))]
            (cond->
            (cond->
-            {:block/original-name original-name'
-             :block/name (common-util/page-name-sanity-lc original-name')
+            {:block/title title'
+             :block/name (common-util/page-name-sanity-lc title')
              :db/ident db-ident
              :db/ident db-ident
              :block/uuid (d/squuid)}
              :block/uuid (d/squuid)}
              (seq properties)
              (seq properties)

+ 5 - 5
deps/db/src/logseq/db/sqlite/util.cljs

@@ -75,15 +75,15 @@
 (defn build-new-property
 (defn build-new-property
   "Build a standard new property so that it is is consistent across contexts. Takes
   "Build a standard new property so that it is is consistent across contexts. Takes
    an optional map with following keys:
    an optional map with following keys:
-   * :original-name - Case sensitive property name. Defaults to deriving this from db-ident
+   * :title - Case sensitive property name. Defaults to deriving this from db-ident
    * :block-uuid - :block/uuid for property"
    * :block-uuid - :block/uuid for property"
   ([db-ident prop-schema] (build-new-property db-ident prop-schema {}))
   ([db-ident prop-schema] (build-new-property db-ident prop-schema {}))
-  ([db-ident prop-schema {:keys [original-name block-uuid ref-type?]}]
+  ([db-ident prop-schema {:keys [title block-uuid ref-type?]}]
    (assert (keyword? db-ident))
    (assert (keyword? db-ident))
    (let [db-ident' (if (qualified-keyword? db-ident)
    (let [db-ident' (if (qualified-keyword? db-ident)
                      db-ident
                      db-ident
                      (db-property/create-user-property-ident-from-name (name db-ident)))
                      (db-property/create-user-property-ident-from-name (name db-ident)))
-         prop-name (or original-name (name db-ident'))
+         prop-name (or title (name db-ident'))
          classes (:classes prop-schema)
          classes (:classes prop-schema)
          prop-schema (assoc prop-schema :type (get prop-schema :type :default))]
          prop-schema (assoc prop-schema :type (get prop-schema :type :default))]
      (block-with-timestamps
      (block-with-timestamps
@@ -94,7 +94,7 @@
         :block/schema (merge {:type :default} (dissoc prop-schema :classes :cardinality))
         :block/schema (merge {:type :default} (dissoc prop-schema :classes :cardinality))
         :block/name (common-util/page-name-sanity-lc (name prop-name))
         :block/name (common-util/page-name-sanity-lc (name prop-name))
         :block/uuid (or block-uuid (d/squuid))
         :block/uuid (or block-uuid (d/squuid))
-        :block/original-name (name prop-name)
+        :block/title (name prop-name)
         :db/index true
         :db/index true
         :db/cardinality (if (= :many (:cardinality prop-schema))
         :db/cardinality (if (= :many (:cardinality prop-schema))
                           :db.cardinality/many
                           :db.cardinality/many
@@ -121,7 +121,7 @@
   [page-name]
   [page-name]
   (block-with-timestamps
   (block-with-timestamps
    {:block/name (common-util/page-name-sanity-lc page-name)
    {:block/name (common-util/page-name-sanity-lc page-name)
-    :block/original-name page-name
+    :block/title page-name
     :block/uuid (d/squuid)
     :block/uuid (d/squuid)
     :block/format :markdown
     :block/format :markdown
     :block/type #{"page"}}))
     :block/type #{"page"}}))

+ 2 - 2
deps/db/test/logseq/db/frontend/content_test.cljs

@@ -7,5 +7,5 @@
     (is (= "string [[~^foo]] string2 [[~^foo-bar]]"
     (is (= "string [[~^foo]] string2 [[~^foo-bar]]"
            (db-content/replace-tags-with-page-refs
            (db-content/replace-tags-with-page-refs
             "string #foo string2 #foo-bar"
             "string #foo string2 #foo-bar"
-            [{:block/original-name "foo" :block/uuid "foo"}
-             {:block/original-name "foo-bar" :block/uuid "foo-bar"}])))))
+            [{:block/title "foo" :block/uuid "foo"}
+             {:block/title "foo-bar" :block/uuid "foo-bar"}])))))

+ 2 - 2
deps/db/test/logseq/db/frontend/inputs_test.cljs

@@ -19,7 +19,7 @@
   (let [conn (d/create-conn db-schema/schema-for-db-based-graph)
   (let [conn (d/create-conn db-schema/schema-for-db-based-graph)
         _ (sqlite-build/create-blocks
         _ (sqlite-build/create-blocks
            conn
            conn
-           [{:page {:block/original-name "page1"}
+           [{:page {:block/title "page1"}
              :blocks [{:block/content "parent"
              :blocks [{:block/content "parent"
                        :build/children
                        :build/children
                        [{:block/content "child 1"}
                        [{:block/content "child 1"}
@@ -221,4 +221,4 @@
           ":+1d and today resolve to correct journal range")
           ":+1d and today resolve to correct journal range")
 
 
       (is (= ["+1d" "now"] (blocks-journaled-between-inputs db :today :today/+1d))
       (is (= ["+1d" "now"] (blocks-journaled-between-inputs db :today :today/+1d))
-          ":today/+1d and today resolve to correct journal range"))))
+          ":today/+1d and today resolve to correct journal range"))))

+ 28 - 28
deps/db/test/logseq/db/frontend/rules_test.cljs

@@ -24,22 +24,22 @@
            {:properties {:foo {:block/schema {:type :default}}
            {:properties {:foo {:block/schema {:type :default}}
                          :foo2 {:block/schema {:type :default}}}
                          :foo2 {:block/schema {:type :default}}}
             :pages-and-blocks
             :pages-and-blocks
-            [{:page {:block/original-name "Page"
+            [{:page {:block/title "Page"
                      :build/properties {:foo "bar"}}}]})]
                      :build/properties {:foo "bar"}}}]})]
-        
+
     (is (= ["Page"]
     (is (= ["Page"]
-           (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (has-page-property ?b :user.property/foo)]
+           (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (has-page-property ?b :user.property/foo)]
                               @conn)
                               @conn)
-                (map (comp :block/original-name first))))
+                (map (comp :block/title first))))
         "has-page-property returns result when page has property")
         "has-page-property returns result when page has property")
     (is (= []
     (is (= []
-           (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (has-page-property ?b :user.property/foo2)]
+           (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (has-page-property ?b :user.property/foo2)]
                               @conn)
                               @conn)
-                (map (comp :block/original-name first))))
+                (map (comp :block/title first))))
         "has-page-property returns no result when page doesn't have property")
         "has-page-property returns no result when page doesn't have property")
     (is (= [:user.property/foo]
     (is (= [:user.property/foo]
            (q-with-rules '[:find [?p ...]
            (q-with-rules '[:find [?p ...]
-                           :where (has-page-property ?b ?p) [?b :block/original-name "Page"]]
+                           :where (has-page-property ?b ?p) [?b :block/title "Page"]]
                          @conn))
                          @conn))
         "has-page-property can bind to property arg")))
         "has-page-property can bind to property arg")))
 
 
@@ -52,42 +52,42 @@
                          :number-many {:block/schema {:type :number :cardinality :many}}
                          :number-many {:block/schema {:type :number :cardinality :many}}
                          :page-many {:block/schema {:type :page :cardinality :many}}}
                          :page-many {:block/schema {:type :page :cardinality :many}}}
             :pages-and-blocks
             :pages-and-blocks
-            [{:page {:block/original-name "Page"
+            [{:page {:block/title "Page"
                      :build/properties {:foo "bar" :number-many #{5 10} :page-many #{[:page "Page A"]}}}}
                      :build/properties {:foo "bar" :number-many #{5 10} :page-many #{[:page "Page A"]}}}}
-             {:page {:block/original-name "Page A"
+             {:page {:block/title "Page A"
                      :build/properties {:foo "bar A"}}}]})]
                      :build/properties {:foo "bar A"}}}]})]
     (testing "cardinality :one property"
     (testing "cardinality :one property"
         (is (= ["Page"]
         (is (= ["Page"]
-               (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (page-property ?b :user.property/foo "bar")]
+               (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (page-property ?b :user.property/foo "bar")]
                                   @conn)
                                   @conn)
-                    (map (comp :block/original-name first))))
+                    (map (comp :block/title first))))
             "page-property returns result when page has property")
             "page-property returns result when page has property")
         (is (= []
         (is (= []
-               (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (page-property ?b :user.property/foo "baz")]
+               (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (page-property ?b :user.property/foo "baz")]
                                   @conn)
                                   @conn)
-                    (map (comp :block/original-name first))))
+                    (map (comp :block/title first))))
             "page-property returns no result when page doesn't have property value")
             "page-property returns no result when page doesn't have property value")
         (is (= #{:user.property/foo}
         (is (= #{:user.property/foo}
                (->> (q-with-rules '[:find [?p ...]
                (->> (q-with-rules '[:find [?p ...]
-                                    :where (page-property ?b ?p "bar") [?b :block/original-name "Page"]]
+                                    :where (page-property ?b ?p "bar") [?b :block/title "Page"]]
                                   @conn)
                                   @conn)
                     set))
                     set))
             "page-property can bind to property arg with bound property value"))
             "page-property can bind to property arg with bound property value"))
 
 
     (testing "cardinality :many property"
     (testing "cardinality :many property"
       (is (= ["Page"]
       (is (= ["Page"]
-             (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (page-property ?b :user.property/number-many 5)]
+             (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (page-property ?b :user.property/number-many 5)]
                                 @conn)
                                 @conn)
-                  (map (comp :block/original-name first))))
+                  (map (comp :block/title first))))
           "page-property returns result when page has property")
           "page-property returns result when page has property")
       (is (= []
       (is (= []
-             (->> (q-with-rules '[:find (pull ?b [:block/original-name]) :where (page-property ?b :user.property/number-many 20)]
+             (->> (q-with-rules '[:find (pull ?b [:block/title]) :where (page-property ?b :user.property/number-many 20)]
                                 @conn)
                                 @conn)
-                  (map (comp :block/original-name first))))
+                  (map (comp :block/title first))))
           "page-property returns no result when page doesn't have property value")
           "page-property returns no result when page doesn't have property value")
       (is (= #{:user.property/number-many}
       (is (= #{:user.property/number-many}
              (->> (q-with-rules '[:find [?p ...]
              (->> (q-with-rules '[:find [?p ...]
-                                  :where (page-property ?b ?p 5) [?b :block/original-name "Page"]]
+                                  :where (page-property ?b ?p 5) [?b :block/title "Page"]]
                                 @conn)
                                 @conn)
                   set))
                   set))
           "page-property can bind to property arg with bound property value"))
           "page-property can bind to property arg with bound property value"))
@@ -95,22 +95,22 @@
     ;; NOTE: Querying a ref's name is different than before and requires more than just the rule
     ;; NOTE: Querying a ref's name is different than before and requires more than just the rule
     (testing ":ref property"
     (testing ":ref property"
         (is (= ["Page"]
         (is (= ["Page"]
-               (->> (q-with-rules '[:find (pull ?b [:block/original-name])
+               (->> (q-with-rules '[:find (pull ?b [:block/title])
                                     :where (page-property ?b :user.property/page-many "Page A")]
                                     :where (page-property ?b :user.property/page-many "Page A")]
                                   @conn)
                                   @conn)
-                    (map (comp :block/original-name first))))
+                    (map (comp :block/title first))))
             "page-property returns result when page has property")
             "page-property returns result when page has property")
         (is (= []
         (is (= []
-               (->> (q-with-rules '[:find (pull ?b [:block/original-name])
-                                    :where [?b :user.property/page-many ?pv] [?pv :block/original-name "Page B"]]
+               (->> (q-with-rules '[:find (pull ?b [:block/title])
+                                    :where [?b :user.property/page-many ?pv] [?pv :block/title "Page B"]]
                                   @conn)
                                   @conn)
-                    (map (comp :block/original-name first))))
+                    (map (comp :block/title first))))
             "page-property returns no result when page doesn't have property value"))
             "page-property returns no result when page doesn't have property value"))
 
 
     (testing "bindings with property value"
     (testing "bindings with property value"
         (is (= #{:user.property/foo :user.property/number-many :user.property/page-many}
         (is (= #{:user.property/foo :user.property/number-many :user.property/page-many}
                (->> (q-with-rules '[:find [?p ...]
                (->> (q-with-rules '[:find [?p ...]
-                                    :where (page-property ?b ?p _) [?b :block/original-name "Page"]]
+                                    :where (page-property ?b ?p _) [?b :block/title "Page"]]
                                   @conn)
                                   @conn)
                     set))
                     set))
             "page-property can bind to property arg with unbound property value")
             "page-property can bind to property arg with unbound property value")
@@ -119,16 +119,16 @@
                  [:user.property/foo "bar"]
                  [:user.property/foo "bar"]
                  [:user.property/page-many "Page A"]}
                  [:user.property/page-many "Page A"]}
                (->> (q-with-rules '[:find ?p ?v
                (->> (q-with-rules '[:find ?p ?v
-                                    :where (page-property ?b ?p ?v) [?b :block/original-name "Page"]]
+                                    :where (page-property ?b ?p ?v) [?b :block/title "Page"]]
                                   @conn)
                                   @conn)
                     set))
                     set))
             "page-property can bind to property and property value args")
             "page-property can bind to property and property value args")
         (is (= #{"Page"}
         (is (= #{"Page"}
-               (->> (q-with-rules '[:find (pull ?b [:block/original-name])
+               (->> (q-with-rules '[:find (pull ?b [:block/title])
                                     :where
                                     :where
                                     [?b :user.property/page-many ?pv]
                                     [?b :user.property/page-many ?pv]
                                     (page-property ?pv :user.property/foo "bar A")]
                                     (page-property ?pv :user.property/foo "bar A")]
                                   @conn)
                                   @conn)
-                    (map (comp :block/original-name first))
+                    (map (comp :block/title first))
                     set))
                     set))
             "page-property can be used multiple times to query a property value's property"))))
             "page-property can be used multiple times to query a property value's property"))))

+ 13 - 13
deps/db/test/logseq/db/sqlite/build_test.cljs

@@ -11,18 +11,18 @@
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (sqlite-build/create-blocks
         _ (sqlite-build/create-blocks
            conn
            conn
-           [{:page {:block/original-name "page1"}
+           [{:page {:block/title "page1"}
              :blocks [{:block/content "Jrue Holiday" :build/tags [:Person]}]}
              :blocks [{:block/content "Jrue Holiday" :build/tags [:Person]}]}
-            {:page {:block/original-name "Jayson Tatum" :build/tags [:Person]}}])]
-    (is (= {:block/tags [{:block/original-name "Person", :block/type ["class" "page"]}]}
-           (first (d/q '[:find [(pull ?b [{:block/tags [:block/original-name :block/type]}]) ...]
+            {:page {:block/title "Jayson Tatum" :build/tags [:Person]}}])]
+    (is (= {:block/tags [{:block/title "Person", :block/type ["class" "page"]}]}
+           (first (d/q '[:find [(pull ?b [{:block/tags [:block/title :block/type]}]) ...]
                          :where [?b :block/content "Jrue Holiday"]]
                          :where [?b :block/content "Jrue Holiday"]]
                        @conn)))
                        @conn)))
         "Person class is created and correctly associated to a block")
         "Person class is created and correctly associated to a block")
 
 
-    (is (= {:block/tags [{:block/original-name "Person", :block/type ["class" "page"]}]}
-           (first (d/q '[:find [(pull ?b [{:block/tags [:block/original-name :block/type]}]) ...]
-                         :where [?b :block/original-name "Jayson Tatum"]]
+    (is (= {:block/tags [{:block/title "Person", :block/type ["class" "page"]}]}
+           (first (d/q '[:find [(pull ?b [{:block/tags [:block/title :block/type]}]) ...]
+                         :where [?b :block/title "Jayson Tatum"]]
                        @conn)))
                        @conn)))
         "Person class is created and correctly associated to a page")))
         "Person class is created and correctly associated to a page")))
 
 
@@ -31,9 +31,9 @@
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (sqlite-build/create-blocks
         _ (sqlite-build/create-blocks
            conn
            conn
-           [{:page {:block/original-name "page1"}
+           [{:page {:block/title "page1"}
              :blocks [{:block/content "Jrue Holiday" :build/properties {:description "Clutch defense"}}]}
              :blocks [{:block/content "Jrue Holiday" :build/properties {:description "Clutch defense"}}]}
-            {:page {:block/original-name "Jayson Tatum" :build/properties {:description "Awesome selfless basketball"}}}])]
+            {:page {:block/title "Jayson Tatum" :build/properties {:description "Awesome selfless basketball"}}}])]
     (is (= "Clutch defense"
     (is (= "Clutch defense"
            (->> @conn
            (->> @conn
                 (d/q '[:find [(pull ?b [*]) ...]
                 (d/q '[:find [(pull ?b [*]) ...]
@@ -46,18 +46,18 @@
     (is (= "Awesome selfless basketball"
     (is (= "Awesome selfless basketball"
            (->> @conn
            (->> @conn
                 (d/q '[:find [(pull ?b [*]) ...]
                 (d/q '[:find [(pull ?b [*]) ...]
-                       :where [?b :block/original-name "Jayson Tatum"]])
+                       :where [?b :block/title "Jayson Tatum"]])
                 first
                 first
                 :user.property/description
                 :user.property/description
                 (db-property/ref->property-value-contents @conn)))
                 (db-property/ref->property-value-contents @conn)))
         "description property is created and correctly associated to a page")))
         "description property is created and correctly associated to a page")))
-        
+
 (deftest build-properties-built-in
 (deftest build-properties-built-in
   (let [conn (d/create-conn db-schema/schema-for-db-based-graph)
   (let [conn (d/create-conn db-schema/schema-for-db-based-graph)
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
         _ (sqlite-build/create-blocks
         _ (sqlite-build/create-blocks
            conn
            conn
-           [{:page {:block/original-name "page1"}
+           [{:page {:block/title "page1"}
              :blocks [{:block/content "some todo"
              :blocks [{:block/content "some todo"
                        :build/properties {:logseq.task/status :logseq.task/status.doing}}
                        :build/properties {:logseq.task/status :logseq.task/status.doing}}
                       {:block/content "some slide"
                       {:block/content "some slide"
@@ -78,4 +78,4 @@
                 first
                 first
                 :logseq.property/background-image
                 :logseq.property/background-image
                 (db-property/ref->property-value-contents @conn)))
                 (db-property/ref->property-value-contents @conn)))
-        "built-in :default property is created and correctly associated to a block")))
+        "built-in :default property is created and correctly associated to a block")))

+ 1 - 1
deps/db/test/logseq/db/sqlite/common_db_test.cljs

@@ -53,7 +53,7 @@
                    :block/uuid page-uuid
                    :block/uuid page-uuid
                    :block/journal-day date-int
                    :block/journal-day date-int
                    :block/name (string/lower-case date-title)
                    :block/name (string/lower-case date-title)
-                   :block/original-name date-title
+                   :block/title date-title
                    :block/created-at created-at
                    :block/created-at created-at
                    :block/updated-at created-at}
                    :block/updated-at created-at}
                   {:db/id 100002
                   {:db/id 100002

+ 2 - 2
deps/db/test/logseq/db/sqlite/create_graph_test.cljs

@@ -89,10 +89,10 @@
        conn
        conn
        {:properties {:url {:block/schema {:type :url}}}
        {:properties {:url {:block/schema {:type :url}}}
         :pages-and-blocks
         :pages-and-blocks
-        [{:page {:block/original-name "page1"}
+        [{:page {:block/title "page1"}
           :blocks [{:block/content "b1" :build/properties {:url "https://logseq.com"}}
           :blocks [{:block/content "b1" :build/properties {:url "https://logseq.com"}}
                    ;; :url macros are used for consistently building urls with the same hostname e.g. docs graph
                    ;; :url macros are used for consistently building urls with the same hostname e.g. docs graph
                    {:block/content "b2" :build/properties {:url "{{docs-base-url test}}"}}]}]})
                    {:block/content "b2" :build/properties {:url "{{docs-base-url test}}"}}]}]})
 
 
       (is (empty? (map :entity (:errors (db-validate/validate-db! @conn))))
       (is (empty? (map :entity (:errors (db-validate/validate-db! @conn))))
-          "Graph with different :url blocks has no validation errors"))))
+          "Graph with different :url blocks has no validation errors"))))

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

@@ -318,10 +318,10 @@
                                    (if class?
                                    (if class?
                                      (ldb/get-case-page db original-page-name)
                                      (ldb/get-case-page db original-page-name)
                                      (ldb/get-page db original-page-name)))
                                      (ldb/get-page db original-page-name)))
-                     original-page-name (or from-page (:block/original-name page-entity) original-page-name)]
+                     original-page-name (or from-page (:block/title page-entity) original-page-name)]
                  (merge
                  (merge
                   {:block/name page-name
                   {:block/name page-name
-                   :block/original-name original-page-name}
+                   :block/title original-page-name}
                   (let [new-uuid* (if (uuid? page-uuid)
                   (let [new-uuid* (if (uuid? page-uuid)
                                     page-uuid
                                     page-uuid
                                     (if journal-day (common-uuid/gen-uuid journal-day) (common-uuid/gen-uuid)))
                                     (if journal-day (common-uuid/gen-uuid journal-day) (common-uuid/gen-uuid)))
@@ -391,7 +391,7 @@
                               children-pages (when-not db-based?
                               children-pages (when-not db-based?
                                                (->> (mapcat (fn [p]
                                                (->> (mapcat (fn [p]
                                                               (let [p (if (map? p)
                                                               (let [p (if (map? p)
-                                                                        (:block/original-name p)
+                                                                        (:block/title p)
                                                                         p)]
                                                                         p)]
                                                                 (when (string? p)
                                                                 (when (string? p)
                                                                   (let [p (or (text/get-nested-page-name p) p)]
                                                                   (let [p (or (text/get-nested-page-name p) p)]
@@ -520,7 +520,7 @@
                          property-refs (->> (get-page-refs-from-properties
                          property-refs (->> (get-page-refs-from-properties
                                              properties db date-formatter
                                              properties db date-formatter
                                              user-config)
                                              user-config)
-                                            (map :block/original-name))
+                                            (map :block/title))
                          pre-block? (if (:heading properties) false true)
                          pre-block? (if (:heading properties) false true)
                          block {:block/uuid id
                          block {:block/uuid id
                                 :block/content content
                                 :block/content content

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

@@ -22,7 +22,7 @@
 (defn- page-title->block
 (defn- page-title->block
   [title]
   [title]
   {:block/name (string/lower-case title)
   {:block/name (string/lower-case title)
-   :block/original-name title
+   :block/title title
    :block/uuid (random-uuid)})
    :block/uuid (random-uuid)})
 
 
 (def built-in-pages
 (def built-in-pages

+ 18 - 18
deps/graph-parser/src/logseq/graph_parser/exporter.cljs

@@ -50,7 +50,7 @@
   (if-let [new-class (:block.temp/new-class tag-block)]
   (if-let [new-class (:block.temp/new-class tag-block)]
     (merge (db-class/build-new-class
     (merge (db-class/build-new-class
             db
             db
-            {:block/original-name new-class
+            {:block/title new-class
              :block/name (common-util/page-name-sanity-lc new-class)})
              :block/name (common-util/page-name-sanity-lc new-class)})
            (when-let [existing-tag-uuid (get page-names-to-uuids (common-util/page-name-sanity-lc new-class))]
            (when-let [existing-tag-uuid (get page-names-to-uuids (common-util/page-name-sanity-lc new-class))]
              {:block/uuid existing-tag-uuid}))
              {:block/uuid existing-tag-uuid}))
@@ -115,7 +115,7 @@
                   content-without-tags-ignore-case
                   content-without-tags-ignore-case
                   (->> original-tags
                   (->> original-tags
                        (filter #(tag-classes (:block/name %)))
                        (filter #(tag-classes (:block/name %)))
-                       (map :block/original-name)))
+                       (map :block/title)))
           (update :block/content
           (update :block/content
                   db-content/replace-tags-with-page-refs
                   db-content/replace-tags-with-page-refs
                   (->> original-tags
                   (->> original-tags
@@ -149,10 +149,10 @@
           (update :block/content string/replace-first (re-pattern (str marker "\\s*")) "")
           (update :block/content string/replace-first (re-pattern (str marker "\\s*")) "")
           (update :block/tags (fnil conj []) :logseq.class/task)
           (update :block/tags (fnil conj []) :logseq.class/task)
           (update :block/refs (fn [refs]
           (update :block/refs (fn [refs]
-                                (into (remove #(= marker (:block/original-name %)) refs)
+                                (into (remove #(= marker (:block/title %)) refs)
                                       [:logseq.class/task :logseq.task/status status-ident])))
                                       [:logseq.class/task :logseq.task/status status-ident])))
           (update :block/path-refs (fn [refs]
           (update :block/path-refs (fn [refs]
-                                     (into (remove #(= marker (:block/original-name %)) refs)
+                                     (into (remove #(= marker (:block/title %)) refs)
                                            [:logseq.class/task :logseq.task/status status-ident])))
                                            [:logseq.class/task :logseq.task/status status-ident])))
           (dissoc :block/marker)))
           (dissoc :block/marker)))
     block))
     block))
@@ -171,10 +171,10 @@
           (assoc :logseq.task/priority priority-value)
           (assoc :logseq.task/priority priority-value)
           (update :block/content string/replace-first (re-pattern (str "\\[#" priority "\\]" "\\s*")) "")
           (update :block/content string/replace-first (re-pattern (str "\\[#" priority "\\]" "\\s*")) "")
           (update :block/refs (fn [refs]
           (update :block/refs (fn [refs]
-                                (into (remove #(= priority (:block/original-name %)) refs)
+                                (into (remove #(= priority (:block/title %)) refs)
                                       [:logseq.task/priority priority-value])))
                                       [:logseq.task/priority priority-value])))
           (update :block/path-refs (fn [refs]
           (update :block/path-refs (fn [refs]
-                                     (into (remove #(= priority (:block/original-name %)) refs)
+                                     (into (remove #(= priority (:block/title %)) refs)
                                            [:logseq.task/priority priority-value])))
                                            [:logseq.task/priority priority-value])))
           (dissoc :block/priority)))
           (dissoc :block/priority)))
     block))
     block))
@@ -252,7 +252,7 @@
                              (seq prop-val)
                              (seq prop-val)
                              (set/subset? prop-val
                              (set/subset? prop-val
                                           (set (keep #(when (contains? (:block/type %) "journal")
                                           (set (keep #(when (contains? (:block/type %) "journal")
-                                                        (:block/original-name %)) refs))))
+                                                        (:block/title %)) refs))))
                         :date
                         :date
                         (and (coll? prop-val) (seq prop-val) (text-with-refs? prop-val prop-val-text))
                         (and (coll? prop-val) (seq prop-val) (text-with-refs? prop-val prop-val-text))
                         :default
                         :default
@@ -543,7 +543,7 @@
                        (when (> (count parent-classes-from-properties) 1)
                        (when (> (count parent-classes-from-properties) 1)
                          (log-fn :skipped-parent-classes "Only one parent class is allowed so skipped ones after the first one" :classes parent-classes-from-properties))
                          (log-fn :skipped-parent-classes "Only one parent class is allowed so skipped ones after the first one" :classes parent-classes-from-properties))
                        (sqlite-util/build-new-class
                        (sqlite-util/build-new-class
-                        {:block/original-name new-class
+                        {:block/title new-class
                          :block/uuid (or (get-pid db new-class) (d/squuid))
                          :block/uuid (or (get-pid db new-class) (d/squuid))
                          :block/name (common-util/page-name-sanity-lc new-class)})))))
                          :block/name (common-util/page-name-sanity-lc new-class)})))))
           (dissoc block* :block/properties))]
           (dissoc block* :block/properties))]
@@ -637,10 +637,10 @@
 (defn- build-new-page
 (defn- build-new-page
   [m db tag-classes page-names-to-uuids]
   [m db tag-classes page-names-to-uuids]
   (-> m
   (-> m
-      ;; Fix pages missing :block/original-name. Shouldn't happen
+      ;; Fix pages missing :block/title. Shouldn't happen
       ((fn [m']
       ((fn [m']
-         (if-not (:block/original-name m')
-           (assoc m' :block/original-name (:block/name m'))
+         (if-not (:block/title m')
+           (assoc m' :block/title (:block/name m'))
            m')))
            m')))
       add-missing-timestamps
       add-missing-timestamps
       ;; TODO: org-mode content needs to be handled
       ;; TODO: org-mode content needs to be handled
@@ -670,14 +670,14 @@
         pages-tx (keep (fn [m]
         pages-tx (keep (fn [m]
                          (if-let [page-uuid (existing-page-names-to-uuids (:block/name m))]
                          (if-let [page-uuid (existing-page-names-to-uuids (:block/name m))]
                            (let [;; These attributes are not allowed to be transacted because they must not change across files
                            (let [;; These attributes are not allowed to be transacted because they must not change across files
-                                 disallowed-attributes [:block/name :block/uuid :block/format :block/original-name :block/journal-day
+                                 disallowed-attributes [:block/name :block/uuid :block/format :block/title :block/journal-day
                                                         :block/created-at :block/updated-at]
                                                         :block/created-at :block/updated-at]
                                  allowed-attributes (into [:block/tags :block/alias :class/parent :block/type :block/namespace]
                                  allowed-attributes (into [:block/tags :block/alias :class/parent :block/type :block/namespace]
                                                           (keep #(when (db-malli-schema/user-property? (key %)) (key %))
                                                           (keep #(when (db-malli-schema/user-property? (key %)) (key %))
                                                                 m))
                                                                 m))
                                  block-changes (select-keys m allowed-attributes)]
                                  block-changes (select-keys m allowed-attributes)]
                              (when-let [ignored-attrs (not-empty (apply dissoc m (into disallowed-attributes allowed-attributes)))]
                              (when-let [ignored-attrs (not-empty (apply dissoc m (into disallowed-attributes allowed-attributes)))]
-                               (notify-user {:msg (str "Import ignored the following attributes on page " (pr-str (:block/original-name m)) ": "
+                               (notify-user {:msg (str "Import ignored the following attributes on page " (pr-str (:block/title m)) ": "
                                                        ignored-attrs)}))
                                                        ignored-attrs)}))
                              (when (seq block-changes)
                              (when (seq block-changes)
                                (cond-> (merge block-changes {:block/uuid page-uuid})
                                (cond-> (merge block-changes {:block/uuid page-uuid})
@@ -802,11 +802,11 @@
         _ (when (seq new-properties) (prn :new-properties new-properties))
         _ (when (seq new-properties) (prn :new-properties new-properties))
         [properties-tx pages-tx'] ((juxt filter remove)
         [properties-tx pages-tx'] ((juxt filter remove)
                                    #(contains? new-properties (keyword (:block/name %))) pages-tx)
                                    #(contains? new-properties (keyword (:block/name %))) pages-tx)
-        property-pages-tx (map (fn [{:block/keys [original-name uuid]}]
-                                 (let [db-ident (get @(:all-idents import-state) (keyword original-name))]
+        property-pages-tx (map (fn [{:block/keys [title uuid]}]
+                                 (let [db-ident (get @(:all-idents import-state) (keyword title))]
                                    (sqlite-util/build-new-property db-ident
                                    (sqlite-util/build-new-property db-ident
-                                                                   (get @(:property-schemas import-state) (keyword original-name))
-                                                                   {:original-name original-name :block-uuid uuid})))
+                                                                   (get @(:property-schemas import-state) (keyword title))
+                                                                   {:title title :block-uuid uuid})))
                                properties-tx)
                                properties-tx)
         converted-property-pages-tx
         converted-property-pages-tx
         (map (fn [kw-name]
         (map (fn [kw-name]
@@ -814,7 +814,7 @@
                      db-ident (get @(:all-idents import-state) kw-name)
                      db-ident (get @(:all-idents import-state) kw-name)
                      new-prop (sqlite-util/build-new-property db-ident
                      new-prop (sqlite-util/build-new-property db-ident
                                                               (get @(:property-schemas import-state) kw-name)
                                                               (get @(:property-schemas import-state) kw-name)
-                                                              {:original-name (name kw-name)})]
+                                                              {:title (name kw-name)})]
                  (assert existing-page-uuid)
                  (assert existing-page-uuid)
                  (merge (select-keys new-prop [:block/type :block/schema :db/ident :db/index :db/cardinality :db/valueType])
                  (merge (select-keys new-prop [:block/type :block/schema :db/ident :db/index :db/cardinality :db/valueType])
                         {:block/uuid existing-page-uuid})))
                         {:block/uuid existing-page-uuid})))

+ 7 - 7
deps/graph-parser/src/logseq/graph_parser/extract.cljc

@@ -135,7 +135,7 @@
                   (fn [alias]
                   (fn [alias]
                     (let [page-name (common-util/page-name-sanity-lc alias)]
                     (let [page-name (common-util/page-name-sanity-lc alias)]
                       {:block/name page-name
                       {:block/name page-name
-                       :block/original-name alias}))
+                       :block/title alias}))
                   aliases)
                   aliases)
         result (cond-> page-m
         result (cond-> page-m
                  (seq aliases')
                  (seq aliases')
@@ -146,7 +146,7 @@
                                           tags (if (coll? tags) tags [(str tags)])
                                           tags (if (coll? tags) tags [(str tags)])
                                           tags (remove string/blank? tags)]
                                           tags (remove string/blank? tags)]
                                       (map (fn [tag] {:block/name (common-util/page-name-sanity-lc tag)
                                       (map (fn [tag] {:block/name (common-util/page-name-sanity-lc tag)
-                                                      :block/original-name tag})
+                                                      :block/title tag})
                                            tags))))]
                                            tags))))]
     (update result :block/properties #(apply dissoc % gp-property/editable-linkable-built-in-properties))))
     (update result :block/properties #(apply dissoc % gp-property/editable-linkable-built-in-properties))))
 
 
@@ -239,7 +239,7 @@
             [properties [] {}])
             [properties [] {}])
           page-map (build-page-map properties invalid-properties properties-text-values file page page-name (assoc options' :from-page page))
           page-map (build-page-map properties invalid-properties properties-text-values file page page-name (assoc options' :from-page page))
           namespace-pages (when-not db-based?
           namespace-pages (when-not db-based?
-                            (let [page (:block/original-name page-map)]
+                            (let [page (:block/title page-map)]
                               (when (text/namespace-page? page)
                               (when (text/namespace-page? page)
                                 (->> (common-util/split-namespace-pages page)
                                 (->> (common-util/split-namespace-pages page)
                                      (map (fn [page]
                                      (map (fn [page]
@@ -261,7 +261,7 @@
                          (assoc page :block/uuid page-id)))
                          (assoc page :block/uuid page-id)))
                      pages)
                      pages)
           blocks (->> (remove nil? blocks)
           blocks (->> (remove nil? blocks)
-                      (map (fn [b] (dissoc b :block/title :block/body :block/level :block/children :block/meta))))]
+                      (map (fn [b] (dissoc b :block/body :block/level :block/children :block/meta))))]
       [pages blocks])
       [pages blocks])
     (catch :default e
     (catch :default e
       (log/error :exception e))))
       (log/error :exception e))))
@@ -314,14 +314,14 @@
                       (common-util/dissoc-in [:block/left :block/name])))
                       (common-util/dissoc-in [:block/left :block/name])))
                 blocks)
                 blocks)
         serialized-page (first pages)
         serialized-page (first pages)
-        ;; whiteboard edn file should normally have valid :block/original-name, :block/name, :block/uuid
+        ;; whiteboard edn file should normally have valid :block/title, :block/name, :block/uuid
         page-name (-> (or (:block/name serialized-page)
         page-name (-> (or (:block/name serialized-page)
                           (filepath->page-name file))
                           (filepath->page-name file))
                       (common-util/page-name-sanity-lc))
                       (common-util/page-name-sanity-lc))
-        original-name (or (:block/original-name serialized-page)
+        title (or (:block/title serialized-page)
                           page-name)
                           page-name)
         page-block (merge {:block/name page-name
         page-block (merge {:block/name page-name
-                           :block/original-name original-name
+                           :block/title title
                            :block/type #{"whiteboard" "page"}
                            :block/type #{"whiteboard" "page"}
                            :block/file {:file/path (common-util/path-normalize file)}}
                            :block/file {:file/path (common-util/path-normalize file)}}
                           serialized-page)
                           serialized-page)

+ 2 - 2
deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs

@@ -136,10 +136,10 @@
 
 
     (let [no-name (->> (d/q '[:find (pull ?n [*]) :where [?b :block/namespace ?n]] db)
     (let [no-name (->> (d/q '[:find (pull ?n [*]) :where [?b :block/namespace ?n]] db)
                        (filter (fn [x]
                        (filter (fn [x]
-                                 (when-not (:block/original-name (first x))
+                                 (when-not (:block/title (first x))
                                    x))))
                                    x))))
           all-namespaces (->> (d/q '[:find (pull ?n [*]) :where [?b :block/namespace ?n]] db)
           all-namespaces (->> (d/q '[:find (pull ?n [*]) :where [?b :block/namespace ?n]] db)
-                              (map (comp :block/original-name first))
+                              (map (comp :block/title first))
                               set)]
                               set)]
       (is (= #{"term" "setting" "book" "templates" "Query table" "page"
       (is (= #{"term" "setting" "book" "templates" "Query table" "page"
                "Whiteboard" "Whiteboard/Tool" "Whiteboard/Tool/Shape" "Whiteboard/Object"
                "Whiteboard" "Whiteboard/Tool" "Whiteboard/Tool/Shape" "Whiteboard/Object"

+ 1 - 1
deps/graph-parser/test/logseq/graph_parser/cli_test.cljs

@@ -110,7 +110,7 @@
           (into [(merge page
           (into [(merge page
                         {:db/id page-id
                         {:db/id page-id
                          :block/uuid page-uuid
                          :block/uuid page-uuid
-                         :block/original-name (string/capitalize (:block/name page))
+                         :block/title (string/capitalize (:block/name page))
                          :block/created-at created-at
                          :block/created-at created-at
                          :block/updated-at created-at})]
                          :block/updated-at created-at})]
                 (mapv #(merge %
                 (mapv #(merge %

+ 6 - 6
deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs

@@ -40,7 +40,7 @@
   (->> name
   (->> name
        (d/q '[:find [(pull ?b [*]) ...]
        (d/q '[:find [(pull ?b [*]) ...]
               :in $ ?name
               :in $ ?name
-              :where [?b :block/original-name ?name]]
+              :where [?b :block/title ?name]]
             db)
             db)
        first))
        first))
 
 
@@ -145,8 +145,8 @@
 
 
       ;; Don't count pages like url.md that have properties but no content
       ;; Don't count pages like url.md that have properties but no content
       (is (= 5
       (is (= 5
-             (count (->> (d/q '[:find [(pull ?b [:block/original-name :block/type]) ...]
-                                :where [?b :block/original-name] [_ :block/page ?b]] @conn)
+             (count (->> (d/q '[:find [(pull ?b [:block/title :block/type]) ...]
+                                :where [?b :block/title] [_ :block/page ?b]] @conn)
                          (filter #(= ["page"] (:block/type %))))))
                          (filter #(= ["page"] (:block/type %))))))
           "Correct number of pages with block content")
           "Correct number of pages with block content")
       (is (= 2 (count @(:ignored-properties import-state)))
       (is (= 2 (count @(:ignored-properties import-state)))
@@ -164,8 +164,8 @@
              (->>
              (->>
               (ldb/get-page-blocks @conn
               (ldb/get-page-blocks @conn
                                    (:db/id (ldb/get-page @conn common-config/favorites-page-name))
                                    (:db/id (ldb/get-page @conn common-config/favorites-page-name))
-                                   {:pull-keys '[* {:block/link [:block/original-name]}]})
-              (map #(get-in % [:block/link :block/original-name]))
+                                   {:pull-keys '[* {:block/link [:block/title]}]})
+              (map #(get-in % [:block/link :block/title]))
               set))))
               set))))
 
 
     (testing "user properties"
     (testing "user properties"
@@ -205,7 +205,7 @@
       (is (= #{"prop-num" "prop-string" "prop-bool"}
       (is (= #{"prop-num" "prop-string" "prop-bool"}
              (->> (d/entity @conn (:db/id (find-block-by-content @conn "b1")))
              (->> (d/entity @conn (:db/id (find-block-by-content @conn "b1")))
                   :block/refs
                   :block/refs
-                  (map :block/original-name)
+                  (map :block/title)
                   set))
                   set))
           "Block with properties has correct refs")
           "Block with properties has correct refs")
 
 

+ 2 - 2
deps/graph-parser/test/logseq/graph_parser/extract_test.cljs

@@ -135,7 +135,7 @@
       :block/format :markdown}),
       :block/format :markdown}),
     :pages
     :pages
     ({:block/format :markdown,
     ({:block/format :markdown,
-      :block/original-name "Foo"
+      :block/title "Foo"
       :block/uuid #uuid "a846e3b4-c41d-4251-80e1-be6978c36d8c"
       :block/uuid #uuid "a846e3b4-c41d-4251-80e1-be6978c36d8c"
       :block/properties {:title "my whiteboard foo"}})})
       :block/properties {:title "my whiteboard foo"}})})
 
 
@@ -145,5 +145,5 @@
     (is (= (get-in page [:block/file :file/path]) "/whiteboards/foo.edn"))
     (is (= (get-in page [:block/file :file/path]) "/whiteboards/foo.edn"))
     (is (= (:block/name page) "foo"))
     (is (= (:block/name page) "foo"))
     (is (= (:block/type page) #{"whiteboard" "page"}))
     (is (= (:block/type page) #{"whiteboard" "page"}))
-    (is (= (:block/original-name page) "Foo"))
+    (is (= (:block/title page) "Foo"))
     (is (every? #(= (:block/parent %) [:block/uuid #uuid "a846e3b4-c41d-4251-80e1-be6978c36d8c"]) blocks))))
     (is (every? #(= (:block/parent %) [:block/uuid #uuid "a846e3b4-c41d-4251-80e1-be6978c36d8c"]) blocks))))

+ 9 - 9
deps/graph-parser/test/logseq/graph_parser_test.cljs

@@ -20,7 +20,7 @@
     :pages
     :pages
     ({:block/format :markdown,
     ({:block/format :markdown,
       :block/name "foo"
       :block/name "foo"
-      :block/original-name "Foo"
+      :block/title "Foo"
       :block/uuid #uuid "16c90195-6a03-4b3f-839d-095a496d9acd"
       :block/uuid #uuid "16c90195-6a03-4b3f-839d-095a496d9acd"
       :block/properties {:title "my whiteboard foo"}})})
       :block/properties {:title "my whiteboard foo"}})})
 
 
@@ -34,7 +34,7 @@
     :pages
     :pages
     ({:block/format :markdown,
     ({:block/format :markdown,
       :block/name "foo conflicted"
       :block/name "foo conflicted"
-      :block/original-name "Foo conflicted"
+      :block/title "Foo conflicted"
       :block/uuid #uuid "16c90195-6a03-4b3f-839d-095a496d9acd"})})
       :block/uuid #uuid "16c90195-6a03-4b3f-839d-095a496d9acd"})})
 
 
 (def bar-edn
 (def bar-edn
@@ -51,7 +51,7 @@
     :pages
     :pages
     ({:block/format :markdown,
     ({:block/format :markdown,
       :block/name "bar"
       :block/name "bar"
-      :block/original-name "Bar"
+      :block/title "Bar"
       :block/uuid #uuid "71515b7d-b5fc-496b-b6bf-c58004a34ee3"})})
       :block/uuid #uuid "71515b7d-b5fc-496b-b6bf-c58004a34ee3"})})
 
 
 (defn- parse-file
 (defn- parse-file
@@ -89,7 +89,7 @@
       (parse-file conn "/whiteboards/foo.edn" (pr-str foo-edn))
       (parse-file conn "/whiteboards/foo.edn" (pr-str foo-edn))
       (let [blocks (d/q '[:find (pull ?b [* {:block/page
       (let [blocks (d/q '[:find (pull ?b [* {:block/page
                                              [:block/name
                                              [:block/name
-                                              :block/original-name
+                                              :block/title
                                               :block/type
                                               :block/type
                                               {:block/file
                                               {:block/file
                                                [:file/path]}]}])
                                                [:file/path]}]}])
@@ -98,7 +98,7 @@
                         @conn)
                         @conn)
             parent (:block/page (ffirst blocks))]
             parent (:block/page (ffirst blocks))]
         (is (= {:block/name "foo"
         (is (= {:block/name "foo"
-                :block/original-name "Foo"
+                :block/title "Foo"
                 :block/type ["page" "whiteboard"]
                 :block/type ["page" "whiteboard"]
                 :block/file {:file/path "/whiteboards/foo.edn"}}
                 :block/file {:file/path "/whiteboards/foo.edn"}}
                parent)
                parent)
@@ -168,7 +168,7 @@
            (:block/properties block))
            (:block/properties block))
         "Quoted value is unparsed")
         "Quoted value is unparsed")
     (is (= ["desc"]
     (is (= ["desc"]
-           (map :block/original-name (:block/refs block)))
+           (map :block/title (:block/refs block)))
         "No refs from property value")))
         "No refs from property value")))
 
 
 (deftest non-string-property-values
 (deftest non-string-property-values
@@ -242,12 +242,12 @@
         blocks (->> (d/q '[:find (pull ?b [:block/pre-block?
         blocks (->> (d/q '[:find (pull ?b [:block/pre-block?
                                            :block/properties
                                            :block/properties
                                            :block/properties-text-values
                                            :block/properties-text-values
-                                           {:block/refs [:block/original-name]}])
+                                           {:block/refs [:block/title]}])
                            :in $
                            :in $
                            :where [?b :block/properties] [(missing? $ ?b :block/name)]]
                            :where [?b :block/properties] [(missing? $ ?b :block/name)]]
                          @conn)
                          @conn)
                     (map first)
                     (map first)
-                    (map (fn [m] (update m :block/refs #(map :block/original-name %)))))
+                    (map (fn [m] (update m :block/refs #(map :block/title %)))))
         block-db-properties (block-property-transform db-properties)]
         block-db-properties (block-property-transform db-properties)]
 
 
     (testing "Page properties"
     (testing "Page properties"
@@ -356,7 +356,7 @@
                          :in $
                          :in $
                          :where [?b :block/name]]
                          :where [?b :block/name]]
                        @conn)
                        @conn)
-                  (map (comp :block/original-name first))
+                  (map (comp :block/title first))
                   (remove built-in-pages)
                   (remove built-in-pages)
                   set))))))
                   set))))))
 
 

+ 4 - 4
deps/outliner/src/logseq/outliner/property.cljs

@@ -92,8 +92,8 @@
         (cond-> {}
         (cond-> {}
           (not= schema (:block/schema property))
           (not= schema (:block/schema property))
           (assoc :block/schema schema)
           (assoc :block/schema schema)
-          (and (some? property-name) (not= property-name (:block/original-name property)))
-          (assoc :block/original-name property-name))
+          (and (some? property-name) (not= property-name (:block/title property)))
+          (assoc :block/title property-name))
         property-tx-data
         property-tx-data
         (cond-> []
         (cond-> []
           (seq changed-property-attrs)
           (seq changed-property-attrs)
@@ -143,7 +143,7 @@
         (assert (some? k-name)
         (assert (some? k-name)
                 (prn "property-id: " property-id ", property-name: " property-name))
                 (prn "property-id: " property-id ", property-name: " property-name))
         (ldb/transact! conn
         (ldb/transact! conn
-                       [(sqlite-util/build-new-property db-ident' schema {:original-name k-name})]
+                       [(sqlite-util/build-new-property db-ident' schema {:title k-name})]
                        {:outliner-op :new-property})
                        {:outliner-op :new-property})
         (d/entity @conn db-ident')))))
         (d/entity @conn db-ident')))))
 
 
@@ -158,7 +158,7 @@
 (defn- raw-set-block-property!
 (defn- raw-set-block-property!
   "Adds the raw property pair (value not modified) to the given block if the property value is valid"
   "Adds the raw property pair (value not modified) to the given block if the property value is valid"
   [conn block property property-type new-value]
   [conn block property property-type new-value]
-  (let [k-name (:block/original-name property)
+  (let [k-name (:block/title property)
         property-id (:db/ident property)
         property-id (:db/ident property)
         schema (get-property-value-schema @conn property-type property)]
         schema (get-property-value-schema @conn property-type property)]
     (if-let [msg (and
     (if-let [msg (and

+ 3 - 4
deps/outliner/test/logseq/outliner/pipeline_test.cljs

@@ -23,8 +23,8 @@
           _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
           _ (d/transact! conn (sqlite-create-graph/build-db-initial-data "{}"))
           _ (sqlite-build/create-blocks
           _ (sqlite-build/create-blocks
              conn
              conn
-             [{:page {:block/original-name "bar"}}
-              {:page {:block/original-name "page1"}
+             [{:page {:block/title "bar"}}
+              {:page {:block/title "page1"}
                :blocks [{:block/content "parent [[foo]]"
                :blocks [{:block/content "parent [[foo]]"
                          :build/children
                          :build/children
                          [{:block/content "child [[baz]]"
                          [{:block/content "child [[baz]]"
@@ -32,7 +32,7 @@
                            [{:block/content "grandchild [[bing]]"}]}]}]}])
                            [{:block/content "grandchild [[bing]]"}]}]}]}])
           blocks (get-blocks @conn)
           blocks (get-blocks @conn)
           ;; Update parent block to replace 'foo' with 'bar' ref
           ;; Update parent block to replace 'foo' with 'bar' ref
-          new-tag-id (ffirst (d/q '[:find ?b :where [?b :block/original-name "bar"]] @conn))
+          new-tag-id (ffirst (d/q '[:find ?b :where [?b :block/title "bar"]] @conn))
           modified-blocks (map #(if (string/starts-with? (:block/content %) "parent")
           modified-blocks (map #(if (string/starts-with? (:block/content %) "parent")
                                   (assoc %
                                   (assoc %
                                          :block/refs [{:db/id new-tag-id}]
                                          :block/refs [{:db/id new-tag-id}]
@@ -52,4 +52,3 @@
               {:block/content "grandchild"
               {:block/content "grandchild"
                :path-ref-names #{"page1" "bar" "baz" "bing"}}]
                :path-ref-names #{"page1" "bar" "baz" "bing"}}]
              updated-blocks)))))
              updated-blocks)))))
-

+ 18 - 18
deps/outliner/test/logseq/outliner/property_test.cljs

@@ -40,14 +40,14 @@
       (outliner-property/upsert-property! conn nil {} {:property-name ":p1"})
       (outliner-property/upsert-property! conn nil {} {:property-name ":p1"})
       (outliner-property/upsert-property! conn nil {} {:property-name "1p1"})
       (outliner-property/upsert-property! conn nil {} {:property-name "1p1"})
 
 
-      (is (= {:block/name "p1" :block/original-name "p1" :block/schema {:type :default}}
-             (select-keys (d/entity @conn :user.property/p1) [:block/name :block/original-name :block/schema]))
+      (is (= {:block/name "p1" :block/title "p1" :block/schema {:type :default}}
+             (select-keys (d/entity @conn :user.property/p1) [:block/name :block/title :block/schema]))
           "Existing db/ident does not get modified")
           "Existing db/ident does not get modified")
       (is (= ":p1"
       (is (= ":p1"
-             (:block/original-name (d/entity @conn :user.property/p1-1)))
+             (:block/title (d/entity @conn :user.property/p1-1)))
           "2nd property gets unique ident")
           "2nd property gets unique ident")
       (is (= "1p1"
       (is (= "1p1"
-             (:block/original-name (d/entity @conn :user.property/p1-2)))
+             (:block/title (d/entity @conn :user.property/p1-2)))
           "3rd property gets unique ident"))))
           "3rd property gets unique ident"))))
 
 
 (deftest convert-property-input-string
 (deftest convert-property-input-string
@@ -66,7 +66,7 @@
 (deftest create-property-text-block!
 (deftest create-property-text-block!
   (testing "Create a new :default property value"
   (testing "Create a new :default property value"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:default "foo"}}
                   :blocks [{:block/content "b1" :build/properties {:default "foo"}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           block (find-block-by-content conn "b2")
           block (find-block-by-content conn "b2")
@@ -83,7 +83,7 @@
 
 
   (testing "Create cases for a new :one :number property value"
   (testing "Create cases for a new :one :number property value"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           block (find-block-by-content conn "b2")
           block (find-block-by-content conn "b2")
@@ -106,7 +106,7 @@
 
 
   (testing "Create new :many :number property values"
   (testing "Create new :many :number property values"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:num-many #{2}}}
                   :blocks [{:block/content "b1" :build/properties {:num-many #{2}}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           block (find-block-by-content conn "b2")
           block (find-block-by-content conn "b2")
@@ -123,7 +123,7 @@
 (deftest set-block-property-basic-cases
 (deftest set-block-property-basic-cases
   (testing "Set a :number value with existing value"
   (testing "Set a :number value with existing value"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           property-value (:user.property/num (find-block-by-content conn "b1"))
           property-value (:user.property/num (find-block-by-content conn "b1"))
@@ -136,7 +136,7 @@
 
 
   (testing "Update a :number value with existing value"
   (testing "Update a :number value with existing value"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                   :blocks [{:block/content "b1" :build/properties {:num 2}}
                            {:block/content "b2" :build/properties {:num 3}}]}])
                            {:block/content "b2" :build/properties {:num 3}}]}])
           property-value (:user.property/num (find-block-by-content conn "b1"))
           property-value (:user.property/num (find-block-by-content conn "b1"))
@@ -150,7 +150,7 @@
 (deftest set-block-property-with-non-ref-values
 (deftest set-block-property-with-non-ref-values
   (testing "Setting :default with same property value reuses existing entity"
   (testing "Setting :default with same property value reuses existing entity"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:logseq.property/order-list-type "number"}}
                   :blocks [{:block/content "b1" :build/properties {:logseq.property/order-list-type "number"}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           property-value (:logseq.property/order-list-type (find-block-by-content conn "b1"))
           property-value (:logseq.property/order-list-type (find-block-by-content conn "b1"))
@@ -164,7 +164,7 @@
 
 
   (testing "Setting :checkbox with same property value reuses existing entity"
   (testing "Setting :checkbox with same property value reuses existing entity"
     (let [conn (create-conn-with-blocks
     (let [conn (create-conn-with-blocks
-                [{:page {:block/original-name "page1"}
+                [{:page {:block/title "page1"}
                   :blocks [{:block/content "b1" :build/properties {:checkbox true}}
                   :blocks [{:block/content "b1" :build/properties {:checkbox true}}
                            {:block/content "b2"}]}])
                            {:block/content "b2"}]}])
           property-value (:user.property/checkbox (find-block-by-content conn "b1"))
           property-value (:user.property/checkbox (find-block-by-content conn "b1"))
@@ -178,7 +178,7 @@
 
 
 (deftest remove-block-property!
 (deftest remove-block-property!
   (let [conn (create-conn-with-blocks
   (let [conn (create-conn-with-blocks
-              [{:page {:block/original-name "page1"}
+              [{:page {:block/title "page1"}
                 :blocks [{:block/content "b1" :build/properties {:default "foo"}}]}])
                 :blocks [{:block/content "b1" :build/properties {:default "foo"}}]}])
         block (find-block-by-content conn "b1")
         block (find-block-by-content conn "b1")
         _ (assert (:user.property/default block))
         _ (assert (:user.property/default block))
@@ -190,7 +190,7 @@
 
 
 (deftest batch-set-property!
 (deftest batch-set-property!
   (let [conn (create-conn-with-blocks
   (let [conn (create-conn-with-blocks
-              [{:page {:block/original-name "page1"}
+              [{:page {:block/title "page1"}
                 :blocks [{:block/content "item 1"}
                 :blocks [{:block/content "item 1"}
                          {:block/content "item 2"}]}])
                          {:block/content "item 2"}]}])
         block-ids (map #(-> (find-block-by-content conn %) :block/uuid) ["item 1" "item 2"])
         block-ids (map #(-> (find-block-by-content conn %) :block/uuid) ["item 1" "item 2"])
@@ -203,7 +203,7 @@
 
 
 (deftest batch-remove-property!
 (deftest batch-remove-property!
   (let [conn (create-conn-with-blocks
   (let [conn (create-conn-with-blocks
-              [{:page {:block/original-name "page1"}
+              [{:page {:block/title "page1"}
                 :blocks [{:block/content "item 1" :build/properties {:logseq.property/order-list-type "number"}}
                 :blocks [{:block/content "item 1" :build/properties {:logseq.property/order-list-type "number"}}
                          {:block/content "item 2" :build/properties {:logseq.property/order-list-type "number"}}]}])
                          {:block/content "item 2" :build/properties {:logseq.property/order-list-type "number"}}]}])
         block-ids (map #(-> (find-block-by-content conn %) :block/uuid) ["item 1" "item 2"])
         block-ids (map #(-> (find-block-by-content conn %) :block/uuid) ["item 1" "item 2"])
@@ -215,7 +215,7 @@
 
 
 (deftest add-existing-values-to-closed-values!
 (deftest add-existing-values-to-closed-values!
   (let [conn (create-conn-with-blocks
   (let [conn (create-conn-with-blocks
-              [{:page {:block/original-name "page1"}
+              [{:page {:block/title "page1"}
                 :blocks [{:block/content "b1" :build/properties {:num 1}}
                 :blocks [{:block/content "b1" :build/properties {:num 1}}
                          {:block/content "b2" :build/properties {:num 2}}]}])
                          {:block/content "b2" :build/properties {:num 2}}]}])
         values (map (fn [d] (:block/uuid (d/entity @conn (:v d)))) (d/datoms @conn :avet :user.property/num))
         values (map (fn [d] (:block/uuid (d/entity @conn (:v d)))) (d/datoms @conn :avet :user.property/num))
@@ -266,7 +266,7 @@
                                                             {:uuid used-closed-value-uuid :value "bar"}]
                                                             {:uuid used-closed-value-uuid :value "bar"}]
                                       :block/schema {:type :default}}}
                                       :block/schema {:type :default}}}
                :pages-and-blocks
                :pages-and-blocks
-               [{:page {:block/original-name "page1"}
+               [{:page {:block/title "page1"}
                  :blocks [{:block/content "b1" :user.property/default [:block/uuid used-closed-value-uuid]}]}]})
                  :blocks [{:block/content "b1" :user.property/default [:block/uuid used-closed-value-uuid]}]}]})
         _ (assert (:user.property/default (find-block-by-content conn "b1")))
         _ (assert (:user.property/default (find-block-by-content conn "b1")))
         property-uuid (:block/uuid (d/entity @conn :user.property-default))
         property-uuid (:block/uuid (d/entity @conn :user.property-default))
@@ -299,9 +299,9 @@
               {:classes {:c1 {:build/schema-properties [:p1]}
               {:classes {:c1 {:build/schema-properties [:p1]}
                          :c2 {:build/schema-properties [:p2 :p3]}}
                          :c2 {:build/schema-properties [:p2 :p3]}}
                :pages-and-blocks
                :pages-and-blocks
-               [{:page {:block/original-name "p1"}
+               [{:page {:block/title "p1"}
                  :blocks [{:block/content "o1"
                  :blocks [{:block/content "o1"
                            :build/tags [:c1 :c2]}]}]})
                            :build/tags [:c1 :c2]}]}]})
         block (find-block-by-content conn "o1")]
         block (find-block-by-content conn "o1")]
     (is (= [:user.property/p1 :user.property/p2 :user.property/p3]
     (is (= [:user.property/p1 :user.property/p2 :user.property/p3]
-           (:classes-properties (outliner-property/get-block-classes-properties @conn (:db/id block)))))))
+           (:classes-properties (outliner-property/get-block-classes-properties @conn (:db/id block)))))))

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

@@ -18,7 +18,7 @@
                            #(get %1 (keyword (name %2))))]
                            #(get %1 (keyword (name %2))))]
       (when-some [uuid (:block/uuid block)]
       (when-some [uuid (:block/uuid block)]
         (when-some [stamp (prop-lookup-fn props :logseq.property.pdf/hl-stamp)]
         (when-some [stamp (prop-lookup-fn props :logseq.property.pdf/hl-stamp)]
-          (let [group-key      (string/replace-first (:block/original-name page) #"^hls__" "")
+          (let [group-key      (string/replace-first (:block/title page) #"^hls__" "")
                 hl-page        (prop-lookup-fn props :logseq.property.pdf/hl-page)
                 hl-page        (prop-lookup-fn props :logseq.property.pdf/hl-page)
                 encoded-chars? (boolean (re-find #"(?i)%[0-9a-f]{2}" group-key))
                 encoded-chars? (boolean (re-find #"(?i)%[0-9a-f]{2}" group-key))
                 group-key      (if encoded-chars? (js/encodeURI group-key) group-key)]
                 group-key      (if encoded-chars? (js/encodeURI group-key) group-key)]

+ 1 - 1
resources/whiteboard/onboarding.edn

@@ -2335,4 +2335,4 @@
 :block/created-at 1668430322981
 :block/created-at 1668430322981
 :block/type "whiteboard"
 :block/type "whiteboard"
 :block/name "637239f2-9680-4c82-802c-8858d9835c80"
 :block/name "637239f2-9680-4c82-802c-8858d9835c80"
-:block/original-name "637239f2-9680-4c82-802c-8858d9835c80"})}
+:block/title "637239f2-9680-4c82-802c-8858d9835c80"})}

+ 3 - 3
scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs

@@ -25,7 +25,7 @@
     (map-indexed
     (map-indexed
      (fn [idx id]
      (fn [idx id]
        {:block/uuid id
        {:block/uuid id
-        :block/original-name (str "Page-" (+ start-idx idx))})
+        :block/title (str "Page-" (+ start-idx idx))})
      ids)))
      ids)))
 
 
 (defn build-blocks
 (defn build-blocks
@@ -69,7 +69,7 @@
         conn (outliner-cli/init-conn dir db-name {:classpath (cp/get-classpath)})
         conn (outliner-cli/init-conn dir db-name {:classpath (cp/get-classpath)})
         _ (println "Building tx ...")
         _ (println "Building tx ...")
         {:keys [init-tx]} (outliner-cli/build-blocks-tx (create-init-data options))]
         {:keys [init-tx]} (outliner-cli/build-blocks-tx (create-init-data options))]
-    (println "Built" (count init-tx) "tx," (count (filter :block/original-name init-tx)) "pages and"
+    (println "Built" (count init-tx) "tx," (count (filter :block/title init-tx)) "pages and"
              (count (filter :block/content init-tx)) "blocks ...")
              (count (filter :block/content init-tx)) "blocks ...")
     ;; Vary the chunking with page size up to a max to avoid OOM
     ;; Vary the chunking with page size up to a max to avoid OOM
     (let [tx-chunks (partition-all (min (:pages options) 30000) init-tx)]
     (let [tx-chunks (partition-all (min (:pages options) 30000) init-tx)]
@@ -77,7 +77,7 @@
              chunk-num 1]
              chunk-num 1]
         (when-let [chunk (first chunks)]
         (when-let [chunk (first chunks)]
           (println "Transacting chunk" chunk-num  "of" (count tx-chunks)
           (println "Transacting chunk" chunk-num  "of" (count tx-chunks)
-                   "starting with block:" (pr-str (select-keys (first chunk) [:block/content :block/original-name])))
+                   "starting with block:" (pr-str (select-keys (first chunk) [:block/content :block/title])))
           (d/transact! conn chunk)
           (d/transact! conn chunk)
           (recur (rest chunks) (inc chunk-num)))))
           (recur (rest chunks) (inc chunk-num)))))
     #_(d/transact! conn blocks-tx)
     #_(d/transact! conn blocks-tx)

+ 26 - 26
scripts/src/logseq/tasks/db_graph/create_graph_with_properties.cljs

@@ -53,7 +53,7 @@
         two-days-ago (subtract-days today 2)
         two-days-ago (subtract-days today 2)
         closed-values-config (build-closed-values-config {:dates [today yesterday two-days-ago]})
         closed-values-config (build-closed-values-config {:dates [today yesterday two-days-ago]})
         page-values-tx (mapv #(hash-map :page
         page-values-tx (mapv #(hash-map :page
-                                        {:block/uuid (:uuid %) :block/original-name (:value %)})
+                                        {:block/uuid (:uuid %) :block/title (:value %)})
                              (:page-closed closed-values-config))
                              (:page-closed closed-values-config))
         ;; Stores random closed values for use with queries
         ;; Stores random closed values for use with queries
         closed-values (atom {})
         closed-values (atom {})
@@ -69,9 +69,9 @@
        page-values-tx
        page-values-tx
 
 
        ;; Objects
        ;; Objects
-       [{:page {:block/original-name "Page object"
+       [{:page {:block/title "Page object"
                 :build/tags [:TestClass]}}
                 :build/tags [:TestClass]}}
-        {:page {:block/original-name "Blocks"}
+        {:page {:block/title "Blocks"}
          :blocks
          :blocks
          [{:block/content "block object"
          [{:block/content "block object"
            :block/uuid object-uuid
            :block/uuid object-uuid
@@ -88,7 +88,7 @@
         {:page {:build/journal (date-time-util/date->int two-days-ago)}}
         {:page {:build/journal (date-time-util/date->int two-days-ago)}}
 
 
         ;; Block property blocks and queries
         ;; Block property blocks and queries
-        {:page {:block/original-name "Block Properties"}
+        {:page {:block/title "Block Properties"}
          :blocks
          :blocks
          [{:block/content "default property block" :build/properties {:default "haha"}}
          [{:block/content "default property block" :build/properties {:default "haha"}}
           {:block/content "default property block" :build/properties {:default-many #{"yee" "haw" "sir"}}}
           {:block/content "default property block" :build/properties {:default-many #{"yee" "haw" "sir"}}}
@@ -110,7 +110,7 @@
           {:block/content "date-many property block" :build/properties {:date-many #{[:page (date-journal-title today)]
           {:block/content "date-many property block" :build/properties {:date-many #{[:page (date-journal-title today)]
                                                                                      [:page (date-journal-title yesterday)]}}}
                                                                                      [:page (date-journal-title yesterday)]}}}
           #_{:block/content "date-closed property block" :build/properties {:date-closed (random-closed-value :date-closed)}}]}
           #_{:block/content "date-closed property block" :build/properties {:date-closed (random-closed-value :date-closed)}}]}
-        {:page {:block/original-name "Block Property Queries"}
+        {:page {:block/title "Block Property Queries"}
          :blocks
          :blocks
          [{:block/content "{{query (property :default \"haha\")}}"}
          [{:block/content "{{query (property :default \"haha\")}}"}
           {:block/content "{{query (property :default-many \"haw\")}}"}
           {:block/content "{{query (property :default-many \"haw\")}}"}
@@ -132,26 +132,26 @@
           #_{:block/content (str "{{query (property :date-closed " (page-ref/->page-ref (string/capitalize (get-closed-value :date-closed))) ")}}")}]}
           #_{:block/content (str "{{query (property :date-closed " (page-ref/->page-ref (string/capitalize (get-closed-value :date-closed))) ")}}")}]}
 
 
         ;; Page property pages and queries
         ;; Page property pages and queries
-        {:page {:block/original-name "default page" :build/properties {:default "yolo"}}}
-        {:page {:block/original-name "default-many page" :build/properties {:default-many #{"yee" "haw" "sir"}}}}
-        {:page {:block/original-name "default-closed page" :build/properties {:default-closed (random-closed-value :default-closed)}}}
-        {:page {:block/original-name "url page" :build/properties {:url "https://logseq.com"}}}
-        {:page {:block/original-name "url-many page" :build/properties {:url-many #{"https://logseq.com" "https://docs.logseq.com"}}}}
-        {:page {:block/original-name "url-closed page" :build/properties {:url-closed (random-closed-value :url-closed)}}}
-        {:page {:block/original-name "checkbox page" :build/properties {:checkbox true}}}
-        {:page {:block/original-name "number page" :build/properties {:number 5}}}
-        {:page {:block/original-name "number-many page" :build/properties {:number-many #{5 10}}}}
-        {:page {:block/original-name "number-closed page" :build/properties {:number-closed (random-closed-value :number-closed)}}}
-        {:page {:block/original-name "object page" :build/properties {:object [:block/uuid object-uuid]}}}
-        {:page {:block/original-name "object-many page" :build/properties {:object-many #{[:block/uuid object-uuid] [:page "Page object"]}}}}
-        {:page {:block/original-name "page page" :build/properties {:page [:page "Page 1"]}}}
-        {:page {:block/original-name "page-many page" :build/properties {:page-many #{[:page "Page 1"] [:page "Page 2"]}}}}
-      ;;  #_{:page {:block/original-name "page-closed page" :build/properties {:page-closed (random-closed-value :page-closed)}}}
-        {:page {:block/original-name "date page" :build/properties {:date [:page (date-journal-title today)]}}}
-        {:page {:block/original-name "date-many page" :build/properties {:date-many #{[:page (date-journal-title today)]
+        {:page {:block/title "default page" :build/properties {:default "yolo"}}}
+        {:page {:block/title "default-many page" :build/properties {:default-many #{"yee" "haw" "sir"}}}}
+        {:page {:block/title "default-closed page" :build/properties {:default-closed (random-closed-value :default-closed)}}}
+        {:page {:block/title "url page" :build/properties {:url "https://logseq.com"}}}
+        {:page {:block/title "url-many page" :build/properties {:url-many #{"https://logseq.com" "https://docs.logseq.com"}}}}
+        {:page {:block/title "url-closed page" :build/properties {:url-closed (random-closed-value :url-closed)}}}
+        {:page {:block/title "checkbox page" :build/properties {:checkbox true}}}
+        {:page {:block/title "number page" :build/properties {:number 5}}}
+        {:page {:block/title "number-many page" :build/properties {:number-many #{5 10}}}}
+        {:page {:block/title "number-closed page" :build/properties {:number-closed (random-closed-value :number-closed)}}}
+        {:page {:block/title "object page" :build/properties {:object [:block/uuid object-uuid]}}}
+        {:page {:block/title "object-many page" :build/properties {:object-many #{[:block/uuid object-uuid] [:page "Page object"]}}}}
+        {:page {:block/title "page page" :build/properties {:page [:page "Page 1"]}}}
+        {:page {:block/title "page-many page" :build/properties {:page-many #{[:page "Page 1"] [:page "Page 2"]}}}}
+      ;;  #_{:page {:block/title "page-closed page" :build/properties {:page-closed (random-closed-value :page-closed)}}}
+        {:page {:block/title "date page" :build/properties {:date [:page (date-journal-title today)]}}}
+        {:page {:block/title "date-many page" :build/properties {:date-many #{[:page (date-journal-title today)]
                                                                                       [:page (date-journal-title yesterday)]}}}}
                                                                                       [:page (date-journal-title yesterday)]}}}}
-        #_{:page {:block/original-name "date-closed page" :build/properties {:date-closed (random-closed-value :date-closed)}}}
-        {:page {:block/original-name "Page Property Queries"}
+        #_{:page {:block/title "date-closed page" :build/properties {:date-closed (random-closed-value :date-closed)}}}
+        {:page {:block/title "Page Property Queries"}
          :blocks
          :blocks
          [{:block/content "{{query (page-property :default \"yolo\")}}"}
          [{:block/content "{{query (page-property :default \"yolo\")}}"}
           {:block/content "{{query (page-property :default-many \"haw\")}}"}
           {:block/content "{{query (page-property :default-many \"haw\")}}"}
@@ -212,8 +212,8 @@
         conn (outliner-cli/init-conn dir db-name {:additional-config (:config options)
         conn (outliner-cli/init-conn dir db-name {:additional-config (:config options)
                                                   :classpath (cp/get-classpath)})
                                                   :classpath (cp/get-classpath)})
         {:keys [init-tx block-props-tx]} (outliner-cli/build-blocks-tx (create-init-data))
         {:keys [init-tx block-props-tx]} (outliner-cli/build-blocks-tx (create-init-data))
-        existing-names (set (map :v (d/datoms @conn :avet :block/original-name)))
-        conflicting-names (set/intersection existing-names (set (keep :block/original-name init-tx)))]
+        existing-names (set (map :v (d/datoms @conn :avet :block/title)))
+        conflicting-names (set/intersection existing-names (set (keep :block/title init-tx)))]
     (when (seq conflicting-names)
     (when (seq conflicting-names)
       (println "Error: Following names conflict -" (string/join "," conflicting-names))
       (println "Error: Following names conflict -" (string/join "," conflicting-names))
       (js/process.exit 1))
       (js/process.exit 1))

+ 11 - 11
scripts/src/logseq/tasks/db_graph/create_graph_with_schema_org.cljs

@@ -63,7 +63,7 @@
         inverted-renamed-classes (set/map-invert renamed-classes)
         inverted-renamed-classes (set/map-invert renamed-classes)
         class-name (strip-schema-prefix (class-m "@id"))
         class-name (strip-schema-prefix (class-m "@id"))
         url (str "https://schema.org/" (get inverted-renamed-classes class-name class-name))]
         url (str "https://schema.org/" (get inverted-renamed-classes class-name class-name))]
-    (cond-> {:block/original-name class-name
+    (cond-> {:block/title class-name
              :build/properties (cond-> {:url url}
              :build/properties (cond-> {:url url}
                                  (class-m "rdfs:comment")
                                  (class-m "rdfs:comment")
                                  (assoc :description (get-comment-string (class-m "rdfs:comment") renamed-pages)))}
                                  (assoc :description (get-comment-string (class-m "rdfs:comment") renamed-pages)))}
@@ -241,7 +241,7 @@
                                    (->class-page % class-to-properties options)))
                                    (->class-page % class-to-properties options)))
                      (into {}))]
                      (into {}))]
     (assert (= ["Thing"] (keep #(when-not (:build/class-parent %)
     (assert (= ["Thing"] (keep #(when-not (:build/class-parent %)
-                                  (:block/original-name %))
+                                  (:block/title %))
                                (vals classes)))
                                (vals classes)))
             "Thing is the only class that doesn't have a schema.org parent class")
             "Thing is the only class that doesn't have a schema.org parent class")
     classes))
     classes))
@@ -355,10 +355,10 @@
 (defn- write-debug-file [db]
 (defn- write-debug-file [db]
   (let [ents (remove #(db-malli-schema/internal-ident? (:db/ident %))
   (let [ents (remove #(db-malli-schema/internal-ident? (:db/ident %))
                      (d/q '[:find [(pull ?b [*
                      (d/q '[:find [(pull ?b [*
-                                             {:class/schema.properties [:block/original-name]}
-                                             {:property/schema.classes [:block/original-name]}
-                                             {:class/parent [:block/original-name]}
-                                             {:block/refs [:block/original-name]}]) ...]
+                                             {:class/schema.properties [:block/title]}
+                                             {:property/schema.classes [:block/title]}
+                                             {:class/parent [:block/title]}
+                                             {:block/refs [:block/title]}]) ...]
                             :in $
                             :in $
                             :where [?b :db/ident ?ident]]
                             :where [?b :db/ident ?ident]]
                           db))]
                           db))]
@@ -367,7 +367,7 @@
                        (->> ents
                        (->> ents
                             (map (fn [m]
                             (map (fn [m]
                                    (let [props (db-property/properties m)]
                                    (let [props (db-property/properties m)]
-                                     (cond-> (select-keys m [:block/name :block/type :block/original-name :block/schema :db/ident
+                                     (cond-> (select-keys m [:block/name :block/type :block/title :block/schema :db/ident
                                                              :class/schema.properties :class/parent
                                                              :class/schema.properties :class/parent
                                                              :db/cardinality :property/schema.classes :block/refs])
                                                              :db/cardinality :property/schema.classes :block/refs])
                                        (seq props)
                                        (seq props)
@@ -377,13 +377,13 @@
                                                                                      (db-property/property-value-content (d/entity db (:db/id v)))
                                                                                      (db-property/property-value-content (d/entity db (:db/id v)))
                                                                                      v)))))
                                                                                      v)))))
                                        (seq (:class/schema.properties m))
                                        (seq (:class/schema.properties m))
-                                       (update :class/schema.properties #(set (map :block/original-name %)))
+                                       (update :class/schema.properties #(set (map :block/title %)))
                                        (some? (:class/parent m))
                                        (some? (:class/parent m))
-                                       (update :class/parent :block/original-name)
+                                       (update :class/parent :block/title)
                                        (seq (:property/schema.classes m))
                                        (seq (:property/schema.classes m))
-                                       (update :property/schema.classes #(set (map :block/original-name %)))
+                                       (update :property/schema.classes #(set (map :block/title %)))
                                        (seq (:block/refs m))
                                        (seq (:block/refs m))
-                                       (update :block/refs #(set (map :block/original-name %)))))))
+                                       (update :block/refs #(set (map :block/title %)))))))
                             set)))))
                             set)))))
 
 
 (defn -main [args]
 (defn -main [args]

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

@@ -76,7 +76,7 @@
   (safe-api-call "redirectWhenExists"
   (safe-api-call "redirectWhenExists"
                  ;;  Redirect to the given page or block when the provided page or block exists.
                  ;;  Redirect to the given page or block when the provided page or block exists.
                  ;;  Either :page-name or :block-id is required.
                  ;;  Either :page-name or :block-id is required.
-                 ;;  :page-name : the original-name of the page.
+                 ;;  :page-name : the title of the page.
                  ;;  :block-id : uuid.
                  ;;  :block-id : uuid.
                  (fn [data]
                  (fn [data]
                    (let [{:keys [page-name block-id file]} (bean/->clj data)]
                    (let [{:keys [page-name block-id file]} (bean/->clj data)]

+ 1 - 1
src/main/frontend/common_keywords.cljs

@@ -11,7 +11,7 @@
   "block name, lowercase, only page-blocks have this attr"
   "block name, lowercase, only page-blocks have this attr"
   :string)
   :string)
 
 
-(sr/defkeyword :block/original-name
+(sr/defkeyword :block/title
   "like `:block/name`, but not unified into lowercase"
   "like `:block/name`, but not unified into lowercase"
   :string)
   :string)
 
 

+ 1 - 1
src/main/frontend/components/all_pages.cljs

@@ -16,7 +16,7 @@
 (defn- columns
 (defn- columns
   [db]
   [db]
   (let [db-based? (ldb/db-based-graph? db)]
   (let [db-based? (ldb/db-based-graph? db)]
-    (->> [{:id :block/original-name
+    (->> [{:id :block/title
            :name (t :block/name)
            :name (t :block/name)
            :cell (fn [_table row _column]
            :cell (fn [_table row _column]
                    (component-block/page-cp {} row))
                    (component-block/page-cp {} row))

+ 11 - 11
src/main/frontend/components/block.cljs

@@ -559,7 +559,7 @@
         page-name (:block/name page-entity)
         page-name (:block/name page-entity)
         breadcrumb? (:breadcrumb? config)
         breadcrumb? (:breadcrumb? config)
         config (assoc config :whiteboard-page? whiteboard-page?)
         config (assoc config :whiteboard-page? whiteboard-page?)
-        untitled? (when page-name (model/untitled-page? (:block/original-name page-entity)))
+        untitled? (when page-name (model/untitled-page? (:block/title page-entity)))
         display-close-button? (and (not (:hide-close-button? config))
         display-close-button? (and (not (:hide-close-button? config))
                                    (not config/publishing?))
                                    (not config/publishing?))
         hide-icon? (:hide-icon? config)]
         hide-icon? (:hide-icon? config)]
@@ -621,7 +621,7 @@
           (->elem :span (map-inline config label))
           (->elem :span (map-inline config label))
 
 
           :else
           :else
-          (let [original-name (:block/original-name page-entity)
+          (let [title (:block/title page-entity)
                 s (cond untitled?
                 s (cond untitled?
                         (t :untitled)
                         (t :untitled)
 
 
@@ -629,11 +629,11 @@
                         (pdf-utils/hls-file? page-name)
                         (pdf-utils/hls-file? page-name)
                         (pdf-utils/fix-local-asset-pagename page-name)
                         (pdf-utils/fix-local-asset-pagename page-name)
 
 
-                        (not= (util/safe-page-name-sanity-lc original-name) page-name)
+                        (not= (util/safe-page-name-sanity-lc title) page-name)
                         page-name                  ;; page-name-in-block might be overridden (legacy))
                         page-name                  ;; page-name-in-block might be overridden (legacy))
 
 
-                        original-name
-                        (util/trim-safe original-name)
+                        title
+                        (util/trim-safe title)
 
 
                         :else
                         :else
                         (util/trim-safe page-name))
                         (util/trim-safe page-name))
@@ -1511,7 +1511,7 @@
   [:ul
   [:ul
    (for [child children]
    (for [child children]
      [:li {:key (str "namespace-" namespace "-" (:db/id child))}
      [:li {:key (str "namespace-" namespace "-" (:db/id child))}
-      (let [shorten-name (some-> (or (:block/original-name child) (:block/name child))
+      (let [shorten-name (some-> (or (:block/title child) (:block/name child))
                                  (string/split "/")
                                  (string/split "/")
                                  last)]
                                  last)]
         (page-cp {:label shorten-name} child))
         (page-cp {:label shorten-name} child))
@@ -2228,7 +2228,7 @@
                                                   util/caret-range)
                                                   util/caret-range)
                              {:block/keys [content format]} block
                              {:block/keys [content format]} block
                              content (if (config/db-based-graph? (state/get-current-repo))
                              content (if (config/db-based-graph? (state/get-current-repo))
-                                       (or (:block/original-name block) content)
+                                       (or (:block/title block) content)
                                        (->> content
                                        (->> content
                                             (property-file/remove-built-in-properties-when-file-based
                                             (property-file/remove-built-in-properties-when-file-based
                                              (state/get-current-repo) format)
                                              (state/get-current-repo) format)
@@ -2328,7 +2328,7 @@
 (rum/defc ^:large-vars/cleanup-todo block-content < rum/reactive
 (rum/defc ^:large-vars/cleanup-todo block-content < rum/reactive
   [config {:block/keys [uuid content properties scheduled deadline format pre-block?] :as block} edit-input-id block-id slide?]
   [config {:block/keys [uuid content properties scheduled deadline format pre-block?] :as block} edit-input-id block-id slide?]
   (let [repo (state/get-current-repo)
   (let [repo (state/get-current-repo)
-        content (or (:block/original-name block)
+        content (or (:block/title block)
                     (if (config/db-based-graph? (state/get-current-repo))
                     (if (config/db-based-graph? (state/get-current-repo))
                       (:block/content block)
                       (:block/content block)
                       (property-util/remove-built-in-properties format content)))
                       (property-util/remove-built-in-properties format content)))
@@ -2508,7 +2508,7 @@
            (ui/block-error "Block Render Error:"
            (ui/block-error "Block Render Error:"
                            {:content (:block/content block)
                            {:content (:block/content block)
                             :section-attrs
                             :section-attrs
-                            {:on-click #(let [content (or (:block/original-name block)
+                            {:on-click #(let [content (or (:block/title block)
                                                           (:block/content block))]
                                                           (:block/content block))]
                                           (editor-handler/clear-selection!)
                                           (editor-handler/clear-selection!)
                                           (editor-handler/unhighlight-blocks!)
                                           (editor-handler/unhighlight-blocks!)
@@ -2630,7 +2630,7 @@
           page (or (db/get-block-page repo block-id) ;; only return for block uuid
           page (or (db/get-block-page repo block-id) ;; only return for block uuid
                    (model/query-block-by-uuid block-id)) ;; return page entity when received page uuid
                    (model/query-block-by-uuid block-id)) ;; return page entity when received page uuid
           page-name (:block/name page)
           page-name (:block/name page)
-          page-original-name (:block/original-name page)
+          page-title (:block/title page)
           show? (or (seq parents) show-page? page-name)
           show? (or (seq parents) show-page? page-name)
           parents (if (= page-name (:block/name (first parents)))
           parents (if (= page-name (:block/name (first parents)))
                     (rest parents)
                     (rest parents)
@@ -2642,7 +2642,7 @@
         (let [page-name-props (when show-page?
         (let [page-name-props (when show-page?
                                 [page
                                 [page
                                  (page-cp (dissoc config :breadcrumb? true) page)
                                  (page-cp (dissoc config :breadcrumb? true) page)
-                                 {:block/name (or page-original-name page-name)}])
+                                 {:block/name (or page-title page-name)}])
               parents-props (doall
               parents-props (doall
                              (for [{:block/keys [uuid name content] :as block} parents]
                              (for [{:block/keys [uuid name content] :as block} parents]
                                (if name
                                (if name

+ 5 - 5
src/main/frontend/components/class.cljs

@@ -77,7 +77,7 @@
              (if-let [parent-class (some-> (:db/id (:class/parent page))
              (if-let [parent-class (some-> (:db/id (:class/parent page))
                                            db/entity)]
                                            db/entity)]
                [:a {:on-click #(route-handler/redirect-to-page! (:block/uuid parent-class))}
                [:a {:on-click #(route-handler/redirect-to-page! (:block/uuid parent-class))}
-                (:block/original-name parent-class)]
+                (:block/title parent-class)]
                "None")]
                "None")]
             [:div.col-span-3
             [:div.col-span-3
              (let [parent (some-> (:db/id (:class/parent page))
              (let [parent (some-> (:db/id (:class/parent page))
@@ -95,8 +95,8 @@
               [:div.col-span-2 "Ancestor classes:"]
               [:div.col-span-2 "Ancestor classes:"]
               [:div.col-span-3
               [:div.col-span-3
                (interpose [:span.opacity-50.text-sm " > "]
                (interpose [:span.opacity-50.text-sm " > "]
-                          (map (fn [{class-name :block/original-name :as ancestor}]
-                                 (if (= class-name (:block/original-name page))
+                          (map (fn [{class-name :block/title :as ancestor}]
+                                 (if (= class-name (:block/title page))
                                    [:span class-name]
                                    [:span class-name]
                                    [:a {:on-click #(route-handler/redirect-to-page! (:block/uuid ancestor))} class-name]))
                                    [:a {:on-click #(route-handler/redirect-to-page! (:block/uuid ancestor))} class-name]))
                                class-ancestors))]])))])))
                                class-ancestors))]])))])))
@@ -106,8 +106,8 @@
   (let [children (:class/_parent class)]
   (let [children (:class/_parent class)]
     (when (seq children)
     (when (seq children)
       [:ul
       [:ul
-       (for [child (sort-by :block/original-name children)]
-         (let [title [:li.ml-2 (block/page-reference false (:block/original-name child) {:show-brackets? false} nil)]]
+       (for [child (sort-by :block/title children)]
+         (let [title [:li.ml-2 (block/page-reference false (:block/title child) {:show-brackets? false} nil)]]
            (if (seq (:class/_parent child))
            (if (seq (:class/_parent child))
              (ui/foldable
              (ui/foldable
               title
               title

+ 2 - 2
src/main/frontend/components/cmdk/core.cljs

@@ -224,7 +224,7 @@
                                       :icon-theme :gray
                                       :icon-theme :gray
                                       :text (:title page)
                                       :text (:title page)
                                       :source-page (if source-page
                                       :source-page (if source-page
-                                                     (:block/original-name source-page)
+                                                     (:block/title source-page)
                                                      (:title page)))))))]
                                                      (:title page)))))))]
       (swap! !results update group merge {:status :success :items items}))))
       (swap! !results update group merge {:status :success :items items}))))
 
 
@@ -233,7 +233,7 @@
         !results (::results state)]
         !results (::results state)]
     (swap! !results assoc-in [group :status] :loading)
     (swap! !results assoc-in [group :status] :loading)
     (p/let [whiteboards (->> (model/get-all-whiteboards (state/get-current-repo))
     (p/let [whiteboards (->> (model/get-all-whiteboards (state/get-current-repo))
-                          (map :block/original-name))
+                          (map :block/title))
             pages (search/fuzzy-search whiteboards @!input {:limit 100})
             pages (search/fuzzy-search whiteboards @!input {:limit 100})
             items (->> pages
             items (->> pages
                     (remove nil?)
                     (remove nil?)

+ 5 - 5
src/main/frontend/components/container.cljs

@@ -76,9 +76,9 @@
   [page icon recent?]
   [page icon recent?]
   (let [repo (state/get-current-repo)
   (let [repo (state/get-current-repo)
         page (or (db/get-alias-source-page repo (:db/id page)) page)
         page (or (db/get-alias-source-page repo (:db/id page)) page)
-        original-name (:block/original-name page)
+        title (:block/title page)
         whiteboard-page? (db-model/whiteboard-page? page)
         whiteboard-page? (db-model/whiteboard-page? page)
-        untitled? (db-model/untitled-page? original-name)
+        untitled? (db-model/untitled-page? title)
         name (:block/name page)
         name (:block/name page)
         file-rpath (when (util/electron?) (page-util/get-page-file-rpath name))
         file-rpath (when (util/electron?) (page-util/get-page-file-rpath name))
         ctx-icon #(shui/tabler-icon %1 {:class "scale-90 pr-1 opacity-80"})
         ctx-icon #(shui/tabler-icon %1 {:class "scale-90 pr-1 opacity-80"})
@@ -92,7 +92,7 @@
                            [:<>
                            [:<>
                             (when-not recent?
                             (when-not recent?
                               (x-menu-item
                               (x-menu-item
-                               {:on-click #(page-handler/<unfavorite-page! original-name)}
+                               {:on-click #(page-handler/<unfavorite-page! title)}
                                (ctx-icon "star-off")
                                (ctx-icon "star-off")
                                (t :page/unfavorite)
                                (t :page/unfavorite)
                                (x-menu-shortcut (when-let [binding (shortcut-dh/shortcut-binding :command/toggle-favorite)]
                                (x-menu-shortcut (when-let [binding (shortcut-dh/shortcut-binding :command/toggle-favorite)]
@@ -133,7 +133,7 @@
      [:span.page-icon.ml-3.justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)]
      [:span.page-icon.ml-3.justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)]
      [:span.page-title {:class (when untitled? "opacity-50")}
      [:span.page-title {:class (when untitled? "opacity-50")}
       (if untitled? (t :untitled)
       (if untitled? (t :untitled)
-          (pdf-utils/fix-local-asset-pagename original-name))]
+          (pdf-utils/fix-local-asset-pagename title))]
 
 
      ;; dots trigger
      ;; dots trigger
      (shui/button
      (shui/button
@@ -194,7 +194,7 @@
       (for [page pages]
       (for [page pages]
         [:li.recent-item.select-none
         [:li.recent-item.select-none
          {:key (str "recent-" (:db/id page))
          {:key (str "recent-" (:db/id page))
-          :title (:block/original-name page)
+          :title (:block/title page)
           :draggable true
           :draggable true
           :on-drag-start (fn [event] (editor-handler/block->data-transfer! (:block/name page) event true))
           :on-drag-start (fn [event] (editor-handler/block->data-transfer! (:block/name page) event true))
           :data-ref name}
           :data-ref name}

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

@@ -293,6 +293,6 @@
          (ui/button (t :export-save-to-file)
          (ui/button (t :export-save-to-file)
                     :on-click #(let [file-name (if (uuid? root-block-uuids-or-page-uuid)
                     :on-click #(let [file-name (if (uuid? root-block-uuids-or-page-uuid)
                                                  (-> (db/get-page root-block-uuids-or-page-uuid)
                                                  (-> (db/get-page root-block-uuids-or-page-uuid)
-                                                     (util/get-page-original-name))
+                                                     (util/get-page-title))
                                                  (t/now))]
                                                  (t/now))]
                                  (utils/saveToFile (js/Blob. [@*content]) (str "logseq_" file-name) (if (= tp :text) "txt" (name tp)))))])]]))
                                  (utils/saveToFile (js/Blob. [@*content]) (str "logseq_" file-name) (if (= tp :text) "txt" (name tp)))))])]]))

+ 7 - 7
src/main/frontend/components/file.cljs

@@ -103,7 +103,7 @@
   (let [repo-dir (config/get-repo-dir (state/get-current-repo))
   (let [repo-dir (config/get-repo-dir (state/get-current-repo))
         rel-path (when (string/starts-with? path repo-dir)
         rel-path (when (string/starts-with? path repo-dir)
                    (path/trim-dir-prefix repo-dir path))
                    (path/trim-dir-prefix repo-dir path))
-        original-name (db/get-file-page (or path rel-path))
+        title (db/get-file-page (or path rel-path))
         in-db? (when-not (path/absolute? path)
         in-db? (when-not (path/absolute? path)
                  (boolean (db/get-file (or path rel-path))))
                  (boolean (db/get-file (or path rel-path))))
         file-path (cond
         file-path (cond
@@ -120,22 +120,22 @@
     [:div.file {:id (str "file-edit-wrapper-" random-id)
     [:div.file {:id (str "file-edit-wrapper-" random-id)
                 :key path}
                 :key path}
      [:h1.title
      [:h1.title
-      [:bdi (or original-name rel-path path)]]
-     (when original-name
+      [:bdi (or title rel-path path)]]
+     (when title
        [:div.text-sm.mb-4.ml-1 "Page: "
        [:div.text-sm.mb-4.ml-1 "Page: "
         [:a.bg-base-2.p-1.ml-1 {:style {:border-radius 4}
         [:a.bg-base-2.p-1.ml-1 {:style {:border-radius 4}
-                                :href (rfe/href :page {:name original-name})
+                                :href (rfe/href :page {:name title})
                                 :on-click (fn [e]
                                 :on-click (fn [e]
                                             (when (gobj/get e "shiftKey")
                                             (when (gobj/get e "shiftKey")
-                                              (when-let [page (db/get-page original-name)]
+                                              (when-let [page (db/get-page title)]
                                                 (state/sidebar-add-block!
                                                 (state/sidebar-add-block!
                                                  (state/get-current-repo)
                                                  (state/get-current-repo)
                                                  (:db/id page)
                                                  (:db/id page)
                                                  :page))
                                                  :page))
                                               (util/stop e)))}
                                               (util/stop e)))}
-         original-name]])
+         title]])
 
 
-     (when (and original-name (not (string/starts-with? original-name "logseq/")))
+     (when (and title (not (string/starts-with? title "logseq/")))
        [:p.text-sm.ml-1.mb-4
        [:p.text-sm.ml-1.mb-4
         (svg/warning {:style {:width "1em"
         (svg/warning {:style {:width "1em"
                               :display "inline-block"}})
                               :display "inline-block"}})

+ 2 - 2
src/main/frontend/components/file_based/hierarchy.cljs

@@ -29,10 +29,10 @@
                          (distinct)
                          (distinct)
                          (sort-by :block/name)
                          (sort-by :block/name)
                          (map (fn [page]
                          (map (fn [page]
-                                (or (:block/original-name page) (:block/name page))))
+                                (or (:block/title page) (:block/name page))))
                          (map #(string/split % "/")))
                          (map #(string/split % "/")))
               page-namespace (db-model/get-page-namespace repo page)
               page-namespace (db-model/get-page-namespace repo page)
-              page-namespace (util/get-page-original-name page-namespace)]
+              page-namespace (util/get-page-title page-namespace)]
           (cond
           (cond
             (seq pages)
             (seq pages)
             {:namespaces pages
             {:namespaces pages

+ 1 - 1
src/main/frontend/components/file_sync.cljs

@@ -632,7 +632,7 @@
         [list-ready? set-list-ready?] (rum/use-state false)
         [list-ready? set-list-ready?] (rum/use-state false)
         [content-ready? set-content-ready?] (rum/use-state false)
         [content-ready? set-content-ready?] (rum/use-state false)
         *ref-contents      (rum/use-ref (atom {}))
         *ref-contents      (rum/use-ref (atom {}))
-        original-page-name (or (:block/original-name page-entity) page-name)]
+        original-page-name (or (:block/title page-entity) page-name)]
 
 
     (rum/use-effect!
     (rum/use-effect!
      #(when selected-page
      #(when selected-page

+ 26 - 26
src/main/frontend/components/page.cljs

@@ -229,7 +229,7 @@
              (str repo "-custom-query-" (:query query))))]))))
              (str repo "-custom-query-" (:query query))))]))))
 
 
 (rum/defc tagged-pages
 (rum/defc tagged-pages
-  [repo tag tag-original-name]
+  [repo tag tag-title]
   (let [[pages set-pages!] (rum/use-state nil)]
   (let [[pages set-pages!] (rum/use-state nil)]
     (rum/use-effect!
     (rum/use-effect!
      (fn []
      (fn []
@@ -240,9 +240,9 @@
       [:div.references.page-tags.mt-6.flex-1.flex-row
       [:div.references.page-tags.mt-6.flex-1.flex-row
        [:div.content
        [:div.content
         (ui/foldable
         (ui/foldable
-         [:h2.font-bold.opacity-50 (util/format "Pages tagged with \"%s\"" tag-original-name)]
+         [:h2.font-bold.opacity-50 (util/format "Pages tagged with \"%s\"" tag-title)]
          [:ul.mt-2
          [:ul.mt-2
-          (for [page (sort-by :block/original-name pages)]
+          (for [page (sort-by :block/title pages)]
             [:li {:key (str "tagged-page-" (:db/id page))}
             [:li {:key (str "tagged-page-" (:db/id page))}
              (component-block/page-cp {} page)])]
              (component-block/page-cp {} page)])]
          {:default-collapsed? false})]])))
          {:default-collapsed? false})]])))
@@ -318,18 +318,18 @@
      :on-click #(swap! *show-page-info? not)}
      :on-click #(swap! *show-page-info? not)}
     "Configure")])
     "Configure")])
 
 
-(rum/defcs ^:large-vars/cleanup-todo page-title < rum/reactive
+(rum/defcs ^:large-vars/cleanup-todo page-title-cp < rum/reactive
   (rum/local false ::edit?)
   (rum/local false ::edit?)
   (rum/local "" ::input-value)
   (rum/local "" ::input-value)
   {:init (fn [state]
   {:init (fn [state]
            (let [page (first (:rum/args state))
            (let [page (first (:rum/args state))
-                 original-name (:block/original-name page)
-                 *title-value (atom original-name)]
+                 title (:block/title page)
+                 *title-value (atom title)]
              (assoc state ::title-value *title-value)))}
              (assoc state ::title-value *title-value)))}
   [state page {:keys [fmt-journal? preview? *hover? *show-page-info?]}]
   [state page {:keys [fmt-journal? preview? *hover? *show-page-info?]}]
   (when page
   (when page
     (let [page (db/sub-block (:db/id page))
     (let [page (db/sub-block (:db/id page))
-          title (:block/original-name page)]
+          title (:block/title page)]
       (when title
       (when title
         (let [journal? (ldb/journal-page? page)
         (let [journal? (ldb/journal-page? page)
               icon (get page (pu/get-pid :logseq.property/icon))
               icon (get page (pu/get-pid :logseq.property/icon))
@@ -366,7 +366,7 @@
             {:class (when-not whiteboard-page? "title")
             {:class (when-not whiteboard-page? "title")
              :on-pointer-down (fn [e]
              :on-pointer-down (fn [e]
                                 (when (util/right-click? e)
                                 (when (util/right-click? e)
-                                  (state/set-state! :page-title/context {:page (:block/original-name page)
+                                  (state/set-state! :page-title/context {:page (:block/title page)
                                                                          :page-entity page})))
                                                                          :page-entity page})))
              :on-click (fn [e]
              :on-click (fn [e]
                          (when-not (= (.-nodeName (.-target e)) "INPUT")
                          (when-not (= (.-nodeName (.-target e)) "INPUT")
@@ -388,7 +388,7 @@
               (page-title-editor page {:*title-value *title-value
               (page-title-editor page {:*title-value *title-value
                                        :*edit? *edit?
                                        :*edit? *edit?
                                        :*input-value *input-value
                                        :*input-value *input-value
-                                       :page-name (:block/original-name page)
+                                       :page-name (:block/title page)
                                        :old-name old-name
                                        :old-name old-name
                                        :untitled? untitled?
                                        :untitled? untitled?
                                        :whiteboard-page? whiteboard-page?
                                        :whiteboard-page? whiteboard-page?
@@ -398,7 +398,7 @@
                             (when (and (state/home?) (not preview?))
                             (when (and (state/home?) (not preview?))
                               (route-handler/redirect-to-page! (:block/uuid page))))
                               (route-handler/redirect-to-page! (:block/uuid page))))
                 :data-value @*input-value
                 :data-value @*input-value
-                :data-ref   (:block/original-name page)
+                :data-ref   (:block/title page)
                 :style      {:opacity (when @*edit? 0)}}
                 :style      {:opacity (when @*edit? 0)}}
                (let [nested? (and (string/includes? title page-ref/left-brackets)
                (let [nested? (and (string/includes? title page-ref/left-brackets)
                                   (string/includes? title page-ref/right-brackets))]
                                   (string/includes? title page-ref/right-brackets))]
@@ -494,8 +494,8 @@
           whiteboard-page? (model/whiteboard-page? page) ;; is this page a whiteboard?
           whiteboard-page? (model/whiteboard-page? page) ;; is this page a whiteboard?
           route-page-name path-page-name
           route-page-name path-page-name
           page-name (:block/name page)
           page-name (:block/name page)
-          page-original-name (:block/original-name page)
-          title (or page-original-name page-name)
+          page-title (:block/title page)
+          title (or page-title page-name)
           today? (and
           today? (and
                   journal?
                   journal?
                   (= page-name (util/page-name-sanity-lc (date/journal-name))))
                   (= page-name (util/page-name-sanity-lc (date/journal-name))))
@@ -506,7 +506,7 @@
       (when (or page-name block-or-whiteboard?)
       (when (or page-name block-or-whiteboard?)
         [:div.flex-1.page.relative
         [:div.flex-1.page.relative
          (merge (if (seq (:block/tags page))
          (merge (if (seq (:block/tags page))
-                  (let [page-names (map :block/original-name (:block/tags page))]
+                  (let [page-names (map :block/title (:block/tags page))]
                     (when (seq page-names)
                     (when (seq page-names)
                       {:data-page-tags (text-util/build-data-value page-names)}))
                       {:data-page-tags (text-util/build-data-value page-names)}))
                   {})
                   {})
@@ -528,11 +528,11 @@
                                      (page-mouse-leave e *control-show?))}
                                      (page-mouse-leave e *control-show?))}
                   (page-blocks-collapse-control title *control-show? *all-collapsed?)])
                   (page-blocks-collapse-control title *control-show? *all-collapsed?)])
                (when (and (not whiteboard?) (ldb/page? page))
                (when (and (not whiteboard?) (ldb/page? page))
-                 (page-title page {:journal? journal?
-                                   :fmt-journal? fmt-journal?
-                                   :preview? preview?
-                                   :*hover? (::hover-title? state)
-                                   :*show-page-info? (::show-page-info? state)}))
+                 (page-title-cp page {:journal? journal?
+                                      :fmt-journal? fmt-journal?
+                                      :preview? preview?
+                                      :*hover? (::hover-title? state)
+                                      :*show-page-info? (::show-page-info? state)}))
                (when (not config/publishing?)
                (when (not config/publishing?)
                  (when config/lsp-enabled?
                  (when config/lsp-enabled?
                    [:div.flex.flex-row
                    [:div.flex.flex-row
@@ -555,15 +555,15 @@
 
 
             (when-not (and db-based? (ldb/class? page))
             (when-not (and db-based? (ldb/class? page))
               [:div
               [:div
-              (when (and block? (not sidebar?) (not whiteboard?))
-                (let [config (merge config {:id "block-parent"
-                                            :block? true})]
-                  [:div.mb-4
-                   (component-block/breadcrumb config repo block-id {:level-limit 3})]))
+               (when (and block? (not sidebar?) (not whiteboard?))
+                 (let [config (merge config {:id "block-parent"
+                                             :block? true})]
+                   [:div.mb-4
+                    (component-block/breadcrumb config repo block-id {:level-limit 3})]))
 
 
              ;; blocks
              ;; blocks
-              (page-blocks-cp repo page (merge option {:sidebar? sidebar?
-                                                       :whiteboard? whiteboard?}))])])
+               (page-blocks-cp repo page (merge option {:sidebar? sidebar?
+                                                        :whiteboard? whiteboard?}))])])
 
 
          (when @(::main-ready? state)
          (when @(::main-ready? state)
            [:div {:style {:padding-left 9}}
            [:div {:style {:padding-left 9}}
@@ -574,7 +574,7 @@
               (scheduled/scheduled-and-deadlines page-name))
               (scheduled/scheduled-and-deadlines page-name))
 
 
             (when (and (not block?) (not db-based?))
             (when (and (not block?) (not db-based?))
-              (tagged-pages repo page page-original-name))
+              (tagged-pages repo page page-title))
 
 
             (when (contains? (:block/type page) "class")
             (when (contains? (:block/type page) "class")
               (class-component/class-children page))
               (class-component/class-children page))

+ 6 - 6
src/main/frontend/components/page_menu.cljs

@@ -25,7 +25,7 @@
   [page]
   [page]
   (page-handler/<delete! (:block/uuid page)
   (page-handler/<delete! (:block/uuid page)
                         (fn []
                         (fn []
-                          (notification/show! (str "Page " (:block/original-name page) " was deleted successfully!")
+                          (notification/show! (str "Page " (:block/title page) " was deleted successfully!")
                                               :success))
                                               :success))
                         {:error-handler (fn [{:keys [msg]}]
                         {:error-handler (fn [{:keys [msg]}]
                                           (notification/show! msg :warning))}))
                                           (notification/show! msg :warning))}))
@@ -40,7 +40,7 @@
                    (if (config/db-based-graph? (state/get-current-repo))
                    (if (config/db-based-graph? (state/get-current-repo))
                      (t :page/db-delete-confirmation)
                      (t :page/db-delete-confirmation)
                      (t :page/delete-confirmation))]
                      (t :page/delete-confirmation))]
-           :content [:p.opacity-60 (str "- " (:block/original-name page))]
+           :content [:p.opacity-60 (str "- " (:block/title page))]
            :outside-cancel? true})
            :outside-cancel? true})
       (p/then #(delete-page! page))
       (p/then #(delete-page! page))
       (p/catch #()))))
       (p/catch #()))))
@@ -49,7 +49,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 [repo (state/sub :git/current-repo)
     (let [repo (state/sub :git/current-repo)
-          page-original-name (:block/original-name page)
+          page-title (:block/title page)
           whiteboard? (contains? (set (:block/type page)) "whiteboard")
           whiteboard? (contains? (set (:block/type page)) "whiteboard")
           block? (and page (util/uuid-string? page-name) (not whiteboard?))
           block? (and page (util/uuid-string? page-name) (not whiteboard?))
           contents? (= page-name "contents")
           contents? (= page-name "contents")
@@ -74,8 +74,8 @@
              :options {:on-click
              :options {:on-click
                        (fn []
                        (fn []
                          (if favorited?
                          (if favorited?
-                           (page-handler/<unfavorite-page! page-original-name)
-                           (page-handler/<favorite-page! page-original-name)))}})
+                           (page-handler/<unfavorite-page! page-title)
+                           (page-handler/<favorite-page! page-title)))}})
 
 
           (when (or (util/electron?) file-sync-graph-uuid)
           (when (or (util/electron?) file-sync-graph-uuid)
             {:title   (t :page/version-history)
             {:title   (t :page/version-history)
@@ -95,7 +95,7 @@
           (when (or (util/electron?)
           (when (or (util/electron?)
                     (mobile-util/native-platform?))
                     (mobile-util/native-platform?))
             {:title   (t :page/copy-page-url)
             {:title   (t :page/copy-page-url)
-             :options {:on-click #(page-handler/copy-page-url page-original-name)}})
+             :options {:on-click #(page-handler/copy-page-url page-title)}})
 
 
           (when-not (or contents?
           (when-not (or contents?
                         config/publishing?
                         config/publishing?

+ 11 - 11
src/main/frontend/components/property.cljs

@@ -99,7 +99,7 @@
           (if (seq schema-classes)
           (if (seq schema-classes)
             [:div.flex.flex-1.flex-row.items-center.flex-wrap.gap-2
             [:div.flex.flex-1.flex-row.items-center.flex-wrap.gap-2
              (for [class schema-classes]
              (for [class schema-classes]
-               [:a.text-sm (str "#" (:block/original-name class))])]
+               [:a.text-sm (str "#" (:block/title class))])]
             (pv/property-empty-btn-value))])])))
             (pv/property-empty-btn-value))])])))
 
 
 (defn- property-type-label
 (defn- property-type-label
@@ -160,7 +160,7 @@
                           *show-class-select?
                           *show-class-select?
                           default-open? page-configure? class-schema?]
                           default-open? page-configure? class-schema?]
                    :as opts}]
                    :as opts}]
-  (let [property-name (or (and *property-name @*property-name) (:block/original-name property))
+  (let [property-name (or (and *property-name @*property-name) (:block/title property))
         property-schema (or (and *property-schema @*property-schema) (:block/schema property))
         property-schema (or (and *property-schema @*property-schema) (:block/schema property))
         schema-types (->> (concat db-property-type/user-built-in-property-types
         schema-types (->> (concat db-property-type/user-built-in-property-types
                                   (when built-in?
                                   (when built-in?
@@ -245,7 +245,7 @@
              (assoc state ::values *values)))
              (assoc state ::values *values)))
    :will-mount (fn [state]
    :will-mount (fn [state]
                  (let [[property _opts] (:rum/args state)]
                  (let [[property _opts] (:rum/args state)]
-                   (reset! (::property-name state) (:block/original-name property))
+                   (reset! (::property-name state) (:block/title property))
                    (reset! (::property-schema state) (:block/schema property))
                    (reset! (::property-schema state) (:block/schema property))
                    (state/set-state! :editor/property-configure? true)
                    (state/set-state! :editor/property-configure? true)
                    state))
                    state))
@@ -412,14 +412,14 @@
          (set-properties! (remove exclude-properties properties))
          (set-properties! (remove exclude-properties properties))
          (set-excluded-properties! (->> properties
          (set-excluded-properties! (->> properties
                                         (filter exclude-properties)
                                         (filter exclude-properties)
-                                        (map :block/original-name)
+                                        (map :block/title)
                                         set))))
                                         set))))
      [])
      [])
     [:div.ls-property-add.flex.flex-row.items-center.property-key
     [:div.ls-property-add.flex.flex-row.items-center.property-key
      [:div.ls-property-key
      [:div.ls-property-key
       (select/select (merge
       (select/select (merge
                       {:items (map (fn [x]
                       {:items (map (fn [x]
-                                     {:label (:block/original-name x)
+                                     {:label (:block/title x)
                                       :value (:block/uuid x)}) properties)
                                       :value (:block/uuid x)}) properties)
                        :extract-fn :label
                        :extract-fn :label
                        :dropdown? false
                        :dropdown? false
@@ -523,10 +523,10 @@
         *property-schema (::property-schema state)
         *property-schema (::property-schema state)
         existing-tag-alias (->> db-property/db-attribute-properties
         existing-tag-alias (->> db-property/db-attribute-properties
                                 (map db-property/built-in-properties)
                                 (map db-property/built-in-properties)
-                                (keep #(when (get block (:attribute %)) (:original-name %)))
+                                (keep #(when (get block (:attribute %)) (:title %)))
                                 set)
                                 set)
         exclude-properties (fn [m]
         exclude-properties (fn [m]
-                             (or (and (not page?) (contains? existing-tag-alias (:block/original-name m)))
+                             (or (and (not page?) (contains? existing-tag-alias (:block/title m)))
                                  ;; Filters out properties from being in wrong :view-context
                                  ;; Filters out properties from being in wrong :view-context
                                  (and (not page?) (= :page (get-in m [:block/schema :view-context])))
                                  (and (not page?) (= :page (get-in m [:block/schema :view-context])))
                                  (and page? (= :block (get-in m [:block/schema :view-context])))))
                                  (and page? (= :block (get-in m [:block/schema :view-context])))))
@@ -589,7 +589,7 @@
   [state block property {:keys [class-schema? page-cp inline-text other-position?]}]
   [state block property {:keys [class-schema? page-cp inline-text other-position?]}]
   (let [*hover? (::hover? state)
   (let [*hover? (::hover? state)
         icon (:logseq.property/icon property)
         icon (:logseq.property/icon property)
-        property-name (:block/original-name property)]
+        property-name (:block/title property)]
     [:div.flex.flex-row.items-center.gap-1
     [:div.flex.flex-row.items-center.gap-1
      {:on-mouse-over   #(reset! *hover? true)
      {:on-mouse-over   #(reset! *hover? true)
       :on-mouse-leave  #(reset! *hover? false)
       :on-mouse-leave  #(reset! *hover? false)
@@ -635,11 +635,11 @@
      (if config/publishing?
      (if config/publishing?
        [:a.property-k.flex.select-none.jtrigger
        [:a.property-k.flex.select-none.jtrigger
         {:on-click #(route-handler/redirect-to-page! (:block/uuid property))}
         {:on-click #(route-handler/redirect-to-page! (:block/uuid property))}
-        (:block/original-name property)]
+        (:block/title property)]
 
 
        (shui/trigger-as :a
        (shui/trigger-as :a
                         {:tabIndex 0
                         {:tabIndex 0
-                         :title (str "Configure property: " (:block/original-name property))
+                         :title (str "Configure property: " (:block/title property))
                          :class "property-k flex select-none jtrigger w-full"
                          :class "property-k flex select-none jtrigger w-full"
                          :on-pointer-down (fn [^js e]
                          :on-pointer-down (fn [^js e]
                                             (when (util/meta-key? e)
                                             (when (util/meta-key? e)
@@ -666,7 +666,7 @@
                                        :align "start"
                                        :align "start"
                                        :auto-side? true
                                        :auto-side? true
                                        :auto-focus? true}))}
                                        :auto-focus? true}))}
-                        (:block/original-name property)))]))
+                        (:block/title property)))]))
 
 
 (defn- resolve-linked-block-if-exists
 (defn- resolve-linked-block-if-exists
   "Properties will be updated for the linked page instead of the refed block.
   "Properties will be updated for the linked page instead of the refed block.

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

@@ -117,7 +117,7 @@
   [state item {:keys [toggle-fn delete-choice update-icon]} parent-opts]
   [state item {:keys [toggle-fn delete-choice update-icon]} parent-opts]
   (let [*hover? (::hover? state)
   (let [*hover? (::hover? state)
         value (db-property/closed-value-content item)
         value (db-property/closed-value-content item)
-        page? (:block/original-name item)
+        page? (:block/title item)
         property-block? (db-property/property-created-block? item)]
         property-block? (db-property/property-created-block? item)]
     [:div.flex.flex-1.flex-row.items-center.gap-2.justify-between
     [:div.flex.flex-1.flex-row.items-center.gap-2.justify-between
      {:on-mouse-over #(reset! *hover? true)
      {:on-mouse-over #(reset! *hover? true)

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

@@ -4,7 +4,7 @@
 
 
 (defn update-property!
 (defn update-property!
   [property property-name property-schema]
   [property property-name property-schema]
-  (when (or (not= (:block/original-name property) property-name)
+  (when (or (not= (:block/title property) property-name)
             (not= (:block/schema property) property-schema))
             (not= (:block/schema property) property-schema))
     (db-property-handler/upsert-property!
     (db-property-handler/upsert-property!
      (:db/ident property)
      (:db/ident property)

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

@@ -188,7 +188,7 @@
   [value {:keys [on-change editing? multiple-values? other-position?]}]
   [value {:keys [on-change editing? multiple-values? other-position?]}]
   (let [*trigger-ref (rum/use-ref nil)
   (let [*trigger-ref (rum/use-ref nil)
         page value
         page value
-        title (when page (:block/original-name page))
+        title (when page (:block/title page))
         value' (when title
         value' (when title
                  (js/Date. (date/journal-title->long title)))
                  (js/Date. (date/journal-title->long title)))
         content-fn (fn [{:keys [id]}] (calendar-inner id on-change value'))
         content-fn (fn [{:keys [id]}] (calendar-inner id on-change value'))
@@ -276,7 +276,7 @@
   (let [selected-choices (->> selected-choices
   (let [selected-choices (->> selected-choices
                               (remove nil?)
                               (remove nil?)
                               (remove #(= :logseq.property/empty-placeholder %)))
                               (remove #(= :logseq.property/empty-placeholder %)))
-        clear-value (str "No " (:block/original-name property))
+        clear-value (str "No " (:block/title property))
         clear-value-label [:div.flex.flex-row.items-center.gap-2
         clear-value-label [:div.flex.flex-row.items-center.gap-2
                            (ui/icon "x")
                            (ui/icon "x")
                            [:div clear-value]]
                            [:div clear-value]]
@@ -309,7 +309,7 @@
 
 
 (defn- get-title
 (defn- get-title
   [e]
   [e]
-  (or (:block/original-name e)
+  (or (:block/title e)
       (:block/content e)))
       (:block/content e)))
 
 
 (rum/defc select-page < rum/reactive db-mixins/query
 (rum/defc select-page < rum/reactive db-mixins/query
@@ -391,10 +391,10 @@
                                                                  (mapcat #(model/get-class-children repo (:db/id %)))
                                                                  (mapcat #(model/get-class-children repo (:db/id %)))
                                                                  (map #(db/entity repo %)))]
                                                                  (map #(db/entity repo %)))]
                                      (->> (concat classes' descendent-classes)
                                      (->> (concat classes' descendent-classes)
-                                          (filter #(string/includes? (:block/original-name %) class-input))
+                                          (filter #(string/includes? (:block/title %) class-input))
                                           (mapv (fn [p]
                                           (mapv (fn [p]
-                                                  {:value (str new-page "#" (:block/original-name p))
-                                                   :label (str new-page "#" (:block/original-name p))}))))
+                                                  {:value (str new-page "#" (:block/title p))
+                                                   :label (str new-page "#" (:block/title p))}))))
                                    results))))]
                                    results))))]
     (select-aux block property opts')))
     (select-aux block property opts')))
 
 
@@ -464,7 +464,7 @@
                                    :value value})))
                                    :value value})))
                          (distinct)))
                          (distinct)))
             items (->> (if (= :date type)
             items (->> (if (= :date type)
-                         (map (fn [m] (let [label (:block/original-name (db/entity (:value m)))]
+                         (map (fn [m] (let [label (:block/title (db/entity (:value m)))]
                                         (when label
                                         (when label
                                           (assoc m :label label)))) items)
                                           (assoc m :label label)))) items)
                          items)
                          items)
@@ -848,5 +848,5 @@
            (shui/tooltip-trigger
            (shui/tooltip-trigger
              {:onFocusCapture #(util/stop-propagation %)} value-cp)
              {:onFocusCapture #(util/stop-propagation %)} value-cp)
            (shui/tooltip-content
            (shui/tooltip-content
-             (str "Change " (:block/original-name property)))))
+             (str "Change " (:block/title property)))))
        value-cp))))
        value-cp))))

+ 4 - 4
src/main/frontend/components/query/builder.cljs

@@ -142,7 +142,7 @@
          (set-properties! properties)))
          (set-properties! properties)))
      [])
      [])
     (select (map #(hash-map :db/ident (:db/ident %)
     (select (map #(hash-map :db/ident (:db/ident %)
-                            :value (:block/original-name %))
+                            :value (:block/title %))
                  properties)
                  properties)
             (fn [{value :value db-ident :db/ident}]
             (fn [{value :value db-ident :db/ident}]
               (reset! *mode "property-value")
               (reset! *mode "property-value")
@@ -191,7 +191,7 @@
          (set-values! result)))
          (set-values! result)))
      [])
      [])
     (let [items (->> values
     (let [items (->> values
-                     (map :block/original-name)
+                     (map :block/title)
                      sort)]
                      sort)]
       (select items
       (select items
               (fn [{:keys [value]}]
               (fn [{:keys [value]}]
@@ -256,13 +256,13 @@
                               (append-tree! *tree opts loc (vec (cons :priority choices)))))})
                               (append-tree! *tree opts loc (vec (cons :priority choices)))))})
 
 
        "page"
        "page"
-       (let [pages (sort (db-model/get-all-page-original-names repo))]
+       (let [pages (sort (db-model/get-all-page-titles repo))]
          (select pages
          (select pages
                  (fn [{:keys [value]}]
                  (fn [{:keys [value]}]
                    (append-tree! *tree opts loc [:page value]))))
                    (append-tree! *tree opts loc [:page value]))))
 
 
        "page reference"
        "page reference"
-       (let [pages (sort (db-model/get-all-page-original-names repo))]
+       (let [pages (sort (db-model/get-all-page-titles repo))]
          (select pages
          (select pages
                  (fn [{:keys [value]}]
                  (fn [{:keys [value]}]
                    (append-tree! *tree opts loc [:page-ref value]))
                    (append-tree! *tree opts loc [:page-ref value]))

+ 3 - 3
src/main/frontend/components/query_table.cljs

@@ -66,7 +66,7 @@
                           result)
                           result)
                     result)
                     result)
           sort-by-column' (if (and db-graph? (qualified-keyword? sort-by-column))
           sort-by-column' (if (and db-graph? (qualified-keyword? sort-by-column))
-                            (:block/original-name (db-utils/entity repo sort-by-column))
+                            (:block/title (db-utils/entity repo sort-by-column))
                             sort-by-column)]
                             sort-by-column)]
       (sort-by (fn [item]
       (sort-by (fn [item]
                  (block/normalize-block (sort-by-fn sort-by-column' item {:page? page? :db-graph? db-graph?})
                  (block/normalize-block (sort-by-fn sort-by-column' item {:page? page? :db-graph? db-graph?})
@@ -157,9 +157,9 @@
   (case column
   (case column
     :page
     :page
     [:string (if page?
     [:string (if page?
-               (or (:block/original-name row)
+               (or (:block/title row)
                    (:block/name row))
                    (:block/name row))
-               (or (get-in row [:block/page :block/original-name])
+               (or (get-in row [:block/page :block/title])
                    (get-in row [:block/page :block/name])))]
                    (get-in row [:block/page :block/name])))]
 
 
     :block       ; block title
     :block       ; block title

+ 2 - 2
src/main/frontend/components/reference.cljs

@@ -158,7 +158,7 @@
         filtered-ref-blocks' (map first result)
         filtered-ref-blocks' (map first result)
         ref-pages (->>
         ref-pages (->>
                    (mapcat second result)
                    (mapcat second result)
-                   (map :block/original-name)
+                   (map :block/title)
                    frequencies)]
                    frequencies)]
     (reset! *ref-pages ref-pages)
     (reset! *ref-pages ref-pages)
     (when (or (seq (:included filters)) (seq (:excluded filters)) (> filter-n 0))
     (when (or (seq (:included filters)) (seq (:excluded filters)) (> filter-n 0))
@@ -207,7 +207,7 @@
     (when (seq ref-blocks)
     (when (seq ref-blocks)
       [:div.references-blocks
       [:div.references-blocks
        (let [ref-hiccup (block/->hiccup ref-blocks
        (let [ref-hiccup (block/->hiccup ref-blocks
-                                        {:id (str (:block/original-name page) "-unlinked-")
+                                        {:id (str (:block/title page) "-unlinked-")
                                          :ref? true
                                          :ref? true
                                          :group-by-page? true
                                          :group-by-page? true
                                          :editor-box editor/box}
                                          :editor-box editor/box}

+ 1 - 1
src/main/frontend/components/reference_filters.cljs

@@ -20,7 +20,7 @@
   [page filters filtered-references*]
   [page filters filtered-references*]
   [:div.flex.gap-2.flex-wrap.items-center
   [:div.flex.gap-2.flex-wrap.items-center
    (let [filtered-references (if (de/entity? (first filtered-references*))
    (let [filtered-references (if (de/entity? (first filtered-references*))
-                               (map (fn [e] [(:block/original-name e)]) filtered-references*)
+                               (map (fn [e] [(:block/title e)]) filtered-references*)
                                filtered-references*)] <
                                filtered-references*)] <
         (for [[ref-name ref-count] filtered-references]
         (for [[ref-name ref-count] filtered-references]
           (when ref-name
           (when ref-name

+ 2 - 2
src/main/frontend/components/right_sidebar.cljs

@@ -102,7 +102,7 @@
         (if-let [icon (pu/get-block-property-value page :logseq.property/icon)]
         (if-let [icon (pu/get-block-property-value page :logseq.property/icon)]
           [:.text-md.mr-2 icon]
           [:.text-md.mr-2 icon]
           (ui/icon (if (contains? (:block/type page) "whiteboard") "whiteboard" "page") {:class "text-md mr-2"}))
           (ui/icon (if (contains? (:block/type page) "whiteboard") "whiteboard" "page") {:class "text-md mr-2"}))
-        [:span.overflow-hidden.text-ellipsis (:block/original-name page)]]
+        [:span.overflow-hidden.text-ellipsis (:block/title page)]]
        (page-cp repo page-name)])
        (page-cp repo page-name)])
 
 
     :search
     :search
@@ -124,7 +124,7 @@
     :page-slide-view
     :page-slide-view
     (let [page (db/entity db-id)]
     (let [page (db/entity db-id)]
       [[:a.page-title {:href (rfe/href :page {:name (str (:block/uuid page))})}
       [[:a.page-title {:href (rfe/href :page {:name (str (:block/uuid page))})}
-        (:block/original-name page)]
+        (:block/title page)]
        [:div.ml-2.slide.mt-2
        [:div.ml-2.slide.mt-2
         (slide/slide page)]])
         (slide/slide page)]])
 
 

+ 10 - 10
src/main/frontend/components/views.cljs

@@ -155,7 +155,7 @@
                               (or (db/entity ident) property))]
                               (or (db/entity ident) property))]
                {:id ident
                {:id ident
                 :name (or (:name property)
                 :name (or (:name property)
-                          (:block/original-name property))
+                          (:block/title property))
                 :header (or (:header property)
                 :header (or (:header property)
                             header-cp)
                             header-cp)
                 :cell (or (:cell property)
                 :cell (or (:cell property)
@@ -226,7 +226,7 @@
   (case (:id column)
   (case (:id column)
     :select 32
     :select 32
     :add-property 160
     :add-property 160
-    (:object/name :block/original-name :block/name :block/content) 360
+    (:object/name :block/title :block/name :block/content) 360
     (:block/created-at :block/updated-at) 160
     (:block/created-at :block/updated-at) 160
     180))
     180))
 
 
@@ -429,7 +429,7 @@
                              (let [id (:id column)
                              (let [id (:id column)
                                    property (db/entity id)
                                    property (db/entity id)
                                    internal-property {:db/ident (:id column)
                                    internal-property {:db/ident (:id column)
-                                                      :block/original-name (:name column)
+                                                      :block/title (:name column)
                                                       :block/schema {:type (:type column)}}]
                                                       :block/schema {:type (:type column)}}]
                                (if (or property
                                (if (or property
                                        (= :db.cardinality/many (:db/cardinality (get schema id)))
                                        (= :db.cardinality/many (:db/cardinality (get schema id)))
@@ -447,7 +447,7 @@
                  timestamp?
                  timestamp?
                  (merge option
                  (merge option
                         {:items timestamp-options
                         {:items timestamp-options
-                         :input-default-placeholder (if property (:block/original-name property) "Select")
+                         :input-default-placeholder (if property (:block/title property) "Select")
                          :on-chosen (fn [value]
                          :on-chosen (fn [value]
                                       (shui/popup-hide!)
                                       (shui/popup-hide!)
                                       (let [filters' (conj filters [(:db/ident property) :after value])]
                                       (let [filters' (conj filters [(:db/ident property) :after value])]
@@ -458,14 +458,14 @@
                                 {:value false :label "false"}]]
                                 {:value false :label "false"}]]
                      (merge option
                      (merge option
                             {:items items
                             {:items items
-                             :input-default-placeholder (if property (:block/original-name property) "Select")
+                             :input-default-placeholder (if property (:block/title property) "Select")
                              :on-chosen (fn [value]
                              :on-chosen (fn [value]
                                           (let [filters' (conj filters [(:db/ident property) :is value])]
                                           (let [filters' (conj filters [(:db/ident property) :is value])]
                                             (set-filters! filters')))}))
                                             (set-filters! filters')))}))
                    (let [items (get-property-values (:data table) property)]
                    (let [items (get-property-values (:data table) property)]
                      (merge option
                      (merge option
                             {:items items
                             {:items items
-                             :input-default-placeholder (if property (:block/original-name property) "Select")
+                             :input-default-placeholder (if property (:block/title property) "Select")
                              :multiple-choices? true
                              :multiple-choices? true
                              :on-chosen (fn [_value _selected? selected]
                              :on-chosen (fn [_value _selected? selected]
                                           (let [selected-value (if (de/entity? (first selected))
                                           (let [selected-value (if (de/entity? (first selected))
@@ -627,7 +627,7 @@
                 false
                 false
                 true)
                 true)
         option (cond->
         option (cond->
-                {:input-default-placeholder (:block/original-name property)
+                {:input-default-placeholder (:block/title property)
                  :input-opts {:class "!px-3 !py-1"}
                  :input-opts {:class "!px-3 !py-1"}
                  :items items
                  :items items
                  :extract-fn :label
                  :extract-fn :label
@@ -715,18 +715,18 @@
           (let [[property-ident operator value] filter
           (let [[property-ident operator value] filter
                 property (if (= property-ident :object/name)
                 property (if (= property-ident :object/name)
                            {:db/ident property-ident
                            {:db/ident property-ident
-                            :block/original-name "Name"}
+                            :block/title "Name"}
                            (or (db/entity property-ident)
                            (or (db/entity property-ident)
                                (some (fn [column] (when (= (:id column) property-ident)
                                (some (fn [column] (when (= (:id column) property-ident)
                                                     {:db/ident (:id column)
                                                     {:db/ident (:id column)
-                                                     :block/original-name (:name column)})) columns)))]
+                                                     :block/title (:name column)})) columns)))]
             [:div.flex.flex-row.items-center.border.rounded
             [:div.flex.flex-row.items-center.border.rounded
              (shui/button
              (shui/button
               {:class "!px-2 rounded-none border-r"
               {:class "!px-2 rounded-none border-r"
                :variant "ghost"
                :variant "ghost"
                :size :sm
                :size :sm
                :disabled true}
                :disabled true}
-              [:span.text-xs (:block/original-name property)])
+              [:span.text-xs (:block/title property)])
              (filter-operator property operator filters set-filters! idx)
              (filter-operator property operator filters set-filters! idx)
              (filter-value table property operator value filters set-filters! idx)
              (filter-value table property operator value filters set-filters! idx)
              (shui/button
              (shui/button

+ 2 - 2
src/main/frontend/components/whiteboard.cljs

@@ -104,7 +104,7 @@
      [:div.dashboard-card-title-name.font-bold
      [:div.dashboard-card-title-name.font-bold
       (if (common-util/uuid-string? (:block/name whiteboard))
       (if (common-util/uuid-string? (:block/name whiteboard))
         [:span.opacity-50 (t :untitled)]
         [:span.opacity-50 (t :untitled)]
-        (:block/original-name whiteboard))]
+        (:block/title whiteboard))]
      [:div.flex-1]
      [:div.flex-1]
      [:div.dashboard-card-checkbox
      [:div.dashboard-card-checkbox
       {:tab-index -1
       {:tab-index -1
@@ -208,7 +208,7 @@
       [:div.whiteboard-page-title
       [:div.whiteboard-page-title
        {:style {:color "var(--ls-primary-text-color)"
        {:style {:color "var(--ls-primary-text-color)"
                 :user-select "none"}}
                 :user-select "none"}}
-       (page/page-title page {:*hover? (atom false)})]
+       (page/page-title-cp page {:*hover? (atom false)})]
 
 
       (references-count (:block/uuid page) "text-md cursor-pointer" {})]
       (references-count (:block/uuid page) "text-md cursor-pointer" {})]
      (tldraw-app page-uuid block-id)]))
      (tldraw-app page-uuid block-id)]))

+ 8 - 9
src/main/frontend/db/async.cljs

@@ -54,10 +54,10 @@
   [graph]
   [graph]
   (p/let [result (<q graph
   (p/let [result (<q graph
                      {:transact-db? false}
                      {:transact-db? false}
-                     '[:find [(pull ?e [:block/uuid :db/ident :block/original-name :block/schema]) ...]
+                     '[:find [(pull ?e [:block/uuid :db/ident :block/title :block/schema]) ...]
                        :where
                        :where
                        [?e :block/type "property"]
                        [?e :block/type "property"]
-                       [?e :block/original-name]])]
+                       [?e :block/title]])]
     (->> result
     (->> result
          ;; remove private built-in properties
          ;; remove private built-in properties
          (remove #(and (:db/ident %)
          (remove #(and (:db/ident %)
@@ -66,15 +66,15 @@
 
 
 (defn <get-all-properties
 (defn <get-all-properties
   "Returns all public properties as property maps including their
   "Returns all public properties as property maps including their
-  :block/original-name and :db/ident. For file graphs the map only contains
-  :block/original-name"
+  :block/title and :db/ident. For file graphs the map only contains
+  :block/title"
   []
   []
   (when-let [graph (state/get-current-repo)]
   (when-let [graph (state/get-current-repo)]
     (if (config/db-based-graph? graph)
     (if (config/db-based-graph? graph)
       (<db-based-get-all-properties graph)
       (<db-based-get-all-properties graph)
       (p/let [properties (file-async/<file-based-get-all-properties graph)
       (p/let [properties (file-async/<file-based-get-all-properties graph)
               hidden-properties (set (map name (property-util/hidden-properties)))]
               hidden-properties (set (map name (property-util/hidden-properties)))]
-        (remove #(hidden-properties (:block/original-name %)) properties)))))
+        (remove #(hidden-properties (:block/title %)) properties)))))
 
 
 (defn <file-get-property-values
 (defn <file-get-property-values
   "For file graphs, returns property value names for given property name"
   "For file graphs, returns property value names for given property name"
@@ -106,9 +106,8 @@
                          [?b ?property-id ?vid]
                          [?b ?property-id ?vid]
                          [(not= ?vid :logseq.property/empty-placeholder)]
                          [(not= ?vid :logseq.property/empty-placeholder)]
                          (or
                          (or
-                          [?vid :block/content ?value]
                           [?vid :property.value/content ?value]
                           [?vid :property.value/content ?value]
-                          [?vid :block/original-name ?value])]
+                          [?vid :block/title ?value])]
                        property-id
                        property-id
                        value)]
                        value)]
       (db/entity (:db/id (first result))))))
       (db/entity (:db/id (first result))))))
@@ -235,7 +234,7 @@
 (defn <get-tag-pages
 (defn <get-tag-pages
   [graph tag-id]
   [graph tag-id]
   (<q graph {:transact-db? true}
   (<q graph {:transact-db? true}
-      '[:find [(pull ?page [:db/id :block/uuid :block/name :block/original-name :block/created-at :block/updated-at])]
+      '[:find [(pull ?page [:db/id :block/uuid :block/name :block/title :block/created-at :block/updated-at])]
         :in $ ?tag-id
         :in $ ?tag-id
         :where
         :where
         [?page :block/tags ?tag-id]
         [?page :block/tags ?tag-id]
@@ -266,7 +265,7 @@
 (defn <get-tags
 (defn <get-tags
   [graph]
   [graph]
   (<q graph {:transact-db? false}
   (<q graph {:transact-db? false}
-      '[:find [(pull ?tag [:db/id :block/original-name])]
+      '[:find [(pull ?tag [:db/id :block/title])]
         :where
         :where
         [?tag :block/type "class"]]))
         [?tag :block/type "class"]]))
 
 

+ 1 - 1
src/main/frontend/db/file_based/async.cljs

@@ -19,7 +19,7 @@
          distinct
          distinct
          sort
          sort
          (map name)
          (map name)
-         (map #(hash-map :block/original-name %)))))
+         (map #(hash-map :block/title %)))))
 
 
 (defn- property-value-for-refs-and-text
 (defn- property-value-for-refs-and-text
   "Given a property value's refs and full text, determines the value to
   "Given a property value's refs and full text, determines the value to

+ 12 - 12
src/main/frontend/db/model.cljs

@@ -33,7 +33,7 @@
   (d/q '[:find ?page-name ?tag
   (d/q '[:find ?page-name ?tag
          :where
          :where
          [?page :block/tags ?e]
          [?page :block/tags ?e]
-         [?e :block/original-name ?tag]
+         [?e :block/title ?tag]
          [?page :block/name ?page-name]]
          [?page :block/name ?page-name]]
        (conn/get-db repo)))
        (conn/get-db repo)))
 
 
@@ -42,10 +42,10 @@
   (let [db (conn/get-db repo)]
   (let [db (conn/get-db repo)]
     (ldb/get-all-pages db)))
     (ldb/get-all-pages db)))
 
 
-(defn get-all-page-original-names
+(defn get-all-page-titles
   [repo]
   [repo]
   (->> (get-all-pages repo)
   (->> (get-all-pages repo)
-       (map :block/original-name)))
+       (map :block/title)))
 
 
 (defn get-page-alias
 (defn get-page-alias
   [repo page-name]
   [repo page-name]
@@ -210,14 +210,14 @@ independent of format as format specific heading characters are stripped"
         alias-ids (->> (page-alias-set repo page-id)
         alias-ids (->> (page-alias-set repo page-id)
                        (remove #{page-id}))]
                        (remove #{page-id}))]
     (when (seq alias-ids)
     (when (seq alias-ids)
-      (map (fn [id] (:block/original-name (db-utils/entity id))) alias-ids))))
+      (map (fn [id] (:block/title (db-utils/entity id))) alias-ids))))
 
 
 (defn with-pages
 (defn with-pages
   [blocks]
   [blocks]
   (let [pages-ids (->> (map (comp :db/id :block/page) blocks)
   (let [pages-ids (->> (map (comp :db/id :block/page) blocks)
                        (remove nil?))
                        (remove nil?))
         pages (when (seq pages-ids)
         pages (when (seq pages-ids)
-                (db-utils/pull-many '[:db/id :block/name :block/original-name :block/journal-day] pages-ids))
+                (db-utils/pull-many '[:db/id :block/name :block/title :block/journal-day] pages-ids))
         pages-map (reduce (fn [acc p] (assoc acc (:db/id p) p)) {} pages)
         pages-map (reduce (fn [acc p] (assoc acc (:db/id p) p)) {} pages)
         blocks (map
         blocks (map
                 (fn [block]
                 (fn [block]
@@ -416,18 +416,18 @@ independent of format as format specific heading characters are stripped"
 (defn get-file-page
 (defn get-file-page
   ([file-path]
   ([file-path]
    (get-file-page file-path true))
    (get-file-page file-path true))
-  ([file-path original-name?]
+  ([file-path title?]
    (when-let [repo (state/get-current-repo)]
    (when-let [repo (state/get-current-repo)]
      (when-let [db (conn/get-db repo)]
      (when-let [db (conn/get-db repo)]
        (some->
        (some->
         (d/q
         (d/q
-         (if original-name?
+         (if title?
            '[:find ?page-name
            '[:find ?page-name
              :in $ ?path
              :in $ ?path
              :where
              :where
              [?file :file/path ?path]
              [?file :file/path ?path]
              [?page :block/file ?file]
              [?page :block/file ?file]
-             [?page :block/original-name ?page-name]]
+             [?page :block/title ?page-name]]
            '[:find ?page-name
            '[:find ?page-name
              :in $ ?path
              :in $ ?path
              :where
              :where
@@ -736,7 +736,7 @@ independent of format as format specific heading characters are stripped"
     '[:find [(pull ?page [:db/id
     '[:find [(pull ?page [:db/id
                           :block/uuid
                           :block/uuid
                           :block/name
                           :block/name
-                          :block/original-name
+                          :block/title
                           :block/created-at
                           :block/created-at
                           :block/updated-at]) ...]
                           :block/updated-at]) ...]
       :where
       :where
@@ -765,7 +765,7 @@ independent of format as format specific heading characters are stripped"
    '[:find ?name ?id
    '[:find ?name ?id
      :where
      :where
      [?page :block/type "class"]
      [?page :block/type "class"]
-     [?page :block/original-name ?name]
+     [?page :block/title ?name]
      [?page :block/uuid ?id]]
      [?page :block/uuid ?id]]
     (conn/get-db repo)))
     (conn/get-db repo)))
 
 
@@ -808,7 +808,7 @@ independent of format as format specific heading characters are stripped"
          :where
          :where
          [?page :block/name ?page-name]
          [?page :block/name ?page-name]
          [?page :block/namespace ?e]
          [?page :block/namespace ?e]
-         [?e :block/original-name ?parent]]
+         [?e :block/title ?parent]]
     (conn/get-db repo)))
     (conn/get-db repo)))
 
 
 (defn get-all-namespace-parents
 (defn get-all-namespace-parents
@@ -929,7 +929,7 @@ independent of format as format specific heading characters are stripped"
                        (map :e)))]
                        (map :e)))]
         (when (seq ids)
         (when (seq ids)
           (db-utils/pull-many repo
           (db-utils/pull-many repo
-                              '[:db/id :block/name :block/original-name
+                              '[:db/id :block/name :block/title
                                 {:block/file [:db/id :file/path]}]
                                 {:block/file [:db/id :file/path]}]
                               ids))))))
                               ids))))))
 
 

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

@@ -652,7 +652,7 @@ Some bindings in this fn:
   "Like ldb/block-attrs but for query dsl an db graphs"
   "Like ldb/block-attrs but for query dsl an db graphs"
   ;; '*' needed as we need to pull user properties and don't know their names in advance
   ;; '*' needed as we need to pull user properties and don't know their names in advance
   '[*
   '[*
-    {:block/page [:db/id :block/name :block/original-name :block/journal-day]}
+    {:block/page [:db/id :block/name :block/title :block/journal-day]}
     {:block/_parent ...}])
     {:block/_parent ...}])
 
 
 (defn query
 (defn query

+ 1 - 1
src/main/frontend/extensions/pdf/assets.cljs

@@ -245,7 +245,7 @@
   [block]
   [block]
   (let [id (:block/uuid block)
   (let [id (:block/uuid block)
         page (db/entity (:db/id (:block/page block)))
         page (db/entity (:db/id (:block/page block)))
-        page-name (:block/original-name page)
+        page-name (:block/title page)
         file-path (pu/get-block-property-value block :logseq.property.pdf/file-path)
         file-path (pu/get-block-property-value block :logseq.property.pdf/file-path)
         hl-page (pu/get-block-property-value block :logseq.property.pdf/hl-page)
         hl-page (pu/get-block-property-value block :logseq.property.pdf/hl-page)
         db-base? (config/db-based-graph? (state/get-current-repo))]
         db-base? (config/db-based-graph? (state/get-current-repo))]

+ 1 - 1
src/main/frontend/extensions/slide.cljs

@@ -104,7 +104,7 @@
                        (render!)))))
                        (render!)))))
                 state)}
                 state)}
   [page]
   [page]
-  (let [page-name (:block/original-name page)
+  (let [page-name (:block/title page)
         loading? (rum/react *loading?)
         loading? (rum/react *loading?)
         journal? (ldb/journal-page? page)
         journal? (ldb/journal-page? page)
         repo (state/get-current-repo)
         repo (state/get-current-repo)

+ 1 - 1
src/main/frontend/external/roam_export.cljs

@@ -77,7 +77,7 @@
 
 
              (update-todo)
              (update-todo)
 
 
-             (s/rename-keys {:block/original-name :page/title
+             (s/rename-keys {:block/title :page/title
                              :block/content :block/string})
                              :block/content :block/string})
 
 
              (select-keys keyseq))
              (select-keys keyseq))

+ 1 - 1
src/main/frontend/format/block.cljs

@@ -80,7 +80,7 @@ and handles unexpected failure."
                  (merge block new-block)
                  (merge block new-block)
                   (> (count blocks) 1)
                   (> (count blocks) 1)
                   (assoc :block/warning :multiple-blocks))
                   (assoc :block/warning :multiple-blocks))
-          block (dissoc block :block/title :block/body :block/level)]
+          block (dissoc block :block/body :block/level)]
       (if uuid (assoc block :block/uuid uuid) block))))
       (if uuid (assoc block :block/uuid uuid) block))))
 
 
 (defn parse-title-and-body
 (defn parse-title-and-body

+ 2 - 2
src/main/frontend/handler/block.cljs

@@ -81,7 +81,7 @@
             (when (:block/name ref)
             (when (:block/name ref)
               {:db/id (:db/id ref)
               {:db/id (:db/id ref)
                :block/name (:block/name ref)
                :block/name (:block/name ref)
-               :block/original-name (:block/original-name ref)})) refs)))
+               :block/title (:block/title ref)})) refs)))
 
 
 (defn filter-blocks
 (defn filter-blocks
   [ref-blocks filters]
   [ref-blocks filters]
@@ -199,7 +199,7 @@
              db-graph? (config/db-based-graph? repo)
              db-graph? (config/db-based-graph? repo)
              block (or (db/entity [:block/uuid block-id]) block)
              block (or (db/entity [:block/uuid block-id]) block)
              content (if (and db-graph? (:block/name block))
              content (if (and db-graph? (:block/name block))
-                       (:block/original-name block)
+                       (:block/title block)
                        (or custom-content (:block/content block) ""))
                        (or custom-content (:block/content block) ""))
              content-length (count content)
              content-length (count content)
              text-range (cond
              text-range (cond

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

@@ -34,7 +34,7 @@
                              (into {})))
                              (into {})))
                  (seq (:block/refs result*))
                  (seq (:block/refs result*))
                  (assoc :block.debug/refs
                  (assoc :block.debug/refs
-                        (mapv #(or (:block/original-name (db/entity (:db/id %))) %) (:block/refs result*))))
+                        (mapv #(or (:block/title (db/entity (:db/id %))) %) (:block/refs result*))))
         pull-data (with-out-str (pprint/pprint result))]
         pull-data (with-out-str (pprint/pprint result))]
     (println pull-data)
     (println pull-data)
     (notification/show!
     (notification/show!

+ 2 - 2
src/main/frontend/handler/db_based/editor.cljs

@@ -64,8 +64,8 @@
   (let [content (:block/content block)
   (let [content (:block/content block)
         content' (if (some :block/name (:block/refs block))
         content' (if (some :block/name (:block/refs block))
                    (reduce
                    (reduce
-                    (fn [content {:block/keys [original-name uuid]}]
-                      (replace-page-ref-with-id content original-name uuid))
+                    (fn [content {:block/keys [title uuid]}]
+                      (replace-page-ref-with-id content title uuid))
                     content
                     content
                     (filter :block/name (:block/refs block)))
                     (filter :block/name (:block/refs block)))
                    content)]
                    content)]

+ 3 - 3
src/main/frontend/handler/db_based/property/util.cljs

@@ -8,7 +8,7 @@
 (defn get-property-name
 (defn get-property-name
   "Get a property's name given its id"
   "Get a property's name given its id"
   [id]
   [id]
-  (:block/original-name (db-utils/entity id)))
+  (:block/title (db-utils/entity id)))
 
 
 (defn get-property-value
 (defn get-property-value
   "Get a property's name given its id"
   "Get a property's name given its id"
@@ -38,7 +38,7 @@
    (->> properties
    (->> properties
      (map (fn [[k v]]
      (map (fn [[k v]]
             (let [prop-ent (db-utils/entity k)]
             (let [prop-ent (db-utils/entity k)]
-              [(if original-key? k (-> prop-ent :block/original-name keyword))
+              [(if original-key? k (-> prop-ent :block/title keyword))
                (cond
                (cond
                  (set? v)
                  (set? v)
                  (set (map db-property/property-value-content v))
                  (set (map db-property/property-value-content v))
@@ -57,4 +57,4 @@
   [property-id]
   [property-id]
   (let [repo (state/get-current-repo)
   (let [repo (state/get-current-repo)
         db (conn/get-db repo)]
         db (conn/get-db repo)]
-    (db-property/get-closed-property-values db property-id)))
+    (db-property/get-closed-property-values db property-id)))

+ 2 - 2
src/main/frontend/handler/editor.cljs

@@ -769,7 +769,7 @@
       (when-let [sibling-entity (db/entity [:block/uuid (uuid sibling-block-id)])]
       (when-let [sibling-entity (db/entity [:block/uuid (uuid sibling-block-id)])]
         (if (:block/name sibling-entity)
         (if (:block/name sibling-entity)
           {:prev-block sibling-entity
           {:prev-block sibling-entity
-           :new-value (:block/original-name sibling-entity)
+           :new-value (:block/title sibling-entity)
            :edit-block-f #(edit-block! sibling-entity :max)}
            :edit-block-f #(edit-block! sibling-entity :max)}
           (let [db? (config/db-based-graph? repo)
           (let [db? (config/db-based-graph? repo)
                 original-content (if (= (:db/id sibling-entity) (:db/id (state/get-edit-block)))
                 original-content (if (= (:db/id sibling-entity) (:db/id (state/get-edit-block)))
@@ -1304,7 +1304,7 @@
       (let [value (string/trim value)]
       (let [value (string/trim value)]
         ;; FIXME: somehow frontend.components.editor's will-unmount event will loop forever
         ;; FIXME: somehow frontend.components.editor's will-unmount event will loop forever
         ;; maybe we shouldn't save the block/file in "will-unmount" event?
         ;; maybe we shouldn't save the block/file in "will-unmount" event?
-        (if (:block/original-name entity)
+        (if (:block/title entity)
           (let [existing-tags (:block/tags block)
           (let [existing-tags (:block/tags block)
                 tags (mldoc/extract-tags value)]
                 tags (mldoc/extract-tags value)]
             (when (seq tags)
             (when (seq tags)

+ 1 - 1
src/main/frontend/handler/export.cljs

@@ -89,7 +89,7 @@
        (and (map? x) (contains? x :block/uuid))
        (and (map? x) (contains? x :block/uuid))
        (-> x
        (-> x
            (s/rename-keys {:block/uuid :block/id
            (s/rename-keys {:block/uuid :block/id
-                           :block/original-name :block/page-name})
+                           :block/title :block/page-name})
            (dissoc-properties [:id])
            (dissoc-properties [:id])
            (select-keys keyseq))
            (select-keys keyseq))
 
 

+ 1 - 1
src/main/frontend/handler/export/opml.cljs

@@ -444,7 +444,7 @@
            (common/get-page-content root-block-uuids-or-page-uuid)
            (common/get-page-content root-block-uuids-or-page-uuid)
            (common/root-block-uuids->content repo root-block-uuids-or-page-uuid))
            (common/root-block-uuids->content repo root-block-uuids-or-page-uuid))
          title (if (uuid? root-block-uuids-or-page-uuid)
          title (if (uuid? root-block-uuids-or-page-uuid)
-                 (:block/original-name (db/entity [:block/uuid root-block-uuids-or-page-uuid]))
+                 (:block/title (db/entity [:block/uuid root-block-uuids-or-page-uuid]))
                  "untitled")
                  "untitled")
          first-block (and (coll? root-block-uuids-or-page-uuid)
          first-block (and (coll? root-block-uuids-or-page-uuid)
                           (db/entity [:block/uuid (first root-block-uuids-or-page-uuid)]))
                           (db/entity [:block/uuid (first root-block-uuids-or-page-uuid)]))

+ 1 - 1
src/main/frontend/handler/file_based/repo.cljs

@@ -220,7 +220,7 @@
                   result (parse-and-load-file! repo-url file opts')
                   result (parse-and-load-file! repo-url file opts')
                   page-name (when (coll? result) ; result could be a promise
                   page-name (when (coll? result) ; result could be a promise
                               (some (fn [x] (when (and (map? x)
                               (some (fn [x] (when (and (map? x)
-                                                       (:block/original-name x)
+                                                       (:block/title x)
                                                        (= (:file/path file) (:file/path (:block/file x))))
                                                        (= (:file/path file) (:file/path (:block/file x))))
                                               (:block/name x)))
                                               (:block/name x)))
                                     result))
                                     result))

+ 12 - 12
src/main/frontend/handler/graph.cljs

@@ -68,12 +68,12 @@
    nodes))
    nodes))
 
 
 (defn- normalize-page-name
 (defn- normalize-page-name
-  [{:keys [nodes links page-name->original-name]}]
+  [{:keys [nodes links page-name->title]}]
   (let [links (->>
   (let [links (->>
                (map
                (map
                  (fn [{:keys [source target]}]
                  (fn [{:keys [source target]}]
-                   (let [source (get page-name->original-name source)
-                         target (get page-name->original-name target)]
+                   (let [source (get page-name->title source)
+                         target (get page-name->title target)]
                      (when (and source target)
                      (when (and source target)
                        {:source source :target target})))
                        {:source source :target target})))
                  links)
                  links)
@@ -81,8 +81,8 @@
         nodes (->> (remove-uuids-and-files! nodes)
         nodes (->> (remove-uuids-and-files! nodes)
                    (util/distinct-by (fn [node] (:id node)))
                    (util/distinct-by (fn [node] (:id node)))
                    (map (fn [node]
                    (map (fn [node]
-                          (if-let [original-name (get page-name->original-name (:id node))]
-                            (assoc node :id original-name :label original-name)
+                          (if-let [title (get page-name->title (:id node))]
+                            (assoc node :id title :label title)
                             nil)))
                             nil)))
                    (remove nil?))]
                    (remove nil?))]
     {:nodes nodes
     {:nodes nodes
@@ -99,8 +99,8 @@
             tags (set (map second tagged-pages))
             tags (set (map second tagged-pages))
             full-pages (db/get-all-pages repo)
             full-pages (db/get-all-pages repo)
             full-pages-map (into {} (map (juxt :block/name identity) full-pages))
             full-pages-map (into {} (map (juxt :block/name identity) full-pages))
-            all-pages (map common-util/get-page-original-name full-pages)
-            page-name->original-name (zipmap (map :block/name full-pages) all-pages)
+            all-pages (map common-util/get-page-title full-pages)
+            page-name->title (zipmap (map :block/name full-pages) all-pages)
             created-ats (map :block/created-at full-pages)
             created-ats (map :block/created-at full-pages)
 
 
             ;; build up nodes
             ;; build up nodes
@@ -131,7 +131,7 @@
             nodes (build-nodes dark? (string/lower-case current-page) page-links tags nodes namespaces)]
             nodes (build-nodes dark? (string/lower-case current-page) page-links tags nodes namespaces)]
         (-> {:nodes (map #(assoc % :block/created-at (get-in full-pages-map [(:id %) :block/created-at])) nodes)
         (-> {:nodes (map #(assoc % :block/created-at (get-in full-pages-map [(:id %) :block/created-at])) nodes)
              :links links
              :links links
-             :page-name->original-name page-name->original-name}
+             :page-name->title page-name->title}
             normalize-page-name
             normalize-page-name
             (assoc :all-pages
             (assoc :all-pages
                    {:created-at-min (apply min created-ats)
                    {:created-at-min (apply min created-ats)
@@ -190,12 +190,12 @@
                        (distinct))
                        (distinct))
             nodes (build-nodes dark? page links (set tags) nodes namespaces)
             nodes (build-nodes dark? page links (set tags) nodes namespaces)
             full-pages (db/get-all-pages repo)
             full-pages (db/get-all-pages repo)
-            all-pages (map common-util/get-page-original-name full-pages)
-            page-name->original-name (zipmap (map :block/name full-pages) all-pages)]
+            all-pages (map common-util/get-page-title full-pages)
+            page-name->title (zipmap (map :block/name full-pages) all-pages)]
         (normalize-page-name
         (normalize-page-name
          {:nodes nodes
          {:nodes nodes
           :links links
           :links links
-          :page-name->original-name page-name->original-name})))))
+          :page-name->title page-name->title})))))
 
 
 (defn build-block-graph
 (defn build-block-graph
   "Builds a citation/reference graph for a given block uuid."
   "Builds a citation/reference graph for a given block uuid."
@@ -269,4 +269,4 @@
 (defn get-metadata-local
 (defn get-metadata-local
   []
   []
   (let [k :ls-graphs-metadata]
   (let [k :ls-graphs-metadata]
-    (storage/get k)))
+    (storage/get k)))

+ 1 - 1
src/main/frontend/handler/route.cljs

@@ -139,7 +139,7 @@
                             (if (> (count content) 48)
                             (if (> (count content) 48)
                               (str (subs content 0 48) "...")
                               (str (subs content 0 48) "...")
                               content))))
                               content))))
-          block-name (:block/original-name page)
+          block-name (:block/title page)
           block-name' (when block-name
           block-name' (when block-name
                         (if (common-util/uuid-string? block-name)
                         (if (common-util/uuid-string? block-name)
                           "Untitled"
                           "Untitled"

+ 5 - 5
src/main/frontend/handler/whiteboard.cljs

@@ -41,7 +41,7 @@
                 (if-let [page-id (:pageId shape)]
                 (if-let [page-id (:pageId shape)]
                   (let [page (db/get-page page-id)]
                   (let [page (db/get-page page-id)]
                     ;; Used in page preview
                     ;; Used in page preview
-                    (assoc shape :pageName (:block/original-name page)))
+                    (assoc shape :pageName (:block/title page)))
                   shape))))))
                   shape))))))
 
 
 (defn- whiteboard-clj->tldr [page-block blocks]
 (defn- whiteboard-clj->tldr [page-block blocks]
@@ -67,7 +67,7 @@
                      :nonce (get-k "nonce")
                      :nonce (get-k "nonce")
                      :assets (js->clj-keywordize assets)}]
                      :assets (js->clj-keywordize assets)}]
     {:db/id (:db/id page-entity)
     {:db/id (:db/id page-entity)
-     :block/original-name page-name
+     :block/title page-name
      :block/name (util/page-name-sanity-lc page-name)
      :block/name (util/page-name-sanity-lc page-name)
      :block/type #{"page" "whiteboard"}
      :block/type #{"page" "whiteboard"}
      :block/format :markdown
      :block/format :markdown
@@ -80,7 +80,7 @@
 (defn file-build-page-block
 (defn file-build-page-block
   [page-entity page-name tldraw-page assets]
   [page-entity page-name tldraw-page assets]
   (let [get-k #(gobj/get tldraw-page %)]
   (let [get-k #(gobj/get tldraw-page %)]
-    {:block/original-name page-name
+    {:block/title page-name
      :block/name (util/page-name-sanity-lc page-name)
      :block/name (util/page-name-sanity-lc page-name)
      :block/type #{"page" "whiteboard"}
      :block/type #{"page" "whiteboard"}
      :block/properties {(pu/get-pid :logseq.property/ls-type)
      :block/properties {(pu/get-pid :logseq.property/ls-type)
@@ -137,7 +137,7 @@
                                     (if-let [new-order (when new-id->order (get new-id->order (str (:block/uuid block))))]
                                     (if-let [new-order (when new-id->order (get new-id->order (str (:block/uuid block))))]
                                       (assoc block :block/order new-order)
                                       (assoc block :block/order new-order)
                                       block))))
                                       block))))
-        page-name (or (:block/original-name page-entity) (str page-uuid))
+        page-name (or (:block/title page-entity) (str page-uuid))
         page-block (build-page-block page-entity page-name tl-page assets)]
         page-block (build-page-block page-entity page-name tl-page assets)]
     (when (or (seq upserted-blocks)
     (when (or (seq upserted-blocks)
               (seq deleted-shapes-tx)
               (seq deleted-shapes-tx)
@@ -252,7 +252,7 @@
                     (pu/get-pid :logseq.property.tldraw/page) tldraw-page}
                     (pu/get-pid :logseq.property.tldraw/page) tldraw-page}
         m #:block{:uuid id
         m #:block{:uuid id
                   :name (util/page-name-sanity-lc page-name),
                   :name (util/page-name-sanity-lc page-name),
-                  :original-name page-name
+                  :title page-name
                   :type #{"whiteboard" "page"},
                   :type #{"whiteboard" "page"},
                   :format :markdown
                   :format :markdown
                   :updated-at (util/time-ms),
                   :updated-at (util/time-ms),

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

@@ -74,7 +74,7 @@
    (when q
    (when q
      (p/let [q (fuzzy/clean-str q)
      (p/let [q (fuzzy/clean-str q)
              properties* (db-async/<get-all-properties)
              properties* (db-async/<get-all-properties)
-             properties (map :block/original-name properties*)]
+             properties (map :block/title properties*)]
        (when (seq properties)
        (when (seq properties)
          (if (string/blank? q)
          (if (string/blank? q)
            properties
            properties
@@ -128,7 +128,7 @@
     (p/let [page (db/entity page-id)
     (p/let [page (db/entity page-id)
             alias-names (conj (set (map util/safe-page-name-sanity-lc
             alias-names (conj (set (map util/safe-page-name-sanity-lc
                                         (db/get-page-alias-names repo page-id)))
                                         (db/get-page-alias-names repo page-id)))
-                              (:block/original-name page))
+                              (:block/title page))
             q (string/join " " alias-names)
             q (string/join " " alias-names)
             result (block-search repo q {:limit 100})
             result (block-search repo q {:limit 100})
             eids (map (fn [b] [:block/uuid (:block/uuid b)]) result)
             eids (map (fn [b] [:block/uuid (:block/uuid b)]) result)

+ 1 - 1
src/main/frontend/template.cljs

@@ -21,7 +21,7 @@
                           page (if block-uuid
                           page (if block-uuid
                                  (:block/page (db-utils/entity [:block/uuid block-uuid]))
                                  (:block/page (db-utils/entity [:block/uuid block-uuid]))
                                  (ldb/get-page (conn/get-db) current-page))
                                  (ldb/get-page (conn/get-db) current-page))
-                          current-page' (:block/original-name page)]
+                          current-page' (:block/title page)]
                       (page-ref/->page-ref current-page')))})
                       (page-ref/->page-ref current-page')))})
 
 
 ;; TODO: programmable
 ;; TODO: programmable

+ 1 - 1
src/main/frontend/util.cljc

@@ -1018,7 +1018,7 @@
    (def safe-page-name-sanity-lc common-util/safe-page-name-sanity-lc))
    (def safe-page-name-sanity-lc common-util/safe-page-name-sanity-lc))
 
 
 #?(:cljs
 #?(:cljs
-   (def get-page-original-name common-util/get-page-original-name))
+   (def get-page-title common-util/get-page-title))
 
 
 #?(:cljs
 #?(:cljs
    (defn add-style!
    (defn add-style!

+ 2 - 2
src/main/frontend/util/page.cljs

@@ -7,8 +7,8 @@
 (defn get-current-page-name
 (defn get-current-page-name
   "Fetch the current page's original name with same approach as get-current-page-id"
   "Fetch the current page's original name with same approach as get-current-page-id"
   []
   []
-  (or (:block/original-name (db/get-page (state/get-current-page)))
-      (get-in (first (state/get-editor-args)) [:block :block/page :block/original-name])))
+  (or (:block/title (db/get-page (state/get-current-page)))
+      (get-in (first (state/get-editor-args)) [:block :block/page :block/title])))
 
 
 (defn get-current-page-id
 (defn get-current-page-id
   "Fetches the current page id. Looks up page based on latest route and if
   "Fetches the current page id. Looks up page based on latest route and if

+ 2 - 2
src/main/frontend/worker/export.cljs

@@ -35,7 +35,7 @@
   (->> (d/q '[:find (pull ?b [*])
   (->> (d/q '[:find (pull ?b [*])
               :in $
               :in $
               :where
               :where
-              [?b :block/original-name]
+              [?b :block/title]
               [?b :block/name]] db)
               [?b :block/name]] db)
 
 
        (map (fn [[page]]
        (map (fn [[page]]
@@ -61,5 +61,5 @@
   (->> (d/datoms db :avet :block/name)
   (->> (d/datoms db :avet :block/name)
        (map (fn [d]
        (map (fn [d]
               (let [e (d/entity db (:e d))]
               (let [e (d/entity db (:e d))]
-                [(:block/original-name e)
+                [(:block/title e)
                  (block->content repo db (:block/uuid e) {} {})])))))
                  (block->content repo db (:block/uuid e) {} {})])))))

+ 1 - 1
src/main/frontend/worker/file/core.cljs

@@ -141,7 +141,7 @@
           journal-page? (and journal-page? (not (string/blank? journal-title)))
           journal-page? (and journal-page? (not (string/blank? journal-title)))
           filename (if journal-page?
           filename (if journal-page?
                      (worker-date/date->file-name journal-title (:journal-file-name-format context))
                      (worker-date/date->file-name journal-title (:journal-file-name-format context))
-                     (-> (or (:block/original-name page-block) (:block/name page-block))
+                     (-> (or (:block/title page-block) (:block/name page-block))
                          wfu/file-name-sanity))
                          wfu/file-name-sanity))
           sub-dir (cond
           sub-dir (cond
                     journal-page?    (:journals-directory context)
                     journal-page?    (:journals-directory context)

+ 31 - 31
src/main/frontend/worker/handler/page/db_based/rename.cljs

@@ -10,46 +10,46 @@
 ;; FIXME: bring it back, decouple this from page renaming though
 ;; FIXME: bring it back, decouple this from page renaming though
 (comment
 (comment
   (defn merge-pages!
   (defn merge-pages!
-   [repo conn config from-page to-page]
-   (let [from-page-name (:block/original-name from-page)
-         to-page-name (:block/original-name to-page)]
-     (when (and from-page to-page
-                (not= from-page-name to-page-name))
-       (let [db @conn
-             to-id (:db/id to-page)
-             from-id (:db/id from-page)
-             datoms (d/datoms @conn :avet :block/page from-id)
-             block-eids (mapv :e datoms)
-             blocks (d/pull-many db '[:db/id :block/page :block/refs :block/path-refs :block/parent] block-eids)
-             blocks-tx-data (map (fn [block]
-                                   (let [id (:db/id block)]
-                                     (cond->
-                                      {:db/id id
-                                       :block/page {:db/id to-id}
-                                       :block/refs (rename-update-block-refs! (:block/refs block) from-id to-id)
-                                       :block/order (db-order/gen-key nil)}
+    [repo conn config from-page to-page]
+    (let [from-page-name (:block/title from-page)
+          to-page-name (:block/title to-page)]
+      (when (and from-page to-page
+                 (not= from-page-name to-page-name))
+        (let [db @conn
+              to-id (:db/id to-page)
+              from-id (:db/id from-page)
+              datoms (d/datoms @conn :avet :block/page from-id)
+              block-eids (mapv :e datoms)
+              blocks (d/pull-many db '[:db/id :block/page :block/refs :block/path-refs :block/parent] block-eids)
+              blocks-tx-data (map (fn [block]
+                                    (let [id (:db/id block)]
+                                      (cond->
+                                       {:db/id id
+                                        :block/page {:db/id to-id}
+                                        :block/refs (rename-update-block-refs! (:block/refs block) from-id to-id)
+                                        :block/order (db-order/gen-key nil)}
 
 
-                                       (= (:block/parent block) {:db/id from-id})
-                                       (assoc :block/parent {:db/id to-id})))) blocks)
-             replace-ref-tx-data (replace-page-ref from-page to-page)
-             tx-data (concat blocks-tx-data replace-ref-tx-data)]
+                                        (= (:block/parent block) {:db/id from-id})
+                                        (assoc :block/parent {:db/id to-id})))) blocks)
+              replace-ref-tx-data (replace-page-ref from-page to-page)
+              tx-data (concat blocks-tx-data replace-ref-tx-data)]
 
 
-         (rename-page-aux repo conn config from-page-name to-page-name
-                          :merge? true
-                          :other-tx tx-data)
+          (rename-page-aux repo conn config from-page-name to-page-name
+                           :merge? true
+                           :other-tx tx-data)
 
 
-         (worker-page/delete! repo conn (:block/uuid from-page) {:rename? true}))))))
+          (worker-page/delete! repo conn (:block/uuid from-page) {:rename? true}))))))
 
 
 (defn- rename-page-aux
 (defn- rename-page-aux
   "Only accepts unsanitized page names"
   "Only accepts unsanitized page names"
   [repo conn page new-name & {:keys [merge? other-tx]}]
   [repo conn page new-name & {:keys [merge? other-tx]}]
-  (let [old-page-name       (:block/original-name page)
+  (let [old-page-name       (:block/title page)
         new-page-name       (common-util/page-name-sanity-lc new-name)]
         new-page-name       (common-util/page-name-sanity-lc new-name)]
     (when (and repo page)
     (when (and repo page)
       (let [page-txs            (when-not merge?
       (let [page-txs            (when-not merge?
                                   [{:db/id               (:db/id page)
                                   [{:db/id               (:db/id page)
                                     :block/name          new-page-name
                                     :block/name          new-page-name
-                                    :block/original-name new-name}])
+                                    :block/title new-name}])
             txs (concat page-txs other-tx)]
             txs (concat page-txs other-tx)]
         (ldb/transact! conn txs {:outliner-op :rename-page
         (ldb/transact! conn txs {:outliner-op :rename-page
                                  :data (cond->
                                  :data (cond->
@@ -61,14 +61,14 @@
   "Original names (unsanitized only)"
   "Original names (unsanitized only)"
   [repo conn page new-name]
   [repo conn page new-name]
   (rename-page-aux repo conn page new-name)
   (rename-page-aux repo conn page new-name)
-  (println "Renamed " (:block/original-name page) " to " new-name))
+  (println "Renamed " (:block/title page) " to " new-name))
 
 
 (defn rename!
 (defn rename!
   [repo conn _config page-uuid new-name & {:keys [persist-op?]
   [repo conn _config page-uuid new-name & {:keys [persist-op?]
                                           :or {persist-op? true}}]
                                           :or {persist-op? true}}]
   (let [db @conn]
   (let [db @conn]
     (when-let [page-e (d/entity db [:block/uuid page-uuid])]
     (when-let [page-e (d/entity db [:block/uuid page-uuid])]
-      (let [old-name      (:block/original-name page-e)
+      (let [old-name      (:block/title page-e)
             new-name      (string/trim new-name)
             new-name      (string/trim new-name)
             old-page-name (common-util/page-name-sanity-lc old-name)
             old-page-name (common-util/page-name-sanity-lc old-name)
             new-page-name (common-util/page-name-sanity-lc new-name)
             new-page-name (common-util/page-name-sanity-lc new-name)
@@ -89,7 +89,7 @@
           (if (= old-page-name new-page-name) ; case changed
           (if (= old-page-name new-page-name) ; case changed
             (ldb/transact! conn
             (ldb/transact! conn
                            [{:db/id (:db/id page-e)
                            [{:db/id (:db/id page-e)
-                             :block/original-name new-name}]
+                             :block/title new-name}]
                            {:persist-op? persist-op?
                            {:persist-op? persist-op?
                             :outliner-op :rename-page})
                             :outliner-op :rename-page})
             (rename-page! repo conn page-e new-name)))))))
             (rename-page! repo conn page-e new-name)))))))

+ 16 - 16
src/main/frontend/worker/handler/page/file_based/rename.cljs

@@ -114,13 +114,13 @@
   [db config page new-name]
   [db config page new-name]
   ;; update all pages which have references to this page
   ;; update all pages which have references to this page
   (let [to-page (ldb/get-page db new-name)
   (let [to-page (ldb/get-page db new-name)
-        old-original-name (:block/original-name page)
+        old-title (:block/title page)
         blocks (:block/_refs (d/entity db (:db/id page)))
         blocks (:block/_refs (d/entity db (:db/id page)))
         tx     (->> (map (fn [{:block/keys [uuid content properties format] :as block}]
         tx     (->> (map (fn [{:block/keys [uuid content properties format] :as block}]
-                           (let [content    (let [content' (replace-old-page! config content old-original-name new-name format)]
+                           (let [content    (let [content' (replace-old-page! config content old-title new-name format)]
                                               (when-not (= content' content)
                                               (when-not (= content' content)
                                                 content'))
                                                 content'))
-                                 properties (let [properties' (walk-replace-old-page! config properties old-original-name new-name format)]
+                                 properties (let [properties' (walk-replace-old-page! config properties old-title new-name format)]
                                               (when-not (= properties' properties)
                                               (when-not (= properties' properties)
                                                 properties'))]
                                                 properties'))]
                              (when (or content properties)
                              (when (or content properties)
@@ -138,8 +138,8 @@
 
 
 (defn rename-update-namespace!
 (defn rename-update-namespace!
   "update :block/namespace of the renamed block"
   "update :block/namespace of the renamed block"
-  [repo conn config page old-original-name new-name]
-  (let [old-namespace? (text/namespace-page? old-original-name)
+  [repo conn config page old-title new-name]
+  (let [old-namespace? (text/namespace-page? old-title)
         new-namespace? (text/namespace-page? new-name)]
         new-namespace? (text/namespace-page? new-name)]
     (cond
     (cond
       new-namespace?
       new-namespace?
@@ -224,12 +224,12 @@
         new-page-name       (common-util/page-name-sanity-lc new-name)
         new-page-name       (common-util/page-name-sanity-lc new-name)
         page                (d/pull @conn '[*] [:block/name old-page-name])]
         page                (d/pull @conn '[*] [:block/name old-page-name])]
     (when (and repo page)
     (when (and repo page)
-      (let [old-original-name   (:block/original-name page)
+      (let [old-title   (:block/title page)
             page-txs            (when-not merge?
             page-txs            (when-not merge?
                                   [{:db/id               (:db/id page)
                                   [{:db/id               (:db/id page)
                                     :block/uuid          (:block/uuid page)
                                     :block/uuid          (:block/uuid page)
                                     :block/name          new-page-name
                                     :block/name          new-page-name
-                                    :block/original-name new-name}])
+                                    :block/title new-name}])
             {:keys [old-path new-path tx-data]} (update-file-tx db old-page-name new-name)
             {:keys [old-path new-path tx-data]} (update-file-tx db old-page-name new-name)
             txs (concat page-txs
             txs (concat page-txs
                         other-tx
                         other-tx
@@ -250,7 +250,7 @@
                                          (merge {:old-path old-path
                                          (merge {:old-path old-path
                                                  :new-path new-path}))})
                                                  :new-path new-path}))})
 
 
-        (rename-update-namespace! repo conn config page old-original-name new-name)))))
+        (rename-update-namespace! repo conn config page old-title new-name)))))
 
 
 (defn- rename-namespace-pages!
 (defn- rename-namespace-pages!
   "Original names (unsanitized only)"
   "Original names (unsanitized only)"
@@ -258,8 +258,8 @@
   (let [pages (ldb/get-namespace-pages @conn old-name {})
   (let [pages (ldb/get-namespace-pages @conn old-name {})
         page (d/pull @conn '[*] [:block/name (common-util/page-name-sanity-lc old-name)])
         page (d/pull @conn '[*] [:block/name (common-util/page-name-sanity-lc old-name)])
         pages (cons page pages)]
         pages (cons page pages)]
-    (doseq [{:block/keys [name original-name]} pages]
-      (let [old-page-title (or original-name name)
+    (doseq [{:block/keys [name title]} pages]
+      (let [old-page-title (or title name)
             ;; only replace one time, for the case that the namespace is a sub-string of the sub-namespace page name
             ;; only replace one time, for the case that the namespace is a sub-string of the sub-namespace page name
             ;; Example: has pages [[work]] [[work/worklog]],
             ;; Example: has pages [[work]] [[work/worklog]],
             ;; we want to rename [[work/worklog]] to [[work1/worklog]] when rename [[work]] to [[work1]],
             ;; we want to rename [[work/worklog]] to [[work1/worklog]] when rename [[work]] to [[work1]],
@@ -279,8 +279,8 @@
         nested-pages-ns (ldb/get-pages-by-name-partition @conn ns-prefix)]
         nested-pages-ns (ldb/get-pages-by-name-partition @conn ns-prefix)]
     (when nested-pages
     (when nested-pages
       ;; rename page "[[obsidian]] is a tool" to "[[logseq]] is a tool"
       ;; rename page "[[obsidian]] is a tool" to "[[logseq]] is a tool"
-      (doseq [{:block/keys [name original-name]} nested-pages]
-        (let [old-page-title (or original-name name)
+      (doseq [{:block/keys [name title]} nested-pages]
+        (let [old-page-title (or title name)
               new-page-title (string/replace
               new-page-title (string/replace
                               old-page-title
                               old-page-title
                               (page-ref/->page-ref old-ns-name)
                               (page-ref/->page-ref old-ns-name)
@@ -290,8 +290,8 @@
             (println "Renamed " old-page-title " to " new-page-title)))))
             (println "Renamed " old-page-title " to " new-page-title)))))
     (when nested-pages-ns
     (when nested-pages-ns
       ;; rename page "[[obsidian/page1]] is a tool" to "[[logseq/page1]] is a tool"
       ;; rename page "[[obsidian/page1]] is a tool" to "[[logseq/page1]] is a tool"
-      (doseq [{:block/keys [name original-name]} nested-pages-ns]
-        (let [old-page-title (or original-name name)
+      (doseq [{:block/keys [name title]} nested-pages-ns]
+        (let [old-page-title (or title name)
               new-page-title (string/replace
               new-page-title (string/replace
                               old-page-title
                               old-page-title
                               (common-util/format ns-prefix-format-str old-ns-name)
                               (common-util/format ns-prefix-format-str old-ns-name)
@@ -305,7 +305,7 @@
                                          :or {persist-op? true}}]
                                          :or {persist-op? true}}]
   (let [db @conn
   (let [db @conn
         page-e        (d/entity db [:block/uuid page-uuid])
         page-e        (d/entity db [:block/uuid page-uuid])
-        old-name      (:block/original-name page-e)
+        old-name      (:block/title page-e)
         new-name      (string/trim new-name)
         new-name      (string/trim new-name)
         old-page-name (common-util/page-name-sanity-lc old-name)
         old-page-name (common-util/page-name-sanity-lc old-name)
         new-page-name (common-util/page-name-sanity-lc new-name)
         new-page-name (common-util/page-name-sanity-lc new-name)
@@ -329,7 +329,7 @@
           (= old-page-name new-page-name) ; case changed
           (= old-page-name new-page-name) ; case changed
           (ldb/transact! conn
           (ldb/transact! conn
                          [{:db/id (:db/id page-e)
                          [{:db/id (:db/id page-e)
-                           :block/original-name new-name}]
+                           :block/title new-name}]
                          {:persist-op? persist-op?
                          {:persist-op? persist-op?
                           :outliner-op :rename-page})
                           :outliner-op :rename-page})
 
 

+ 2 - 2
src/main/frontend/worker/rtc/client.cljs

@@ -169,12 +169,12 @@
 
 
 (defmethod local-block-ops->remote-ops-aux :update-page-op
 (defmethod local-block-ops->remote-ops-aux :update-page-op
   [_ & {:keys [db block-uuid *remote-ops]}]
   [_ & {:keys [db block-uuid *remote-ops]}]
-  (when-let [{page-name :block/name original-name :block/original-name}
+  (when-let [{page-name :block/name title :block/title}
              (d/entity db [:block/uuid block-uuid])]
              (d/entity db [:block/uuid block-uuid])]
     (swap! *remote-ops conj
     (swap! *remote-ops conj
            [:update-page {:block-uuid block-uuid
            [:update-page {:block-uuid block-uuid
                           :page-name page-name
                           :page-name page-name
-                          :original-name (or original-name page-name)}])))
+                          :title (or title page-name)}])))
 
 
 (defmethod local-block-ops->remote-ops-aux :remove-op
 (defmethod local-block-ops->remote-ops-aux :remove-op
   [_ & {:keys [db remove-op *remote-ops]}]
   [_ & {:keys [db remove-op *remote-ops]}]

+ 2 - 3
src/main/frontend/worker/rtc/const.cljs

@@ -37,7 +37,7 @@
      [:map
      [:map
       [:block-uuid :uuid]
       [:block-uuid :uuid]
       [:page-name :string]
       [:page-name :string]
-      [:original-name :string]]]]
+      [:title :string]]]]
    [:remove-page
    [:remove-page
     [:cat :keyword
     [:cat :keyword
      [:map
      [:map
@@ -128,8 +128,7 @@
        [:map
        [:map
         [:op :keyword]
         [:op :keyword]
         [:self :uuid]
         [:self :uuid]
-        [:page-name :string]
-        [:block/original-name :string]
+        [:block/title :string]
         [:db/ident {:optional true} :keyword]
         [:db/ident {:optional true} :keyword]
         [:block/order {:optional true} db-malli-schema/block-order]
         [:block/order {:optional true} db-malli-schema/block-order]
         [::m/default extra-attr-map-schema]]]
         [::m/default extra-attr-map-schema]]]

+ 3 - 3
src/main/frontend/worker/rtc/db_listener.cljs

@@ -79,7 +79,7 @@
         block-uuid                   (:block/uuid (d/entity db-after e))
         block-uuid                   (:block/uuid (d/entity db-after e))
         a->add?->v->t                (e->a->add?->v->t e)
         a->add?->v->t                (e->a->add?->v->t e)
         {add?->block-name->t          :block/name
         {add?->block-name->t          :block/name
-         add?->block-original-name->t :block/original-name
+         add?->block-title->t :block/title
          add?->block-uuid->t          :block/uuid
          add?->block-uuid->t          :block/uuid
          add?->block-parent->t        :block/parent
          add?->block-parent->t        :block/parent
          add?->block-order->t         :block/order}
          add?->block-order->t         :block/order}
@@ -87,7 +87,7 @@
         [retract-block-uuid t1]      (some-> add?->block-uuid->t (get false) first)
         [retract-block-uuid t1]      (some-> add?->block-uuid->t (get false) first)
         [retract-block-name _]       (some-> add?->block-name->t (get false) first)
         [retract-block-name _]       (some-> add?->block-name->t (get false) first)
         [add-block-name t2]          (some-> add?->block-name->t latest-add?->v->t (get-first-vt true))
         [add-block-name t2]          (some-> add?->block-name->t latest-add?->v->t (get-first-vt true))
-        [add-block-original-name t3] (some-> add?->block-original-name->t
+        [add-block-title t3] (some-> add?->block-title->t
                                              latest-add?->v->t
                                              latest-add?->v->t
                                              (get-first-vt true))
                                              (get-first-vt true))
         [add-block-parent t4]        (some-> add?->block-parent->t latest-add?->v->t (get-first-vt true))
         [add-block-parent t4]        (some-> add?->block-parent->t latest-add?->v->t (get-first-vt true))
@@ -105,7 +105,7 @@
                   (or add-block-parent add-block-order)
                   (or add-block-parent add-block-order)
                   (conj [:move (or t4 t5) {:block-uuid block-uuid}])
                   (conj [:move (or t4 t5) {:block-uuid block-uuid}])
 
 
-                  (or add-block-name add-block-original-name)
+                  (or add-block-name add-block-title)
                   (conj [:update-page (or t2 t3) {:block-uuid block-uuid}]))
                   (conj [:update-page (or t2 t3) {:block-uuid block-uuid}]))
             update-op (when-let [av-coll (not-empty (update-op-av-coll db-before db-after a->add?->v->t*))]
             update-op (when-let [av-coll (not-empty (update-op-av-coll db-before db-after a->add?->v->t*))]
                         (let [t (max-t a->add?->v->t*)]
                         (let [t (max-t a->add?->v->t*)]

+ 2 - 2
src/main/frontend/worker/rtc/remote_update.cljs

@@ -497,10 +497,10 @@
   [repo conn update-page-ops]
   [repo conn update-page-ops]
   (let [config (worker-state/get-config repo)]
   (let [config (worker-state/get-config repo)]
     (doseq [{:keys [self _page-name]
     (doseq [{:keys [self _page-name]
-             original-name :block/original-name
+             title :block/title
              :as op-value} update-page-ops]
              :as op-value} update-page-ops]
       (let [create-opts {:uuid self}
       (let [create-opts {:uuid self}
-            [_ page-name page-uuid] (worker-page/rtc-create-page! conn config (ldb/read-transit-str original-name) create-opts)]
+            [_ page-name page-uuid] (worker-page/rtc-create-page! conn config (ldb/read-transit-str title) create-opts)]
         ;; TODO: current page-create fn is buggy, even provide :uuid option, it will create-page with different uuid,
         ;; TODO: current page-create fn is buggy, even provide :uuid option, it will create-page with different uuid,
         ;; if there's already existing same name page
         ;; if there's already existing same name page
         (assert (= page-uuid self) {:page-name page-name :page-uuid page-uuid :should-be self})
         (assert (= page-uuid self) {:page-name page-name :page-uuid page-uuid :should-be self})

+ 6 - 6
src/main/frontend/worker/search.cljs

@@ -207,7 +207,7 @@
                                            ;; closed value
                                            ;; closed value
                                              (property-value-when-closed e)
                                              (property-value-when-closed e)
                                            ;; :page or :date properties
                                            ;; :page or :date properties
-                                             (:block/original-name e)
+                                             (:block/title e)
                                            ;; block generated by template
                                            ;; block generated by template
                                              (and
                                              (and
                                               (:logseq.property/created-from-template e)
                                               (:logseq.property/created-from-template e)
@@ -220,7 +220,7 @@
                        (remove string/blank?))
                        (remove string/blank?))
                   hide? (get-in property [:block/schema :hide?])]
                   hide? (get-in property [:block/schema :hide?])]
               (when (and (not hide?) (seq values))
               (when (and (not hide?) (seq values))
-                (str (:block/original-name property)
+                (str (:block/title property)
                      ": "
                      ": "
                      (string/join "; " values))))))
                      (string/join "; " values))))))
          (string/join ", "))))
          (string/join ", "))))
@@ -265,7 +265,7 @@
     {:id (str (:block/uuid p))
     {:id (str (:block/uuid p))
      :name (:block/name p)
      :name (:block/name p)
      :built-in? (boolean (db-property/property-value-content (:logseq.property/built-in? p)))
      :built-in? (boolean (db-property/property-value-content (:logseq.property/built-in? p)))
-     :original-name (:block/original-name p)}))
+     :title (:block/title p)}))
 
 
 (defn- hidden-page?
 (defn- hidden-page?
   [page]
   [page]
@@ -290,7 +290,7 @@
                    (map original-page-name->index)
                    (map original-page-name->index)
                    (bean/->js))
                    (bean/->js))
         indice (fuse. pages
         indice (fuse. pages
-                      (clj->js {:keys ["original-name"]
+                      (clj->js {:keys ["title"]
                                 :shouldSort true
                                 :shouldSort true
                                 :tokenize true
                                 :tokenize true
                                 :distance 1024
                                 :distance 1024
@@ -328,7 +328,7 @@
         datoms (filter
         datoms (filter
                 (fn [datom]
                 (fn [datom]
                   ;; Capture any direct change on page display title, page ref or block content
                   ;; Capture any direct change on page display title, page ref or block content
-                  (contains? #{:block/uuid :block/name :block/original-name :block/content :block/properties :block/schema} (:a datom)))
+                  (contains? #{:block/uuid :block/name :block/title :block/content :block/properties :block/schema} (:a datom)))
                 data)]
                 data)]
     (when (seq datoms)
     (when (seq datoms)
       (get-blocks-from-datoms-impl repo tx-report datoms))))
       (get-blocks-from-datoms-impl repo tx-report datoms))))
@@ -396,7 +396,7 @@
                (keep
                (keep
                 (fn [{:keys [item]}]
                 (fn [{:keys [item]}]
                   {:id (:id item)
                   {:id (:id item)
-                   :title (:original-name item)}))
+                   :title (:title item)}))
                (distinct)
                (distinct)
                (filter (fn [{:keys [title]}]
                (filter (fn [{:keys [title]}]
                          (exact-matched? q title)))
                          (exact-matched? q title)))

+ 1 - 1
src/main/logseq/api.cljs

@@ -832,7 +832,7 @@
 ;; FIXME: This ns should not be creating idents. This allows for ident conflicts
 ;; FIXME: This ns should not be creating idents. This allows for ident conflicts
 ;; and assumes that names directly map to idents which is incorrect and breaks for multiple
 ;; and assumes that names directly map to idents which is incorrect and breaks for multiple
 ;; cases e.g. a property that has been renamed or sanitized. Instead it should
 ;; cases e.g. a property that has been renamed or sanitized. Instead it should
-;; find a property's ident by looking up the property in the db by its original-name
+;; find a property's ident by looking up the property in the db by its title
 (defn get-db-ident-for-property-name
 (defn get-db-ident-for-property-name
   "Finds a property :db/ident for a given property name"
   "Finds a property :db/ident for a given property name"
   [property-name]
   [property-name]

+ 6 - 6
src/test/frontend/db/query_dsl_test.cljs

@@ -150,16 +150,16 @@ prop-d:: [[nada]]"}])
     (test-helper/with-config {}
     (test-helper/with-config {}
       (block-property-queries-test))))
       (block-property-queries-test))))
 
 
-       
+
 (when js/process.env.DB_GRAPH
 (when js/process.env.DB_GRAPH
  (deftest db-only-block-property-queries
  (deftest db-only-block-property-queries
    (load-test-files-for-db-graph
    (load-test-files-for-db-graph
-    [{:page {:block/original-name "page1"}
+    [{:page {:block/title "page1"}
       :blocks [{:block/content "b1"
       :blocks [{:block/content "b1"
                 :build/properties {:Foo "bar"}}
                 :build/properties {:Foo "bar"}}
                {:block/content "b2"
                {:block/content "b2"
                 :build/properties {:foo "bar"}}]}])
                 :build/properties {:foo "bar"}}]}])
-   
+
    (is (= ["b1"]
    (is (= ["b1"]
           (map :block/content (dsl-query "(property Foo)")))
           (map :block/content (dsl-query "(property Foo)")))
        "filter is case sensitive")
        "filter is case sensitive")
@@ -237,7 +237,7 @@ prop-d:: [[nada]]"}])
           :block/name
           :block/name
           (dsl-query "(and (not (page-property foo bar)) (page-property parent [[child page 2]]))")))
           (dsl-query "(and (not (page-property foo bar)) (page-property parent [[child page 2]]))")))
       "Page property queries nested NOT in first clause")
       "Page property queries nested NOT in first clause")
-  
+
   (testing "boolean values"
   (testing "boolean values"
       (is (= ["page1"]
       (is (= ["page1"]
              (map :block/name (dsl-query "(page-property interesting true)")))
              (map :block/name (dsl-query "(page-property interesting true)")))
@@ -311,7 +311,7 @@ prop-d:: [[nada]]"}])
 
 
 (deftest priority-queries
 (deftest priority-queries
   (load-test-files (if js/process.env.DB_GRAPH
   (load-test-files (if js/process.env.DB_GRAPH
-                     [{:page {:block/original-name "page1"}
+                     [{:page {:block/title "page1"}
                        :blocks [{:block/content "[#A] b1"
                        :blocks [{:block/content "[#A] b1"
                                  :build/properties {:logseq.task/priority :logseq.task/priority.high}}
                                  :build/properties {:logseq.task/priority :logseq.task/priority.high}}
                                 {:block/content "[#B] b2"
                                 {:block/content "[#B] b2"
@@ -507,7 +507,7 @@ prop-d:: [[nada]]"}])
 
 
 (deftest nested-page-ref-queries
 (deftest nested-page-ref-queries
   (load-test-files (if js/process.env.DB_GRAPH
   (load-test-files (if js/process.env.DB_GRAPH
-                     [{:page {:block/original-name "page1"}
+                     [{:page {:block/title "page1"}
                        :blocks [{:block/content "p1 [[Parent page]]"
                        :blocks [{:block/content "p1 [[Parent page]]"
                                  :build/children [{:block/content "[[Child page]]"}]}
                                  :build/children [{:block/content "[[Child page]]"}]}
                                 {:block/content "p2 [[Parent page]]"
                                 {:block/content "p2 [[Parent page]]"

+ 2 - 2
src/test/frontend/handler/db_based/recent_test.cljs

@@ -21,7 +21,7 @@
       (doseq [page pages]
       (doseq [page pages]
         (test-helper/create-page! page {:redirect? false :create-first-block? false :class? true})
         (test-helper/create-page! page {:redirect? false :create-first-block? false :class? true})
         (db-recent-handler/add-page-to-recent! (:db/id (db/get-page page)) false))
         (db-recent-handler/add-page-to-recent! (:db/id (db/get-page page)) false))
-      (is (= (map :block/original-name (db-recent-handler/get-recent-pages)) (reverse pages)))
+      (is (= (map :block/title (db-recent-handler/get-recent-pages)) (reverse pages)))
       (testing "Click existing recent item shouldn't update its position"
       (testing "Click existing recent item shouldn't update its position"
         (db-recent-handler/add-page-to-recent! (:db/id (db/get-page "Page 10")) true)
         (db-recent-handler/add-page-to-recent! (:db/id (db/get-page "Page 10")) true)
-        (is (= (map :block/original-name (db-recent-handler/get-recent-pages)) (reverse pages)))))))
+        (is (= (map :block/title (db-recent-handler/get-recent-pages)) (reverse pages)))))))

+ 40 - 40
src/test/frontend/handler/export_test.cljs

@@ -12,11 +12,11 @@
     (string/trim "
     (string/trim "
 - 1
 - 1
   id:: 61506710-484c-46d5-9983-3d1651ec02c8
   id:: 61506710-484c-46d5-9983-3d1651ec02c8
-	- 2
-	  id:: 61506711-5638-4899-ad78-187bdc2eaffc
-		- 3
-		  id:: 61506712-3007-407e-b6d3-d008a8dfa88b
-		- ((61506712-3007-407e-b6d3-d008a8dfa88b))
+        - 2
+          id:: 61506711-5638-4899-ad78-187bdc2eaffc
+                - 3
+                  id:: 61506712-3007-407e-b6d3-d008a8dfa88b
+                - ((61506712-3007-407e-b6d3-d008a8dfa88b))
 - 4
 - 4
   id:: 61506712-b8a7-491d-ad84-b71651c3fdab")}
   id:: 61506712-b8a7-491d-ad84-b71651c3fdab")}
    {:file/path "pages/page2.md"
    {:file/path "pages/page2.md"
@@ -24,7 +24,7 @@
     (string/trim "
     (string/trim "
 - 3
 - 3
   id:: 97a00e55-48c3-48d8-b9ca-417b16e3a616
   id:: 97a00e55-48c3-48d8-b9ca-417b16e3a616
-	- {{embed [[page1]]}}")}])
+        - {{embed [[page1]]}}")}])
 
 
 (use-fixtures :once
 (use-fixtures :once
   {:before (fn []
   {:before (fn []
@@ -41,18 +41,18 @@
                                                               {:remove-options #{:property}})))
                                                               {:remove-options #{:property}})))
     (string/trim "
     (string/trim "
 - 1
 - 1
-	- 2
-		- 3
-		- 3")
+        - 2
+                - 3
+                - 3")
     "61506710-484c-46d5-9983-3d1651ec02c8"
     "61506710-484c-46d5-9983-3d1651ec02c8"
 
 
     (string/trim "
     (string/trim "
 - 3
 - 3
-	- 1
-		- 2
-			- 3
-			- 3
-	- 4")
+        - 1
+                - 2
+                        - 3
+                        - 3
+        - 4")
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
 
 
 
 
@@ -62,25 +62,25 @@
     (string/trim "
     (string/trim "
 - 1
 - 1
   id:: 61506710-484c-46d5-9983-3d1651ec02c8
   id:: 61506710-484c-46d5-9983-3d1651ec02c8
-	- 2
-	  id:: 61506711-5638-4899-ad78-187bdc2eaffc
-		- 3
-		  id:: 61506712-3007-407e-b6d3-d008a8dfa88b
-		- 3")
+        - 2
+          id:: 61506711-5638-4899-ad78-187bdc2eaffc
+                - 3
+                  id:: 61506712-3007-407e-b6d3-d008a8dfa88b
+                - 3")
     "61506710-484c-46d5-9983-3d1651ec02c8"
     "61506710-484c-46d5-9983-3d1651ec02c8"
 
 
     (string/trim "
     (string/trim "
 - 3
 - 3
   id:: 97a00e55-48c3-48d8-b9ca-417b16e3a616
   id:: 97a00e55-48c3-48d8-b9ca-417b16e3a616
-	- 1
-	  id:: 61506710-484c-46d5-9983-3d1651ec02c8
-		- 2
-		  id:: 61506711-5638-4899-ad78-187bdc2eaffc
-			- 3
-			  id:: 61506712-3007-407e-b6d3-d008a8dfa88b
-			- 3
-	- 4
-	  id:: 61506712-b8a7-491d-ad84-b71651c3fdab")
+        - 1
+          id:: 61506710-484c-46d5-9983-3d1651ec02c8
+                - 2
+                  id:: 61506711-5638-4899-ad78-187bdc2eaffc
+                        - 3
+                          id:: 61506712-3007-407e-b6d3-d008a8dfa88b
+                        - 3
+        - 4
+          id:: 61506712-b8a7-491d-ad84-b71651c3fdab")
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
 
 
 (deftest export-blocks-as-markdown-level<N
 (deftest export-blocks-as-markdown-level<N
@@ -90,13 +90,13 @@
                                                                       :other-options {:keep-only-level<=N 2}})))
                                                                       :other-options {:keep-only-level<=N 2}})))
     (string/trim "
     (string/trim "
 - 1
 - 1
-	- 2")
+        - 2")
     "61506710-484c-46d5-9983-3d1651ec02c8"
     "61506710-484c-46d5-9983-3d1651ec02c8"
 
 
     (string/trim "
     (string/trim "
 - 3
 - 3
-	- 1
-	- 4")
+        - 1
+        - 4")
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
 
 
 (deftest export-blocks-as-markdown-newline-after-block
 (deftest export-blocks-as-markdown-newline-after-block
@@ -107,24 +107,24 @@
     (string/trim "
     (string/trim "
 - 1
 - 1
 
 
-	- 2
+        - 2
 
 
-		- 3
+                - 3
 
 
-		- 3")
+                - 3")
     "61506710-484c-46d5-9983-3d1651ec02c8"
     "61506710-484c-46d5-9983-3d1651ec02c8"
     (string/trim "
     (string/trim "
 - 3
 - 3
 
 
-	- 1
+        - 1
 
 
-		- 2
+                - 2
 
 
-			- 3
+                        - 3
 
 
-			- 3
+                        - 3
 
 
-	- 4")
+        - 4")
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
     "97a00e55-48c3-48d8-b9ca-417b16e3a616"))
 
 
 
 
@@ -145,7 +145,7 @@
                       edn-output (edn/read-string result)]
                       edn-output (edn/read-string result)]
           (is (= #{:version :blocks} (set (keys edn-output)))
           (is (= #{:version :blocks} (set (keys edn-output)))
                       "Correct top-level keys")
                       "Correct top-level keys")
-              (is (= (sort (concat (map :block/original-name gp-db/built-in-pages)
+          (is (= (sort (concat (map :block/title gp-db/built-in-pages)
                                                             ["page1" "page2"]))
                                                             ["page1" "page2"]))
                                 (sort (map :block/page-name (:blocks edn-output))))
                                 (sort (map :block/page-name (:blocks edn-output))))
                           "Correct pages")))
                           "Correct pages")))

+ 2 - 2
src/test/frontend/test/helper.cljs

@@ -138,7 +138,7 @@
                                      (string/replace "_" "")
                                      (string/replace "_" "")
                                      parse-double)
                                      parse-double)
                              (throw (ex-info (str "Can't detect page name of file: " (pr-str path)) {})))}
                              (throw (ex-info (str "Can't detect page name of file: " (pr-str path)) {})))}
-                        {:block/original-name
+                        {:block/title
                          (or (second (re-find #"/([^/]+)\." path))
                          (or (second (re-find #"/([^/]+)\." path))
                              (throw (ex-info (str "Can't detect page name of file: " (pr-str path)) {})))})]
                              (throw (ex-info (str "Can't detect page name of file: " (pr-str path)) {})))})]
                   {:page (cond-> unique-page-attrs
                   {:page (cond-> unique-page-attrs
@@ -183,7 +183,7 @@ This can be called in synchronous contexts as no async fns should be invoked"
      [;; page
      [;; page
       {:block/uuid page-uuid
       {:block/uuid page-uuid
        :block/name "test"
        :block/name "test"
-       :block/original-name "Test"}
+       :block/title "Test"}
       ;; first block
       ;; first block
       {:block/uuid first-block-uuid
       {:block/uuid first-block-uuid
        :block/page page-id
        :block/page page-id

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff