From 7f559f5ca995d1e524c380395ccd810aa8d0ccc7 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 18 Sep 2020 14:25:15 -0400 Subject: [PATCH 01/54] arvo: remove test/example.udon This file dates back to the previous Eyre write; Arvo no longer has a /web folder, so this seems fine to clean out. --- pkg/arvo/app/test/example.udon | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 pkg/arvo/app/test/example.udon diff --git a/pkg/arvo/app/test/example.udon b/pkg/arvo/app/test/example.udon deleted file mode 100644 index 3bbe57aa9..000000000 --- a/pkg/arvo/app/test/example.udon +++ /dev/null @@ -1,8 +0,0 @@ -:- ~[comments+&] -;> - -# Static - -You can put static files in here to serve them to the web. Actually, you can put static files anywhere in `/web` and see them in a browser. - -Docs on static publishing with urbit are forthcoming — but feel free to drop markdown files in `/web` to try it out. From f3348543180f931d79b5a98623a70d56e488b466 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Fri, 18 Sep 2020 15:50:54 -0400 Subject: [PATCH 02/54] WIP: +graph-export --- pkg/arvo/app/graph-store.hoon | 14 ++++++++++++++ pkg/arvo/gen/graph-store/export-graph.hoon | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkg/arvo/gen/graph-store/export-graph.hoon diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index bdfabe744..32178dee7 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -473,6 +473,20 @@ :+ %0 now.bowl [%add-graph [ship term] `graph:store`p.u.result q.u.result] + :: + :: note: near-duplicate of /x/graph + :: + [%x %archive @ @ ~] + =/ =ship (slav %p i.t.t.path) + =/ =term i.t.t.t.path + =/ result=(unit marked-graph:store) + (~(get by archive) [ship term]) + ?~ result [~ ~] + :- ~ :- ~ :- %graph-update + !> ^- update:store + :+ %0 + now.bowl + [%add-graph [ship term] `graph:store`p.u.result q.u.result] :: [%x %graph-subset @ @ @ @ ~] =/ =ship (slav %p i.t.t.path) diff --git a/pkg/arvo/gen/graph-store/export-graph.hoon b/pkg/arvo/gen/graph-store/export-graph.hoon new file mode 100644 index 000000000..d29f95a88 --- /dev/null +++ b/pkg/arvo/gen/graph-store/export-graph.hoon @@ -0,0 +1,11 @@ +/+ graph-store +:: +:- %say +|= $: [now=@da eny=@uvJ bec=beak] + [=ship graph=term ~] + == +:- %noun +=/ our (scot %p p.bec) +=/ wen (scot %da now) +=/ who (scot %p ship) +.^(update:graph-store /gx/[our]/graph-store/[wen]/[who]/[graph]) From 3c03d61038f7921795d9bbc56c53e7391725bb0b Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Fri, 18 Sep 2020 16:21:00 -0400 Subject: [PATCH 03/54] +graph-store/export-graph and associated scry handler --- pkg/arvo/app/graph-store.hoon | 1 + pkg/arvo/gen/graph-store/export-graph.hoon | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index 32178dee7..6a0c0421e 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -449,6 +449,7 @@ ^- (unit (unit cage)) |^ ?> (team:title our.bowl src.bowl) + ~& path=path ?+ path (on-peek:def path) [%x %keys ~] :- ~ :- ~ :- %graph-update diff --git a/pkg/arvo/gen/graph-store/export-graph.hoon b/pkg/arvo/gen/graph-store/export-graph.hoon index d29f95a88..24d9713d6 100644 --- a/pkg/arvo/gen/graph-store/export-graph.hoon +++ b/pkg/arvo/gen/graph-store/export-graph.hoon @@ -2,10 +2,13 @@ :: :- %say |= $: [now=@da eny=@uvJ bec=beak] - [=ship graph=term ~] + [[=ship graph=term ~] ~] == :- %noun =/ our (scot %p p.bec) =/ wen (scot %da now) =/ who (scot %p ship) -.^(update:graph-store /gx/[our]/graph-store/[wen]/[who]/[graph]) +:: +.^ update:graph-store + /gx/[our]/graph-store/[wen]/archive/[who]/[graph]/graph-update +== From d6899857f4b2649f328ccdb7e541967c07b313b7 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Fri, 18 Sep 2020 16:50:34 -0400 Subject: [PATCH 04/54] +graph-store/import-graph --- pkg/arvo/app/graph-store.hoon | 4 +++- pkg/arvo/gen/graph-store/export-graph.hoon | 2 +- pkg/arvo/gen/graph-store/import-graph.hoon | 9 +++++++++ pkg/arvo/mar/graph/update.hoon | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 pkg/arvo/gen/graph-store/import-graph.hoon diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index 6a0c0421e..f8115b1b1 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -482,7 +482,9 @@ =/ =term i.t.t.t.path =/ result=(unit marked-graph:store) (~(get by archive) [ship term]) - ?~ result [~ ~] + ?~ result + ~& no-archived-graph+[ship term] + [~ ~] :- ~ :- ~ :- %graph-update !> ^- update:store :+ %0 diff --git a/pkg/arvo/gen/graph-store/export-graph.hoon b/pkg/arvo/gen/graph-store/export-graph.hoon index 24d9713d6..9a52862d6 100644 --- a/pkg/arvo/gen/graph-store/export-graph.hoon +++ b/pkg/arvo/gen/graph-store/export-graph.hoon @@ -4,7 +4,7 @@ |= $: [now=@da eny=@uvJ bec=beak] [[=ship graph=term ~] ~] == -:- %noun +:- %graph-update =/ our (scot %p p.bec) =/ wen (scot %da now) =/ who (scot %p ship) diff --git a/pkg/arvo/gen/graph-store/import-graph.hoon b/pkg/arvo/gen/graph-store/import-graph.hoon new file mode 100644 index 000000000..720c24e61 --- /dev/null +++ b/pkg/arvo/gen/graph-store/import-graph.hoon @@ -0,0 +1,9 @@ +/+ graph-store +:: +:- %say +|= $: [now=@da eny=@uvJ bec=beak] + [[graph=term =path ~] ~] + == +:- %graph-update +=- ~& update=- - +.^(=update:graph-store %cx path) diff --git a/pkg/arvo/mar/graph/update.hoon b/pkg/arvo/mar/graph/update.hoon index 1cd2a2068..e6766edb5 100644 --- a/pkg/arvo/mar/graph/update.hoon +++ b/pkg/arvo/mar/graph/update.hoon @@ -1,15 +1,19 @@ /+ *graph-store +=* as-octs as-octs:mimes:html +:: |_ upd=update ++ grad %noun ++ grow |% ++ noun upd ++ json (update:enjs upd) + ++ mime [/application/x-urb-graph-update (as-octs (jam upd))] -- :: ++ grab |% ++ noun update ++ json update:dejs + ++ mime |=([* =octs] ;;(update (cue q.octs))) -- -- From 9ee1a1751c578633cba6ff2b0354af27568eca8e Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Mon, 21 Sep 2020 10:50:03 -0400 Subject: [PATCH 05/54] :graph-store: remove stray printf --- pkg/arvo/app/graph-store.hoon | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index f8115b1b1..de93ec1ad 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -449,7 +449,6 @@ ^- (unit (unit cage)) |^ ?> (team:title our.bowl src.bowl) - ~& path=path ?+ path (on-peek:def path) [%x %keys ~] :- ~ :- ~ :- %graph-update From ce97d35d0245b805dc9c7e936cd6082a6a104185 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 22 Sep 2020 16:24:49 +1000 Subject: [PATCH 06/54] interface: bump indigo version --- pkg/interface/package.json | 2 +- .../src/views/apps/chat/components/join.js | 2 +- .../groups/components/lib/ContactCard.tsx | 2 +- .../components/lib/BackgroundPicker.tsx | 20 ++++++++++--------- .../profile/components/lib/BucketList.tsx | 4 ++-- .../profile/components/lib/DisplayForm.tsx | 8 ++++---- .../apps/profile/components/lib/DragTile.tsx | 4 ++-- .../apps/profile/components/lib/S3Form.tsx | 2 +- .../publish/components/lib/CommentInput.tsx | 2 +- .../apps/publish/components/lib/Join.tsx | 4 ++-- .../publish/components/lib/MetadataForm.tsx | 6 ++---- .../apps/publish/components/lib/Settings.tsx | 8 ++++---- .../views/apps/publish/components/lib/new.tsx | 2 +- .../src/views/components/AsyncButton.tsx | 10 +++++++--- .../src/views/components/ColorInput.tsx | 6 +++--- .../src/views/components/DropdownSearch.tsx | 11 +++++----- .../src/views/components/FormError.tsx | 4 ++-- .../src/views/components/ImageInput.tsx | 2 +- 18 files changed, 51 insertions(+), 48 deletions(-) diff --git a/pkg/interface/package.json b/pkg/interface/package.json index 19e5448df..70afba9d2 100644 --- a/pkg/interface/package.json +++ b/pkg/interface/package.json @@ -9,7 +9,7 @@ "@reach/menu-button": "^0.10.5", "@reach/tabs": "^0.10.5", "@tlon/indigo-light": "^1.0.3", - "@tlon/indigo-react": "^1.1.15", + "@tlon/indigo-react": "github:liam-fitzgerald/indigo-react#lf/1.2.5", "aws-sdk": "^2.726.0", "classnames": "^2.2.6", "codemirror": "^5.55.0", diff --git a/pkg/interface/src/views/apps/chat/components/join.js b/pkg/interface/src/views/apps/chat/components/join.js index 282a76cab..41476777b 100644 --- a/pkg/interface/src/views/apps/chat/components/join.js +++ b/pkg/interface/src/views/apps/chat/components/join.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { Spinner } from '../../../components/Spinner'; import urbitOb from 'urbit-ob'; -import { Box, Text, Input, Button } from '@tlon/indigo-react'; +import { Box, Text, ManagedTextInputField as Input, Button } from '@tlon/indigo-react'; import { Formik, Form } from 'formik' import * as Yup from 'yup'; diff --git a/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx b/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx index f8438417d..8059b417f 100644 --- a/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx +++ b/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx @@ -6,7 +6,7 @@ import { Link } from "react-router-dom"; import { EditElement } from "./edit-element"; import { Spinner } from "~/views/components/Spinner"; import { uxToHex } from "~/logic/lib/util"; -import { Col, Input, Box, Text, Row } from "@tlon/indigo-react"; +import { Col, ManagedTextInputField as Input, Box, Text, Row } from "@tlon/indigo-react"; import { Formik, Form, FormikHelpers } from "formik"; import { Contact } from "~/types/contact-update"; import { AsyncButton } from "~/views/components/AsyncButton"; diff --git a/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx b/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx index 13f87610e..c7325972d 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx @@ -1,9 +1,14 @@ -import React from 'react'; -import { Box, InputLabel, Radio, Input } from '@tlon/indigo-react'; +import React from "react"; +import { + Box, + Label, + ManagedRadioButtonField as Radio, + ManagedTextInputField as Input, +} from "@tlon/indigo-react"; -import GlobalApi from '~/logic/api/global'; -import { S3State } from '~/types'; -import { ImageInput } from '~/views/components/ImageInput'; +import GlobalApi from "~/logic/api/global"; +import { S3State } from "~/types"; +import { ImageInput } from "~/views/components/ImageInput"; export type BgType = "none" | "url" | "color"; @@ -20,7 +25,7 @@ export function BackgroundPicker({ }) { return ( - Landscape Background + @@ -41,7 +46,6 @@ export function BackgroundPicker({ type="text" label="Color" id="bgColor" - name="bgColor" /> )} @@ -50,5 +54,3 @@ export function BackgroundPicker({ ); } - - diff --git a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx index a13764661..7c43f96ec 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from "react"; import { - Input, + ManagedTextInputField as Input, Box, Button, Col, @@ -13,7 +13,7 @@ import { } from "@tlon/indigo-react"; import { Formik, Form } from "formik"; -import GlobalApi from "../../../../api/global"; +import GlobalApi from "~/logic/api/global"; export function BucketList({ buckets, diff --git a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx index d69db3513..639136cc0 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx @@ -2,8 +2,8 @@ import React from "react"; import { Box, - InputLabel, - Checkbox, + Label, + ManagedCheckboxField as Checkbox, Button, } from "@tlon/indigo-react"; import { Formik, Form } from "formik"; @@ -107,9 +107,9 @@ export default function DisplayForm(props: DisplayFormProps) { Display Preferences - + + ` +const Image = styled(_Image)<{ invert?: boolean }>` ${(p) => p.theme.colors.white !== "rgba(255,255,255,1)" ? `filter: invert(1);` : ``} diff --git a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx index dc82edff2..86dfaa7da 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from "react"; import { - Input, + ManagedTextInputField as Input, Box, Button, Col, diff --git a/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx b/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx index 4830f2067..62c8f105b 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx @@ -2,7 +2,7 @@ import React from "react"; import * as Yup from "yup"; import { Formik, FormikHelpers, Form, useFormikContext } from "formik"; import { AsyncButton } from "../../../../components/AsyncButton"; -import { TextArea } from "@tlon/indigo-react"; +import { ManagedTextAreaField as TextArea } from "@tlon/indigo-react"; interface FormSchema { comment: string; diff --git a/pkg/interface/src/views/apps/publish/components/lib/Join.tsx b/pkg/interface/src/views/apps/publish/components/lib/Join.tsx index c510df597..f3f413a77 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Join.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Join.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useState, useRef, useEffect } from "react"; -import { Col, Text, ErrorMessage } from "@tlon/indigo-react"; +import { Col, Text, ErrorLabel } from "@tlon/indigo-react"; import { Spinner } from "~/views/components/Spinner"; import { Notebooks } from "~/types/publish-update"; import { useWaitForProps } from "~/logic/lib/useWaitForProps"; @@ -46,7 +46,7 @@ export function JoinScreen(props: JoinScreenProps & RouteComponentProps) { Joining Notebook - {error && Unable to join notebook} + {error && Unable to join notebook} ); } diff --git a/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx b/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx index 4209817ef..05065ba2c 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx @@ -3,11 +3,9 @@ import { AsyncButton } from "../../../../components/AsyncButton"; import * as Yup from "yup"; import { Box, - Input, - Checkbox, + ManagedTextInputField as Input, + ManagedCheckboxField as Checkbox, Col, - InputLabel, - InputCaption, Button, Center, } from "@tlon/indigo-react"; diff --git a/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx b/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx index 3bb3693c8..f9e7a9084 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { Box, Col, Button, InputLabel, InputCaption } from "@tlon/indigo-react"; +import { Box, Col, Button, Label } from "@tlon/indigo-react"; import GlobalApi from "~/logic/api/global"; import { Notebook } from "~/types/publish-update"; import { Contacts } from "~/types/contact-update"; @@ -50,11 +50,11 @@ export function Settings(props: SettingsProps) { - Delete Notebook - + + + diff --git a/pkg/interface/src/views/apps/publish/components/lib/new.tsx b/pkg/interface/src/views/apps/publish/components/lib/new.tsx index cd061b68c..8a4b5360f 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/new.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/new.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from "react"; -import { Box, Input, Col } from "@tlon/indigo-react"; +import { Box, ManagedTextInputField as Input, Col } from "@tlon/indigo-react"; import { Formik, Form } from "formik"; import * as Yup from "yup"; import GlobalApi from "~/logic/api/global"; diff --git a/pkg/interface/src/views/components/AsyncButton.tsx b/pkg/interface/src/views/components/AsyncButton.tsx index a2a5fd826..101336494 100644 --- a/pkg/interface/src/views/components/AsyncButton.tsx +++ b/pkg/interface/src/views/components/AsyncButton.tsx @@ -1,8 +1,7 @@ import React, { ReactNode, useState, useEffect } from "react"; -import { Button } from "@tlon/indigo-react"; +import { Button, LoadingSpinner } from "@tlon/indigo-react"; -import { Spinner } from "./Spinner"; import { useFormikContext } from "formik"; interface AsyncButtonProps { @@ -37,7 +36,12 @@ export function AsyncButton({ return (