Skip to content

Commit

Permalink
tag editing ui tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuebert committed Jan 10, 2024
1 parent 8fc6c4b commit 353aae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Expand Up @@ -5,7 +5,7 @@

;; v2
datalevin/datalevin {:mvn/version "0.8.21"}
io.github.mhuebert/re-db {:git/sha "631618c03eaf3f89422497493705114a386e2b4d"}
io.github.mhuebert/re-db {:git/sha "728c5ee753025cd1327fb21a195fa17a1b912d6f"}
io.github.mhuebert/yawn {:git/sha "68285f6c132f26a2ff3cc2f7dffc3fe68c9856d9"}
io.github.mhuebert/inside-out {:git/sha "fe175565b5840455e9ca6cd410b6c84a554c3003"}

Expand Down
8 changes: 4 additions & 4 deletions src/sb/app/field/ui.cljc
Expand Up @@ -702,11 +702,11 @@
(when to-add
[:div.flex-v.gap-2
(when-not editing?
[:div.tag-md.px-1.hover:bg-gray-100.text-gray-400.hover:text-gray-700.cursor-default {:on-click #(edit! not)}
[:div.tag-md.px-1.hover:bg-gray-100.text-gray-400.hover:text-gray-700.cursor-default.mr-auto {:on-click #(edit! not)}
(t :tr/edit-tags)])
(when editing?
[:div.bg-gray-100.rounded-lg.border-gray-400.p-3.flex.items-center.gap-2
[:div.flex.flex-wrap.gap-2
[:div.bg-gray-100.rounded-lg.border-gray-400.flex.items-stretch.mt-2.mr-auto
[:div.flex.flex-wrap.gap-2.p-3.
(for [{:tag/keys [id label color]} to-add]
[:div.tag-md.cursor-default.group
{:key id
Expand All @@ -715,7 +715,7 @@
(entity.data/maybe-save-field ?tags))}
label
[icons/plus-thick "w-4 h-4 -mr-1 opacity-50 group-hover:opacity-100"]])]
[:div.hover:bg-gray-200.p-2.rounded {:on-click #(edit! not)} [icons/checkmark "flex-none"]]])
[:div.hover:bg-gray-200.p-2.rounded.flex.items-center.m-1.-ml-2 {:on-click #(edit! not)} [icons/checkmark "flex-none"]]])
[form.ui/show-field-messages ?tags]])]
)
;; pass in a list of tags (from parent) to show. group-by (set @?tags).
Expand Down

0 comments on commit 353aae7

Please sign in to comment.