enhance(ux): more intuitive ux for tag properties

1. Tag properties are now displayed vertically with their description for
improved readability.

2. Adding a property from a tag page now creates a tag property (not a page property). Previously, this caused confusion as users expected properties to be inherited by tagged nodes.

3. Fixed a flickering issue when reordering properties.

Users can still add page properties by using cmd+p.
This commit is contained in:
Tienson Qin
2025-06-13 05:09:07 +08:00
parent 98bd9a686a
commit cada172521
3 changed files with 53 additions and 48 deletions

View File

@@ -1044,11 +1044,13 @@
(str (:db/id block) "-" (:db/id property) "-" (:db/id value-block)))))]
:else
[:div.w-full.h-full.jtrigger.ls-empty-text-property
[:div.w-full.h-full.jtrigger.ls-empty-text-property.text-muted-foreground.ml-1
{:tabIndex 0
:class (if (:table-view? opts) "cursor-pointer" "cursor-text")
:style {:min-height 20}
:on-click #(<create-new-block! block property "")}]))))
:on-click #(<create-new-block! block property "")}
(when (:class-schema? opts)
"Add description")]))))
(rum/defc property-block-value
[value block property page-cp opts]