on main help sign in
add sigil doc placeholder and button
commitb16f593af27693857d1c94c1dc8fffc7f768c289 authorJohn Hyde <johnhydefour@gmail.com> dateFri 30 Sep 2022, 02:20 (4 years ago) parent47686e0
5 files changed+45−14
desk/doc/usr/sigil.udon+4 ui/package-lock.json+16−11 ui/package.json+1−1 ui/src/components/search/SearchBar.svelte+15−2 ui/src/styles/tailwind-output.css+9
desk/doc/usr/sigil.udonnew file+4
@@ -0,0 +1,4 @@
1+;>
2+# What is a Sigil?
3+
4+TODO: write this doc
ui/package-lock.json+16−11
@@ -8,7 +8,7 @@
88 "name": "urbit-astrolabe",
99 "version": "0.3.0",
1010 "dependencies": {
11− "@johnhyde/sigil-js": "file:../../sigil-js",
11+ "@johnhyde/sigil-js": "github:johnhyde/sigil-js",
1212 "@tlon/phonemes-js": "^1.0.0",
1313 "@tlon/sigil-js": "^1.4.5",
1414 "@urbit/api": "^2.1.0",
@@ -44,6 +44,7 @@
4444 "../../sigil-js": {
4545 "name": "@johnhyde/sigil-js",
4646 "version": "1.4.6",
47+ "extraneous": true,
4748 "license": "MIT",
4849 "dependencies": {
4950 "invariant": "^2.2.4",
@@ -171,8 +172,17 @@
171172 }
172173 },
173174 "node_modules/@johnhyde/sigil-js": {
174− "resolved": "../../sigil-js",
175− "link": true
175+ "version": "1.4.6",
176+ "resolved": "git+ssh://git@github.com/johnhyde/sigil-js.git#35f71ac00b54dd56d010b6fccfa48c6f75c48ee8",
177+ "license": "MIT",
178+ "dependencies": {
179+ "invariant": "^2.2.4",
180+ "svgson": "^4.0.0",
181+ "transformation-matrix": "2.1.1"
182+ },
183+ "peerDependencies": {
184+ "react": "^16 || ^17"
185+ }
176186 },
177187 "node_modules/@microsoft/fetch-event-source": {
178188 "version": "2.0.1",
@@ -3117,17 +3127,12 @@
31173127 }
31183128 },
31193129 "@johnhyde/sigil-js": {
3120− "version": "file:../../sigil-js",
3130+ "version": "git+ssh://git@github.com/johnhyde/sigil-js.git#35f71ac00b54dd56d010b6fccfa48c6f75c48ee8",
3131+ "from": "@johnhyde/sigil-js@git+ssh://git@github.com:johnhyde/sigil-js.git",
31213132 "requires": {
3122− "@types/invariant": "^2.2.31",
3123− "@types/react": "^17.0.20",
3124− "husky": "^4.2.3",
31253133 "invariant": "^2.2.4",
3126− "prettier": "^1.19.1",
31273134 "svgson": "^4.0.0",
3128− "transformation-matrix": "2.1.1",
3129− "tsdx": "^0.14.1",
3130− "typescript": "^3.8.3"
3135+ "transformation-matrix": "2.1.1"
31313136 }
31323137 },
31333138 "@microsoft/fetch-event-source": {
ui/package.json+1−1
@@ -43,7 +43,7 @@
4343 "vite": "^2.7.2"
4444 },
4545 "dependencies": {
46− "@johnhyde/sigil-js": "file:../../sigil-js",
46+ "@johnhyde/sigil-js": "github:johnhyde/sigil-js",
4747 "@tlon/phonemes-js": "^1.0.0",
4848 "@tlon/sigil-js": "^1.4.5",
4949 "@urbit/api": "^2.1.0",
ui/src/components/search/SearchBar.svelte+15−2
@@ -2,6 +2,7 @@
22 import SigilInput from './sigil/SigilInput.svelte';
33 import Symbol from './sigil/Symbol.svelte';
44
5+ import docs from 'stores/docs';
56 import { SearchAnalysis } from 'lib/id';
67 import { SigilQuery } from 'lib/sigil';
78
@@ -79,6 +80,12 @@
7980 debouncedSearch = bouncySearch;
8081 search = debouncedSearch;
8182 }
83+
84+ function showSigilDoc() {
85+ docs.show('sigil');
86+ }
87+
88+ const buttonClasses = 'rounded-full bg-black text-white text-sm transition-opacity opacity-50 hover:opacity-80';
8289</script>
8390
8491<div class="relative max-w-md w-full">
@@ -86,9 +93,15 @@
8693 <div class="rounded-2xl bg-white overflow-hidden">
8794 <SigilInput bind:sigilQuery></SigilInput>
8895 </div>
96+ <button
97+ on:click={showSigilDoc}
98+ class="absolute top-2 left-2 w-6 h-6 {buttonClasses}"
99+ >
100+ ?
101+ </button>
89102 <button
90103 on:click={closeSigilInput}
91− class="absolute top-2 right-2 w-20 h-6 rounded-full bg-black text-white text-sm transition-opacity opacity-50 hover:opacity-80"
104+ class="absolute top-2 right-2 w-20 h-6 {buttonClasses}"
92105 >
93106 patp or #
94107 </button>
@@ -102,7 +115,7 @@
102115 />
103116 <button
104117 on:click={openSigilInput}
105− class="absolute top-1 right-1 w-8 h-8 transition-opacity opacity-50 hover:opacity-80"
118+ class="absolute top-1 right-1 w-8 h-8 {buttonClasses}"
106119 >
107120 <Symbol components={'gci.lvf.lhf.lbhb.atrf4.al3.cbl2lf.cbl2mb'.split('.')} size={32}
108121 altBgColor="transparent"
ui/src/styles/tailwind-output.css+9
@@ -550,6 +550,12 @@ Ensure the default browser behavior of the `hidden` attribute.
550550.right-3 {
551551 right: 0.75rem;
552552}
553+.left-1 {
554+ left: 0.25rem;
555+}
556+.left-2 {
557+ left: 0.5rem;
558+}
553559.z-20 {
554560 z-index: 20;
555561}
@@ -852,6 +858,9 @@ Ensure the default browser behavior of the `hidden` attribute.
852858.w-\[48px\] {
853859 width: 48px;
854860}
861+.w-40 {
862+ width: 10rem;
863+}
855864.min-w-0 {
856865 min-width: 0px;
857866}