on main help sign in
add sigil docs and fix bug
commit7f93b9aa9b119a20725c86f3989cf4567dfca241 authorJohn Hyde <johnhydefour@gmail.com> dateFri 30 Sep 2022, 18:08 (4 years ago) parentbf4ad58
10 files changed+63−12
desk/desk.docket-0+1−1 desk/doc.toc+1 desk/doc/overview.udon+3−3 desk/doc/usr/astrolabe.udon+29−4 desk/doc/usr/sigil.udon+18−1 ui/package-lock.json+1 ui/src/assets/sigil-example.png ui/src/components/docs/DocHome.svelte+3 ui/src/components/search/sigil/SigilInput.svelte+1−1 ui/src/lib/sigil.ts+6−2
desk/desk.docket-0+1−1
@@ -4,7 +4,7 @@
44 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
55 glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v1.pc6av.k7vu1.4nkef.lgob3.u6tae.glob' 0v1.pc6av.k7vu1.4nkef.lgob3.u6tae]
66 base+'astrolabe'
7− version+[0 3 0]
7+ version+[0 3 2]
88 website+'https://github.com/johnhyde/astrolabe'
99 license+'MIT'
1010==
desk/doc.toc+1
@@ -8,6 +8,7 @@
88 /comet/udon Comets
99 /patpee/udon What is a @p?
1010 /phonemes/udon Phonemes - Prefixes & Suffixes
11+ /sigil/udon What is a Sigil?
1112 /azimuth/udon What is Azimuth?
1213 /l2/udon Layer 1 and Layer 2
1314 /keys/udon Networking Keys
desk/doc/overview.udon+3−3
@@ -1,9 +1,9 @@
11;>
22# Astrolabe
33
4−Currently Astrolabe lets you type in `@p`s or Azimuth point numbers
5−to look up ships on the network. There's also Help Documentation if
6−you want to learn more about how Urbit IDs work.
4+Currently Astrolabe lets you input `@p`s, Azimuth point numbers, or sigils
5+to look up ships on the network. Use the Star Chart to explore visually.
6+There's also Help Documentation if you want to learn more about how Urbit IDs work.
77
88## Info
99
desk/doc/usr/astrolabe.udon+29−4
@@ -26,6 +26,33 @@ if you search for `***hec`, it will search for all stars under `~hec`,
2626and all planets that match `~***hec-******`, but planets matching `~******-***hec`
2727will be ignored to prevent the search from taking too long.
2828
29+## Sigil Search
30+
31+Clicking the symbol at the right of the search bar opens the Sigil Input Tool.
32+Use the dropdown at the top to select Galaxy, Star, or Planet.
33+Click on a square to start selecting sigil components.
34+
35+Select component catogeries on the right, and then tap the options on the sigil
36+to add them to your search.
37+
38+The ^ button goes up a level so you can select another category.
39+The X button will clear sigil components based on what type you're inputting.
40+At the top level, the X button will clear all inputs.
41+
42+Your contacts will be searched for any search.
43+When the search has become specific enough,
44+all spawned ships with matching sigils will be shown.
45+If your input is unambiguous, the page for the matching ship will be shown,
46+whether the ship is spawned or not.
47+
48+NOTE: Some sigil inputs are considered ambiguous even if they exactly match
49+a particular sigil, because further details could match a different sigil.
50+E.g. `~zod` is a circle, but a circle in the suffix position might be intended as a more general search.
51+A future version of Astrolabe will allow you to view the ship
52+whose sigil most closely matches your search, even if the search is ambiguous.
53+
54+Read more about Sigils [here](/~/scry/docs/usr/astrolabe/sigil.html).
55+
2956## The Star Chart
3057
3158Click and drag to move your view, use the mouse wheel to zoom in and out. Click on a dot
@@ -45,10 +72,7 @@ In both views, all galaxies are shown for completeness.
4572
4673## Upcoming Features
4774
48−In addition to improving the search feature over time, Astrolabe will one day feature:
49−- Sigil Search, with which you can select the shapes of a sigil and search for ships
50− that match.
51−- Integrations with Groups, `%pals`, `%gora`, and whatever else seems fun and/or useful.
75+In addition to improving the search features over time, Astrolabe will one day feature ntegrations with Groups, `%pals`, `%gora`, and whatever else seems fun and/or useful.
5276
5377## Info
5478
@@ -56,6 +80,7 @@ In addition to improving the search feature over time, Astrolabe will one day fe
5680- License: MIT
5781- App link: [~dister-midlev-mindyr/astrolabe](web+urbitgraph://~dister-midlev-mindyr/astrolabe)
5882- Discussion Group: [~poster-hoster-midlev-mindyr/astrolabe](web+urbitgraph://group/~poster-hoster-midlev-mindyr/astrolabe)
83+- [%quorum](web+urbitgraph://~dister-dister-sidnym-ladrut/quorum) board: ~poster-hoster-midlev-mindyr/astrolabe
5984- Grant/Proposal: [https://urbit.org/grants/astrolabe](https://urbit.org/grants/astrolabe)
6085- Source repo: [https://github.com/johnhyde/astrolabe](https://github.com/johnhyde/astrolabe)
6186- Bug reports: [https://github.com/johnhyde/astrolabe/issues](https://github.com/johnhyde/astrolabe/issues)
desk/doc/usr/sigil.udon+18−1
@@ -1,4 +1,21 @@
11;>
22# What is a Sigil?
33
4−TODO: write this doc
4+It's a default profile picture, based on your [`@p`](/~/scry/docs/usr/astrolabe/patpee.html).
5+Each 3-letter syllable corresponds to sigil shape, or symbol.
6+Since planet `@p`s have 4 syllables, a planet sigil is a 2x2 grid of 4 symbols.
7+Star sigils have 2 symbols, and galaxies just 1.
8+
9+![planet sigils](/apps/astrolabe/src/assets/sigil-example.png)
10+
11+## Is there a pattern to the sigil shapes?
12+
13+Some syllables which sound similar have similar symbols,
14+but there's no real system to it. The sigil shapes were manually selected and assigned,
15+with a focus on visual design rather than algorithmic purity.
16+
17+## Where did they come from?
18+
19+Tlon saw that Urbit IDs need a visual representation,
20+so they designed a system for generating default avatars.
21+You can read about it in the blog post [_Creating Sigils_](https://urbit.org/blog/creating-sigils).
ui/package-lock.json+1
@@ -43,6 +43,7 @@
4343 }
4444 },
4545 "../../legil-js": {
46+ "name": "@johnhyde/legil-js",
4647 "version": "0.0.0",
4748 "license": "MIT",
4849 "dependencies": {
ui/src/assets/sigil-example.pngnew file

Binary file not shown.

ui/src/components/docs/DocHome.svelte+3
@@ -52,6 +52,9 @@
5252 </DocLink>
5353 </li>
5454 </ul>
55+ <DocLink path="sigil" on:navigate>
56+ <h2>What is a Sigil?</h2>
57+ </DocLink>
5558 <DocLink path="azimuth" on:navigate>
5659 <h2>What is Azimuth?</h2>
5760 </DocLink>
ui/src/components/search/sigil/SigilInput.svelte+1−1
@@ -66,7 +66,7 @@
6666 {:else}
6767 <SymbolInputNavButtons onClear={sigilQuery.isNotEmpty ? clear : null} />
6868 <p class="mt-2">
69− Allow Sigils which don't exist:
69+ Allow impossible Sigils:
7070 <ToggleButton on:click={toggleAllowFictional} on={$searchSettings.allowFictionalSigils} />
7171 </p>
7272 {/if}
ui/src/lib/sigil.ts+6−2
@@ -69,7 +69,11 @@ export class SigilQuery {
6969 }
7070
7171 get queryInts(): number[][] {
72− return this.activeSymbols.map(symbol => symbol.plausibleInts);
72+ let ints = this.activeSymbols.map(symbol => symbol.plausibleInts);
73+ if (ints.length > 1) {
74+ ints[0] = without(ints[0], 0);
75+ }
76+ return ints;
7377 }
7478
7579 get isDefinitive() {
@@ -115,7 +119,7 @@ export class SigilQuery {
115119 symbols = queryParts.map((parts) => {
116120 let symbol = new SymbolQuery(this, parts);
117121 if (symbol.components.length !== parts.length) {
118− throw new Error(`Invalid component ids: ${without(parts, symbol.components)}`);
122+ throw new Error(`Invalid component ids: ${without(parts, ...symbol.components)}`);
119123 }
120124 });
121125 } catch (e) {