mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
enhance(ui): WIP optimization for the shui popup related fundamental components
This commit is contained in:
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule "packages/ui/primitives"]
|
||||
path = packages/ui/primitives
|
||||
url = https://github.com/xyhp915/primitives.git
|
||||
shallow = true
|
||||
11
deps/shui/src/logseq/shui/popup/core.cljs
vendored
11
deps/shui/src/logseq/shui/popup/core.cljs
vendored
@@ -164,6 +164,7 @@
|
||||
:top y
|
||||
:left x}} ""))
|
||||
(let [content-props (cond-> (merge {:onEscapeKeyDown #(hide! id)
|
||||
:disableOutsideScroll false
|
||||
:onPointerDownOutside #(hide! id)}
|
||||
content-props)
|
||||
(and (not force-popover?)
|
||||
@@ -184,16 +185,6 @@
|
||||
< rum/static
|
||||
[]
|
||||
(let [[popups _set-popups!] (use-atom *popups)]
|
||||
|
||||
(rum/use-effect!
|
||||
(fn []
|
||||
(let [^js cls (.-classList js/document.documentElement)
|
||||
s "has-x-popups"]
|
||||
(if (and (counted? popups) (> (count popups) 0))
|
||||
(.add cls s) (.remove cls s))
|
||||
#(.remove cls s)))
|
||||
[popups])
|
||||
|
||||
[:<>
|
||||
(for [config popups
|
||||
:when (and (map? config) (:id config) (not (:all? config)))]
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
"android:dev": "cross-env PLATFORM=android gulp cap",
|
||||
"tldraw:build": "yarn --cwd packages/tldraw install",
|
||||
"amplify:build": "yarn --cwd packages/amplify install",
|
||||
"ui:build": "yarn --cwd packages/ui install",
|
||||
"ui:build": "git submodule update --quiet --init --depth=1 && yarn --cwd packages/ui install",
|
||||
"postinstall": "yarn tldraw:build && yarn amplify:build && yarn ui:build"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
1
packages/ui/.gitignore
vendored
1
packages/ui/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.parcel-cache
|
||||
.storybook/cljs
|
||||
primitives/
|
||||
dist
|
||||
@@ -8,6 +8,7 @@
|
||||
"build:ui:only": "parcel build --target ui",
|
||||
"build:ui": "rm -rf .parcel-cache && yarn build:ui:only",
|
||||
"watch:storybook": "storybook dev -p 6006",
|
||||
"preinstall": "cd primitives/ && yarn install && yarn build",
|
||||
"postinstall": "yarn build:ui"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -85,7 +86,8 @@
|
||||
},
|
||||
"react/jsx-dev-runtime": "./node_modules/react/jsx-dev-runtime.js",
|
||||
"react/jsx-runtime": "./node_modules/react/jsx-runtime.js",
|
||||
"@/*": "./@/$1"
|
||||
"@/*": "./@/$1",
|
||||
"@radix-ui/react-*": "./primitives/packages/react/$1"
|
||||
},
|
||||
"targets": {
|
||||
"main": false,
|
||||
|
||||
Reference in New Issue
Block a user