mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
refactor: set parent for any page, not just tags (#11494)
* refactor: replace :class/parent with :logseq.property/parent * replace :class/schema.properties with property.class/properties * enhance: display schema properties directly in Tag properties * tag properties style tweaks * fix: properties view context * fix: limit parent to be classes or pages depends on the current node * enhance: display ancestors in Parent * fix: ancestors * enhance: display tag properties always for tags * enhance: display tag block container instead of properties area * enhance: show add property as popup instead of dialog * fix: tag parent must be a tag * enhance: display properties in the right sidebar * fix: tags style * fix: icon style * fix: positioned icons * fix: lint * fix: tests * fix: remove properties from rtc watched attrs * fix: graph-parser tests * enhance: style tweaks * enhance: page/create parses tags from user-input title * enhance(ux): [[ref]] followed by # (no whitespace) to add tags * fix: tests * fix: graph-parser lint and tests * fix: allow tagged nodes to be parents * enhance(ux): display tag property descriptions Also, make it editable.
This commit is contained in:
@@ -1160,7 +1160,7 @@
|
||||
(let [value (gobj/get input "value")]
|
||||
(extract-nearest-link-from-text value pos url-regex))))))))
|
||||
|
||||
(defn- get-nearest-page
|
||||
(defn get-nearest-page
|
||||
"Return the nearest page-name (not dereferenced, may be an alias), block or tag"
|
||||
[]
|
||||
(when-let [block (state/get-edit-block)]
|
||||
@@ -1947,8 +1947,10 @@
|
||||
|
||||
;; Open "Search page or New page" auto-complete
|
||||
(and (= last-input-char commands/hashtag)
|
||||
;; Only trigger at beginning of a line or before whitespace
|
||||
(or (re-find #"(?m)^#" (str (.-value input))) (start-of-new-word? input pos)))
|
||||
;; Only trigger at beginning of a line, before whitespace or after a reference
|
||||
(or (re-find #"(?m)^#" (str (.-value input)))
|
||||
(start-of-new-word? input pos)
|
||||
(and db-based? (= page-ref/right-brackets (common-util/safe-subs (str (.-value input)) (- pos 3) (dec pos))))))
|
||||
(do
|
||||
(state/set-editor-action-data! {:pos (cursor/get-caret-pos input)})
|
||||
(state/set-editor-last-pos! pos)
|
||||
@@ -3397,7 +3399,7 @@
|
||||
(not (db-pu/all-hidden-properties? property-keys)))
|
||||
(and db-based? (seq tags)
|
||||
(some (fn [t]
|
||||
(let [properties (map :db/ident (:class/schema.properties (:block/schema t)))]
|
||||
(let [properties (map :db/ident (:logseq.property.class/properties (:block/schema t)))]
|
||||
(and (seq properties)
|
||||
(not (db-pu/all-hidden-properties? properties))))) tags))
|
||||
(and
|
||||
|
||||
Reference in New Issue
Block a user