From 31d3c76557cfd6202b8bac5ab46daf0eb880c774 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 16:40:29 -0800 Subject: [PATCH 01/12] Add override for git package --- .reflame.config.jsonc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index f73b39f3..487a5d3c 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -3,9 +3,9 @@ // It's basically JSON, with the addition of comments, and looser syntax // (trailing commas!). // Reflame uses this to identify your app. - "appId": "01H3N3HTS2MAWNK33P0K6QF386", // prod + // "appId": "01H3N3HTS2MAWNK33P0K6QF386", // prod // "appId": "01H30NCV90SQP7ZJDCG9P7RJRG", // prod fork - // "appId": "01H335HJ288YMK1YM60ZTVWF42", // dev + "appId": "01H335HJ288YMK1YM60ZTVWF42", // dev // This is what shows up in the browser's tab bar. "title": "Chat via XMTP", // This is the description that shows up in Google search. @@ -175,5 +175,8 @@ "/" ] } + }, + "npmPackageOverrides": { + "one-webcrypto": "npm:one-webcrypto@1.0.3" } } From b794858b1fb60d1b585713e181cb486f5191737a Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 16:45:12 -0800 Subject: [PATCH 02/12] Add ucanto packages as direct deps --- package-lock.json | 2 ++ package.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package-lock.json b/package-lock.json index 5dbf154d..0a85a62d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,8 @@ "@heroicons/react": "^1.0.5", "@ipld/car": "^5.2.5", "@rainbow-me/rainbowkit": "^1.0.11", + "@ucanto/core": "^9.0.1", + "@ucanto/principal": "^9.0.0", "@wagmi/core": "^1.4.2", "@web3-storage/w3up-client": "^12.0.0", "@xmtp/content-type-reaction": "^1.1.3", diff --git a/package.json b/package.json index 0cd3f66f..4e1341de 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,8 @@ "@heroicons/react": "^1.0.5", "@ipld/car": "^5.2.5", "@rainbow-me/rainbowkit": "^1.0.11", + "@ucanto/core": "^9.0.1", + "@ucanto/principal": "^9.0.0", "@wagmi/core": "^1.4.2", "@web3-storage/w3up-client": "^12.0.0", "@xmtp/content-type-reaction": "^1.1.3", From 2984558a82c153f44d161b0dd1264d3d5b0edafc Mon Sep 17 00:00:00 2001 From: "reflame-development[bot]" <106131894+reflame-development[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 00:45:47 +0000 Subject: [PATCH 03/12] Update Reflame config with missing entry points --- .reflame.config.jsonc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index 487a5d3c..1d73858f 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -174,9 +174,21 @@ "/chains", "/" ] + }, + "@ucanto/core": { + "entryPoints": [ + "/delegation", + "/" + ] + }, + "@ucanto/principal": { + "entryPoints": [ + "/ed25519", + "/" + ] } }, "npmPackageOverrides": { "one-webcrypto": "npm:one-webcrypto@1.0.3" } -} +} \ No newline at end of file From 08c43891d48e3b2b19eefbd38952d8cf83ff6285 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 16:49:51 -0800 Subject: [PATCH 04/12] Add context for override in comments --- .reflame.config.jsonc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index 1d73858f..c6d3491f 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -189,6 +189,10 @@ } }, "npmPackageOverrides": { + // This package is specified as a git dependency: https://github.com/web3-storage/w3up/blob/d6978d7ab299be76987c6533d18e6857f6998fe6/packages/access-client/package.json#L113 + // which Reflame doesn't support yet + // Luckily looks like the only reason for doing this was to point to a fork that fixes types: https://github.com/fission-codes/one-webcrypto/commit/5148cd14d5489a8ac4cd38223870e02db15a2382 + // which is irrelevant to the Reflame deploy, so we can safely just point to the original package "one-webcrypto": "npm:one-webcrypto@1.0.3" } } \ No newline at end of file From 42f2c3538a7ac6590fbe2a90d98a2ceca1073583 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 17:11:13 -0800 Subject: [PATCH 05/12] Move images to src Reflame doesn't currently support a public folder, partly because assets in public folders can't take advantage of content-hashes for semi-permanent caching. --- src/component-library/components/Mobile/Mobile.tsx | 4 +++- .../components/ScreenEffects/RainEffect.css | 2 +- .../components/SideNav/SideNav.tsx | 11 ++++++++--- src/global.d.ts | 2 +- {public => src/images}/shareQrBg.png | Bin {public => src/images}/xmtp-icon.png | Bin {public => src/images}/xmtp-logo.png | Bin 7 files changed, 13 insertions(+), 6 deletions(-) rename {public => src/images}/shareQrBg.png (100%) rename {public => src/images}/xmtp-icon.png (100%) rename {public => src/images}/xmtp-logo.png (100%) diff --git a/src/component-library/components/Mobile/Mobile.tsx b/src/component-library/components/Mobile/Mobile.tsx index 1e830a08..8fb43c04 100644 --- a/src/component-library/components/Mobile/Mobile.tsx +++ b/src/component-library/components/Mobile/Mobile.tsx @@ -1,3 +1,5 @@ +import xmtpIconUrl from '../../../images/xmtp-icon.png' + const LinkEle = ({ url, text }: { url: string; text: string }) => ( ( export const Mobile = () => (
- XMTP logo + XMTP logo

Looks like you're on mobile!

For mobile-friendly chat:

diff --git a/src/component-library/components/ScreenEffects/RainEffect.css b/src/component-library/components/ScreenEffects/RainEffect.css index 4e2a76ab..f6078a61 100644 --- a/src/component-library/components/ScreenEffects/RainEffect.css +++ b/src/component-library/components/ScreenEffects/RainEffect.css @@ -12,7 +12,7 @@ width: 50px; height: 50px; transform: scale(0.1); - background-image: url("../../../../public/xmtp-icon.png"); + background-image: url("../../../images/xmtp-icon.png"); background-size: 50px auto; border-radius: 50%; animation: fall linear infinite; diff --git a/src/component-library/components/SideNav/SideNav.tsx b/src/component-library/components/SideNav/SideNav.tsx index 9c35f36d..dabe3c32 100644 --- a/src/component-library/components/SideNav/SideNav.tsx +++ b/src/component-library/components/SideNav/SideNav.tsx @@ -9,6 +9,7 @@ import { import { ClipboardCopyIcon, XIcon } from "@heroicons/react/outline"; import { useTranslation } from "react-i18next"; import { QRCode } from "react-qrcode-logo"; +import xmtpIconUrl from '../../../images/xmtp-icon.png' import type { ETHAddress } from "../../../helpers"; import { classNames, isAppEnvDemo, shortAddress } from "../../../helpers"; import { XmtpIcon } from "../Icons/XmtpIcon"; @@ -16,6 +17,8 @@ import { Avatar } from "../Avatar/Avatar"; import { GhostButton } from "../GhostButton/GhostButton"; import { DisconnectIcon } from "../Icons/DisconnectIcon"; import i18next, { supportedLocales } from "../../../helpers/i18n"; +import shareQrBgUrl from '../../../images/shareQrBg.png' +import xmtpLogoUrl from '../../../images/xmtp-logo.png' interface SideNavProps { /** @@ -205,7 +208,9 @@ const SideNav = ({
-
+
@@ -231,7 +236,7 @@ const SideNav = ({
Date: Wed, 6 Mar 2024 17:13:36 -0800 Subject: [PATCH 06/12] Add test --- src/component-library/components/Avatar/Avatar.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/component-library/components/Avatar/Avatar.tsx b/src/component-library/components/Avatar/Avatar.tsx index 85649705..ba942556 100644 --- a/src/component-library/components/Avatar/Avatar.tsx +++ b/src/component-library/components/Avatar/Avatar.tsx @@ -1,4 +1,5 @@ import Blockies from "react-blockies"; +import xmtpIconUrl from '../../../images/xmtp-icon.png' interface AvatarProps { /** @@ -47,3 +48,7 @@ export const Avatar = ({ url, isLoading, address }: AvatarProps) => {
); }; + +export const Avatar_test = + +export const AvatarLoading_test = \ No newline at end of file From f0e99814d2c79949f1bbd7e65884fd8bcc98643c Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 17:17:09 -0800 Subject: [PATCH 07/12] Update --- src/component-library/components/Avatar/Avatar.tsx | 4 ++-- src/testConfig.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/testConfig.tsx diff --git a/src/component-library/components/Avatar/Avatar.tsx b/src/component-library/components/Avatar/Avatar.tsx index ba942556..7e54a11d 100644 --- a/src/component-library/components/Avatar/Avatar.tsx +++ b/src/component-library/components/Avatar/Avatar.tsx @@ -49,6 +49,6 @@ export const Avatar = ({ url, isLoading, address }: AvatarProps) => { ); }; -export const Avatar_test = - +export const Avatar_test = +export const AvatarWithAddress_test = export const AvatarLoading_test = \ No newline at end of file diff --git a/src/testConfig.tsx b/src/testConfig.tsx new file mode 100644 index 00000000..744cc127 --- /dev/null +++ b/src/testConfig.tsx @@ -0,0 +1 @@ +import './globals.css' \ No newline at end of file From 098216aa9e08c92a0fb545fa030a1e6f0aaa2ba9 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 17:21:19 -0800 Subject: [PATCH 08/12] Back to prod --- .reflame.config.jsonc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index c6d3491f..ad600071 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -3,9 +3,9 @@ // It's basically JSON, with the addition of comments, and looser syntax // (trailing commas!). // Reflame uses this to identify your app. - // "appId": "01H3N3HTS2MAWNK33P0K6QF386", // prod + "appId": "01H3N3HTS2MAWNK33P0K6QF386", // prod // "appId": "01H30NCV90SQP7ZJDCG9P7RJRG", // prod fork - "appId": "01H335HJ288YMK1YM60ZTVWF42", // dev + // "appId": "01H335HJ288YMK1YM60ZTVWF42", // dev // This is what shows up in the browser's tab bar. "title": "Chat via XMTP", // This is the description that shows up in Google search. From ef283e1aecbd67e33c50e178c8b54ac0ebba2222 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 6 Mar 2024 18:24:30 -0800 Subject: [PATCH 09/12] Fix formatting --- .../components/Avatar/Avatar.tsx | 8 ++++---- .../components/Mobile/Mobile.tsx | 2 +- .../components/SideNav/SideNav.tsx | 20 +++++++++---------- src/testConfig.tsx | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/component-library/components/Avatar/Avatar.tsx b/src/component-library/components/Avatar/Avatar.tsx index 7e54a11d..2e2820fc 100644 --- a/src/component-library/components/Avatar/Avatar.tsx +++ b/src/component-library/components/Avatar/Avatar.tsx @@ -1,5 +1,5 @@ import Blockies from "react-blockies"; -import xmtpIconUrl from '../../../images/xmtp-icon.png' +import xmtpIconUrl from "../../../images/xmtp-icon.png"; interface AvatarProps { /** @@ -49,6 +49,6 @@ export const Avatar = ({ url, isLoading, address }: AvatarProps) => { ); }; -export const Avatar_test = -export const AvatarWithAddress_test = -export const AvatarLoading_test = \ No newline at end of file +export const Avatar_test = ; +export const AvatarWithAddress_test = ; +export const AvatarLoading_test = ; diff --git a/src/component-library/components/Mobile/Mobile.tsx b/src/component-library/components/Mobile/Mobile.tsx index 8fb43c04..4ce9876d 100644 --- a/src/component-library/components/Mobile/Mobile.tsx +++ b/src/component-library/components/Mobile/Mobile.tsx @@ -1,4 +1,4 @@ -import xmtpIconUrl from '../../../images/xmtp-icon.png' +import xmtpIconUrl from "../../../images/xmtp-icon.png"; const LinkEle = ({ url, text }: { url: string; text: string }) => (
-
+
- xmtp-logo + xmtp-logo
{t("common.share_code")} diff --git a/src/testConfig.tsx b/src/testConfig.tsx index 744cc127..77f6fcb0 100644 --- a/src/testConfig.tsx +++ b/src/testConfig.tsx @@ -1 +1 @@ -import './globals.css' \ No newline at end of file +import "./globals.css"; From dc4b5effc4f0b63849a1e650d67a93aa094d8c5d Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 24 Apr 2024 13:35:55 -0700 Subject: [PATCH 10/12] Fix missing packages --- .reflame.config.jsonc | 1 + package-lock.json | 2 ++ package.json | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index ad600071..5716da16 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -116,6 +116,7 @@ "@wagmi/core": { "entryPoints": [ "/", + "/chains", "/connectors/mock" ] }, diff --git a/package-lock.json b/package-lock.json index 2f257482..5b7d7cb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,8 @@ "@ipld/car": "^5.2.5", "@rainbow-me/rainbowkit": "^2.0.1", "@tanstack/react-query": "^5.24.1", + "@ucanto/core": "^9.0.1", + "@ucanto/principal": "^9.0.0", "@wagmi/connectors": "^4.1.14", "@wagmi/core": "^2.6.5", "@web3-storage/w3up-client": "^12.0.0", diff --git a/package.json b/package.json index c10fbf70..2a21d587 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,8 @@ "@ipld/car": "^5.2.5", "@rainbow-me/rainbowkit": "^2.0.1", "@tanstack/react-query": "^5.24.1", + "@ucanto/core": "^9.0.1", + "@ucanto/principal": "^9.0.0", "@wagmi/connectors": "^4.1.14", "@wagmi/core": "^2.6.5", "@web3-storage/w3up-client": "^12.0.0", From 31b41202191af633e6224e6e7e5ccf74073a2617 Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 24 Apr 2024 13:37:39 -0700 Subject: [PATCH 11/12] Update --- .reflame.config.jsonc | 1 + 1 file changed, 1 insertion(+) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index 5716da16..ed52510a 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -1,4 +1,5 @@ { + // 1 // This is a JSON with Comments file. // It's basically JSON, with the addition of comments, and looser syntax // (trailing commas!). From 4836561a03022b211dd2859f28379f10844e891a Mon Sep 17 00:00:00 2001 From: Lewis Liu Date: Wed, 24 Apr 2024 13:40:46 -0700 Subject: [PATCH 12/12] Update --- .reflame.config.jsonc | 1 - 1 file changed, 1 deletion(-) diff --git a/.reflame.config.jsonc b/.reflame.config.jsonc index ed52510a..5716da16 100644 --- a/.reflame.config.jsonc +++ b/.reflame.config.jsonc @@ -1,5 +1,4 @@ { - // 1 // This is a JSON with Comments file. // It's basically JSON, with the addition of comments, and looser syntax // (trailing commas!).