diff --git a/apps/tlon-mobile/cosmos.imports.ts b/apps/tlon-mobile/cosmos.imports.ts index 04069af491..5e5e00059c 100644 --- a/apps/tlon-mobile/cosmos.imports.ts +++ b/apps/tlon-mobile/cosmos.imports.ts @@ -1,65 +1,67 @@ // This file is automatically generated by Cosmos. Add it to .gitignore and // only edit if you know what you're doing. + import { RendererConfig, UserModuleWrappers } from 'react-cosmos-core'; import * as fixture0 from './src/App.fixture'; -import * as fixture52 from './src/fixtures/ActionSheet/AddGalleryPostSheet.fixture'; -import * as fixture51 from './src/fixtures/ActionSheet/AttachmentSheet.fixture'; -import * as fixture50 from './src/fixtures/ActionSheet/ChannelSortActionsSheet.fixture'; -import * as fixture49 from './src/fixtures/ActionSheet/CreateChannelSheet.fixture'; -import * as fixture48 from './src/fixtures/ActionSheet/DeleteSheet.fixture'; -import * as fixture47 from './src/fixtures/ActionSheet/EditSectionNameSheet.fixture'; -import * as fixture46 from './src/fixtures/ActionSheet/GenericActionSheet.fixture'; -import * as fixture45 from './src/fixtures/ActionSheet/GroupJoinRequestSheet.fixture'; -import * as fixture44 from './src/fixtures/ActionSheet/GroupPreviewSheet.fixture'; -import * as fixture43 from './src/fixtures/ActionSheet/ProfileSheet.fixture'; -import * as fixture42 from './src/fixtures/ActionSheet/SendPostRetrySheet.fixture'; -import * as fixture38 from './src/fixtures/Activity.fixture'; -import * as fixture37 from './src/fixtures/AddGroupSheet.fixture'; -import * as fixture36 from './src/fixtures/AttachmentPreviewList.fixture'; -import * as fixture35 from './src/fixtures/AudioEmbed.fixture'; -import * as fixture34 from './src/fixtures/Avatar.fixture'; -import * as fixture33 from './src/fixtures/BlockSectionList.fixture'; -import * as fixture32 from './src/fixtures/Button.fixture'; -import * as fixture31 from './src/fixtures/Channel.fixture'; -import * as fixture30 from './src/fixtures/ChannelDivider.fixture'; -import * as fixture29 from './src/fixtures/ChannelHeader.fixture'; -import * as fixture28 from './src/fixtures/ChannelSwitcherSheet.fixture'; -import * as fixture27 from './src/fixtures/ChatMessage.fixture'; -import * as fixture26 from './src/fixtures/ContactList.fixture'; -import * as fixture25 from './src/fixtures/CreateGroup.fixture'; -import * as fixture41 from './src/fixtures/DetailView/ChatDetailView.fixture'; -import * as fixture40 from './src/fixtures/DetailView/GalleryDetailView.fixture'; -import * as fixture39 from './src/fixtures/DetailView/NotebookDetailView.fixture'; -import * as fixture24 from './src/fixtures/FindGroups.fixture'; -import * as fixture23 from './src/fixtures/Form.fixture'; -import * as fixture22 from './src/fixtures/GalleryPost.fixture'; -import * as fixture21 from './src/fixtures/GroupList.fixture'; -import * as fixture20 from './src/fixtures/GroupListItem.fixture'; -import * as fixture19 from './src/fixtures/ImageViewer.fixture'; -import * as fixture18 from './src/fixtures/Input.fixture'; -import * as fixture17 from './src/fixtures/InputToolbar.fixture'; -import * as fixture16 from './src/fixtures/InviteUsersSheet.fixture'; -import * as fixture15 from './src/fixtures/MessageActions.fixture'; -import * as fixture14 from './src/fixtures/MessageInput.fixture'; -import * as fixture13 from './src/fixtures/MetaEditorScreen.fixture'; -import * as fixture12 from './src/fixtures/OutsideEmbed.fixture'; -import * as fixture11 from './src/fixtures/PostReference.fixture'; -import * as fixture10 from './src/fixtures/PostScreen.fixture'; -import * as fixture9 from './src/fixtures/ProfileBlock.fixture'; -import * as fixture8 from './src/fixtures/ProfileSheet.fixture'; -import * as fixture7 from './src/fixtures/ReferenceSkeleton.fixture'; -import * as fixture6 from './src/fixtures/ScreenHeader.fixture'; -import * as fixture5 from './src/fixtures/SearchBar.fixture'; -import * as fixture4 from './src/fixtures/Text.fixture'; -import * as fixture3 from './src/fixtures/UserProfileScreen.fixture'; -import * as fixture2 from './src/fixtures/VideoEmbed.fixture'; import * as fixture1 from './src/fixtures/ViewReactionsSheet.fixture'; +import * as fixture2 from './src/fixtures/VideoEmbed.fixture'; +import * as fixture3 from './src/fixtures/UserProfileScreen.fixture'; +import * as fixture4 from './src/fixtures/Text.fixture'; +import * as fixture5 from './src/fixtures/SearchBar.fixture'; +import * as fixture6 from './src/fixtures/ScreenHeader.fixture'; +import * as fixture7 from './src/fixtures/ReferenceSkeleton.fixture'; +import * as fixture8 from './src/fixtures/ProfileSheet.fixture'; +import * as fixture9 from './src/fixtures/ProfileBlock.fixture'; +import * as fixture10 from './src/fixtures/PostScreen.fixture'; +import * as fixture11 from './src/fixtures/PostReference.fixture'; +import * as fixture12 from './src/fixtures/ParentAgnosticKeyboardAvoidingView.fixture'; +import * as fixture13 from './src/fixtures/OutsideEmbed.fixture'; +import * as fixture14 from './src/fixtures/MetaEditorScreen.fixture'; +import * as fixture15 from './src/fixtures/MessageInput.fixture'; +import * as fixture16 from './src/fixtures/MessageActions.fixture'; +import * as fixture17 from './src/fixtures/InviteUsersSheet.fixture'; +import * as fixture18 from './src/fixtures/InputToolbar.fixture'; +import * as fixture19 from './src/fixtures/Input.fixture'; +import * as fixture20 from './src/fixtures/ImageViewer.fixture'; +import * as fixture21 from './src/fixtures/GroupListItem.fixture'; +import * as fixture22 from './src/fixtures/GroupList.fixture'; +import * as fixture23 from './src/fixtures/GalleryPost.fixture'; +import * as fixture24 from './src/fixtures/Form.fixture'; +import * as fixture25 from './src/fixtures/FindGroups.fixture'; +import * as fixture26 from './src/fixtures/CreateGroup.fixture'; +import * as fixture27 from './src/fixtures/ContactList.fixture'; +import * as fixture28 from './src/fixtures/ChatMessage.fixture'; +import * as fixture29 from './src/fixtures/ChannelSwitcherSheet.fixture'; +import * as fixture30 from './src/fixtures/ChannelHeader.fixture'; +import * as fixture31 from './src/fixtures/ChannelDivider.fixture'; +import * as fixture32 from './src/fixtures/Channel.fixture'; +import * as fixture33 from './src/fixtures/Button.fixture'; +import * as fixture34 from './src/fixtures/BlockSectionList.fixture'; +import * as fixture35 from './src/fixtures/Avatar.fixture'; +import * as fixture36 from './src/fixtures/AudioEmbed.fixture'; +import * as fixture37 from './src/fixtures/AttachmentPreviewList.fixture'; +import * as fixture38 from './src/fixtures/AddGroupSheet.fixture'; +import * as fixture39 from './src/fixtures/Activity.fixture'; +import * as fixture40 from './src/fixtures/DetailView/NotebookDetailView.fixture'; +import * as fixture41 from './src/fixtures/DetailView/GalleryDetailView.fixture'; +import * as fixture42 from './src/fixtures/DetailView/ChatDetailView.fixture'; +import * as fixture43 from './src/fixtures/ActionSheet/SendPostRetrySheet.fixture'; +import * as fixture44 from './src/fixtures/ActionSheet/ProfileSheet.fixture'; +import * as fixture45 from './src/fixtures/ActionSheet/GroupPreviewSheet.fixture'; +import * as fixture46 from './src/fixtures/ActionSheet/GroupJoinRequestSheet.fixture'; +import * as fixture47 from './src/fixtures/ActionSheet/GenericActionSheet.fixture'; +import * as fixture48 from './src/fixtures/ActionSheet/EditSectionNameSheet.fixture'; +import * as fixture49 from './src/fixtures/ActionSheet/DeleteSheet.fixture'; +import * as fixture50 from './src/fixtures/ActionSheet/CreateChannelSheet.fixture'; +import * as fixture51 from './src/fixtures/ActionSheet/AttachmentSheet.fixture'; +import * as fixture52 from './src/fixtures/ActionSheet/AddGalleryPostSheet.fixture'; + import * as decorator0 from './src/fixtures/cosmos.decorator'; export const rendererConfig: RendererConfig = { - playgroundUrl: 'http://localhost:5000', - rendererUrl: null, + "playgroundUrl": "http://localhost:5001", + "rendererUrl": null }; const fixtures = { @@ -75,75 +77,55 @@ const fixtures = { 'src/fixtures/ProfileBlock.fixture.tsx': { module: fixture9 }, 'src/fixtures/PostScreen.fixture.tsx': { module: fixture10 }, 'src/fixtures/PostReference.fixture.tsx': { module: fixture11 }, - 'src/fixtures/OutsideEmbed.fixture.tsx': { module: fixture12 }, - 'src/fixtures/MetaEditorScreen.fixture.tsx': { module: fixture13 }, - 'src/fixtures/MessageInput.fixture.tsx': { module: fixture14 }, - 'src/fixtures/MessageActions.fixture.tsx': { module: fixture15 }, - 'src/fixtures/InviteUsersSheet.fixture.tsx': { module: fixture16 }, - 'src/fixtures/InputToolbar.fixture.tsx': { module: fixture17 }, - 'src/fixtures/Input.fixture.tsx': { module: fixture18 }, - 'src/fixtures/ImageViewer.fixture.tsx': { module: fixture19 }, - 'src/fixtures/GroupListItem.fixture.tsx': { module: fixture20 }, - 'src/fixtures/GroupList.fixture.tsx': { module: fixture21 }, - 'src/fixtures/GalleryPost.fixture.tsx': { module: fixture22 }, - 'src/fixtures/Form.fixture.tsx': { module: fixture23 }, - 'src/fixtures/FindGroups.fixture.tsx': { module: fixture24 }, - 'src/fixtures/CreateGroup.fixture.tsx': { module: fixture25 }, - 'src/fixtures/ContactList.fixture.tsx': { module: fixture26 }, - 'src/fixtures/ChatMessage.fixture.tsx': { module: fixture27 }, - 'src/fixtures/ChannelSwitcherSheet.fixture.tsx': { module: fixture28 }, - 'src/fixtures/ChannelHeader.fixture.tsx': { module: fixture29 }, - 'src/fixtures/ChannelDivider.fixture.tsx': { module: fixture30 }, - 'src/fixtures/Channel.fixture.tsx': { module: fixture31 }, - 'src/fixtures/Button.fixture.tsx': { module: fixture32 }, - 'src/fixtures/BlockSectionList.fixture.tsx': { module: fixture33 }, - 'src/fixtures/Avatar.fixture.tsx': { module: fixture34 }, - 'src/fixtures/AudioEmbed.fixture.tsx': { module: fixture35 }, - 'src/fixtures/AttachmentPreviewList.fixture.tsx': { module: fixture36 }, - 'src/fixtures/AddGroupSheet.fixture.tsx': { module: fixture37 }, - 'src/fixtures/Activity.fixture.tsx': { module: fixture38 }, - 'src/fixtures/DetailView/NotebookDetailView.fixture.tsx': { - module: fixture39, - }, - 'src/fixtures/DetailView/GalleryDetailView.fixture.tsx': { - module: fixture40, - }, - 'src/fixtures/DetailView/ChatDetailView.fixture.tsx': { module: fixture41 }, - 'src/fixtures/ActionSheet/SendPostRetrySheet.fixture.tsx': { - module: fixture42, - }, - 'src/fixtures/ActionSheet/ProfileSheet.fixture.tsx': { module: fixture43 }, - 'src/fixtures/ActionSheet/GroupPreviewSheet.fixture.tsx': { - module: fixture44, - }, - 'src/fixtures/ActionSheet/GroupJoinRequestSheet.fixture.tsx': { - module: fixture45, - }, - 'src/fixtures/ActionSheet/GenericActionSheet.fixture.tsx': { - module: fixture46, - }, - 'src/fixtures/ActionSheet/EditSectionNameSheet.fixture.tsx': { - module: fixture47, - }, - 'src/fixtures/ActionSheet/DeleteSheet.fixture.tsx': { module: fixture48 }, - 'src/fixtures/ActionSheet/CreateChannelSheet.fixture.tsx': { - module: fixture49, - }, - 'src/fixtures/ActionSheet/ChannelSortActionsSheet.fixture.tsx': { - module: fixture50, - }, + 'src/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx': { module: fixture12 }, + 'src/fixtures/OutsideEmbed.fixture.tsx': { module: fixture13 }, + 'src/fixtures/MetaEditorScreen.fixture.tsx': { module: fixture14 }, + 'src/fixtures/MessageInput.fixture.tsx': { module: fixture15 }, + 'src/fixtures/MessageActions.fixture.tsx': { module: fixture16 }, + 'src/fixtures/InviteUsersSheet.fixture.tsx': { module: fixture17 }, + 'src/fixtures/InputToolbar.fixture.tsx': { module: fixture18 }, + 'src/fixtures/Input.fixture.tsx': { module: fixture19 }, + 'src/fixtures/ImageViewer.fixture.tsx': { module: fixture20 }, + 'src/fixtures/GroupListItem.fixture.tsx': { module: fixture21 }, + 'src/fixtures/GroupList.fixture.tsx': { module: fixture22 }, + 'src/fixtures/GalleryPost.fixture.tsx': { module: fixture23 }, + 'src/fixtures/Form.fixture.tsx': { module: fixture24 }, + 'src/fixtures/FindGroups.fixture.tsx': { module: fixture25 }, + 'src/fixtures/CreateGroup.fixture.tsx': { module: fixture26 }, + 'src/fixtures/ContactList.fixture.tsx': { module: fixture27 }, + 'src/fixtures/ChatMessage.fixture.tsx': { module: fixture28 }, + 'src/fixtures/ChannelSwitcherSheet.fixture.tsx': { module: fixture29 }, + 'src/fixtures/ChannelHeader.fixture.tsx': { module: fixture30 }, + 'src/fixtures/ChannelDivider.fixture.tsx': { module: fixture31 }, + 'src/fixtures/Channel.fixture.tsx': { module: fixture32 }, + 'src/fixtures/Button.fixture.tsx': { module: fixture33 }, + 'src/fixtures/BlockSectionList.fixture.tsx': { module: fixture34 }, + 'src/fixtures/Avatar.fixture.tsx': { module: fixture35 }, + 'src/fixtures/AudioEmbed.fixture.tsx': { module: fixture36 }, + 'src/fixtures/AttachmentPreviewList.fixture.tsx': { module: fixture37 }, + 'src/fixtures/AddGroupSheet.fixture.tsx': { module: fixture38 }, + 'src/fixtures/Activity.fixture.tsx': { module: fixture39 }, + 'src/fixtures/DetailView/NotebookDetailView.fixture.tsx': { module: fixture40 }, + 'src/fixtures/DetailView/GalleryDetailView.fixture.tsx': { module: fixture41 }, + 'src/fixtures/DetailView/ChatDetailView.fixture.tsx': { module: fixture42 }, + 'src/fixtures/ActionSheet/SendPostRetrySheet.fixture.tsx': { module: fixture43 }, + 'src/fixtures/ActionSheet/ProfileSheet.fixture.tsx': { module: fixture44 }, + 'src/fixtures/ActionSheet/GroupPreviewSheet.fixture.tsx': { module: fixture45 }, + 'src/fixtures/ActionSheet/GroupJoinRequestSheet.fixture.tsx': { module: fixture46 }, + 'src/fixtures/ActionSheet/GenericActionSheet.fixture.tsx': { module: fixture47 }, + 'src/fixtures/ActionSheet/EditSectionNameSheet.fixture.tsx': { module: fixture48 }, + 'src/fixtures/ActionSheet/DeleteSheet.fixture.tsx': { module: fixture49 }, + 'src/fixtures/ActionSheet/CreateChannelSheet.fixture.tsx': { module: fixture50 }, 'src/fixtures/ActionSheet/AttachmentSheet.fixture.tsx': { module: fixture51 }, - 'src/fixtures/ActionSheet/AddGalleryPostSheet.fixture.tsx': { - module: fixture52, - }, + 'src/fixtures/ActionSheet/AddGalleryPostSheet.fixture.tsx': { module: fixture52 } }; const decorators = { - 'src/fixtures/cosmos.decorator.tsx': { module: decorator0 }, + 'src/fixtures/cosmos.decorator.tsx': { module: decorator0 } }; export const moduleWrappers: UserModuleWrappers = { lazy: false, fixtures, - decorators, + decorators }; diff --git a/apps/tlon-mobile/ios/Podfile.lock b/apps/tlon-mobile/ios/Podfile.lock index a45765f3ad..57a709f540 100644 --- a/apps/tlon-mobile/ios/Podfile.lock +++ b/apps/tlon-mobile/ios/Podfile.lock @@ -1356,7 +1356,9 @@ PODS: - Firebase/Performance (= 10.24.0) - React-Core - RNFBApp - - RNGestureHandler (2.18.1): + - RNFlashList (1.6.3): + - React-Core + - RNGestureHandler (2.20.0): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1491,6 +1493,7 @@ DEPENDENCIES: - "RNFBApp (from `../../../node_modules/@react-native-firebase/app`)" - "RNFBCrashlytics (from `../../../node_modules/@react-native-firebase/crashlytics`)" - "RNFBPerf (from `../../../node_modules/@react-native-firebase/perf`)" + - "RNFlashList (from `../../../node_modules/@shopify/flash-list`)" - RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`) - RNReanimated (from `../../../node_modules/react-native-reanimated`) - RNScreens (from `../../../node_modules/react-native-screens`) @@ -1725,6 +1728,8 @@ EXTERNAL SOURCES: :path: "../../../node_modules/@react-native-firebase/crashlytics" RNFBPerf: :path: "../../../node_modules/@react-native-firebase/perf" + RNFlashList: + :path: "../../../node_modules/@shopify/flash-list" RNGestureHandler: :path: "../../../node_modules/react-native-gesture-handler" RNReanimated: @@ -1862,7 +1867,8 @@ SPEC CHECKSUMS: RNFBApp: 91311b27bc9a33e23b76a62825afd1635501018a RNFBCrashlytics: c3219ef7a0c779f2428236215781c38e7892f6f9 RNFBPerf: 2c926ff255c704a644dd53572008cba47c67ada0 - RNGestureHandler: 9a413b04f827e0169f0f9f97a845c266da61f87c + RNFlashList: 4b4b6b093afc0df60ae08f9cbf6ccd4c836c667a + RNGestureHandler: 79c035e2243d3b7f4f353e7eb32869eace6b596c RNReanimated: 4b1bce37b188450e3a2d03c925edd5fb11d4bb2d RNScreens: a4d9ce8f68f833f4e42410140eafd88e38bba163 RNSVG: 3f65a03e0c61a8495dee92bf82545ed9041cbf3b diff --git a/apps/tlon-mobile/package.json b/apps/tlon-mobile/package.json index 5387c70d96..6c3ca7fdd3 100644 --- a/apps/tlon-mobile/package.json +++ b/apps/tlon-mobile/package.json @@ -55,6 +55,7 @@ "@react-navigation/bottom-tabs": "^6.5.12", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", + "@shopify/flash-list": "1.6.3", "@tanstack/react-query": "~5.32.1", "@tloncorp/app": "workspace:*", "@tloncorp/editor": "workspace:*", @@ -98,7 +99,7 @@ "react-native-country-codes-picker": "^2.3.3", "react-native-device-info": "^10.8.0", "react-native-fetch-api": "^3.0.0", - "react-native-gesture-handler": "~2.18.0", + "react-native-gesture-handler": "~2.20.0", "react-native-get-random-values": "^1.11.0", "react-native-phone-input": "^1.3.7", "react-native-polyfill-globals": "^3.1.0", @@ -120,12 +121,12 @@ "@faker-js/faker": "^8.4.1", "@jest/globals": "^29.7.0", "@react-native/metro-config": "^0.73.5", - "@tamagui/babel-plugin": "1.101.3", + "@tamagui/babel-plugin": "~1.112.12", "@testing-library/react-native": "^12.5.2", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/react": "^18.2.55", - "@types/tmp": "^0.2.6", "@types/seedrandom": "^3.0.5", + "@types/tmp": "^0.2.6", "babel-plugin-inline-import": "^3.0.0", "babel-preset-expo": "^10.0.0", "better-sqlite3": "~9.4.3", diff --git a/apps/tlon-mobile/src/App.main.tsx b/apps/tlon-mobile/src/App.main.tsx index 7719595235..25cca6511c 100644 --- a/apps/tlon-mobile/src/App.main.tsx +++ b/apps/tlon-mobile/src/App.main.tsx @@ -34,6 +34,7 @@ import AuthenticatedApp from './components/AuthenticatedApp'; import { CheckVerifyScreen } from './screens/Onboarding/CheckVerifyScreen'; import { EULAScreen } from './screens/Onboarding/EULAScreen'; import { InventoryCheckScreen } from './screens/Onboarding/InventoryCheckScreen'; +import { InviteLinkScreen } from './screens/Onboarding/InviteLinkScreen'; import { JoinWaitListScreen } from './screens/Onboarding/JoinWaitListScreen'; import { RequestPhoneVerifyScreen } from './screens/Onboarding/RequestPhoneVerifyScreen'; import { ReserveShipScreen } from './screens/Onboarding/ReserveShipScreen'; @@ -110,6 +111,10 @@ const App = ({ component={SignUpEmailScreen} /> + {}} - onSelectSort={() => {}} - /> -); diff --git a/apps/tlon-mobile/src/fixtures/AddGroupSheet.fixture.tsx b/apps/tlon-mobile/src/fixtures/AddGroupSheet.fixture.tsx index 3c2d649e4f..acc727ee65 100644 --- a/apps/tlon-mobile/src/fixtures/AddGroupSheet.fixture.tsx +++ b/apps/tlon-mobile/src/fixtures/AddGroupSheet.fixture.tsx @@ -6,7 +6,7 @@ import { initialContacts } from './fakeData'; export default { basic: ( - + {}} diff --git a/apps/tlon-mobile/src/fixtures/Channel.fixture.tsx b/apps/tlon-mobile/src/fixtures/Channel.fixture.tsx index 300a596862..9e3dae72a4 100644 --- a/apps/tlon-mobile/src/fixtures/Channel.fixture.tsx +++ b/apps/tlon-mobile/src/fixtures/Channel.fixture.tsx @@ -22,6 +22,7 @@ import { createFakePosts, group, initialContacts, + tlonLocalBulletinBoard, tlonLocalGettingStarted, tlonLocalIntros, } from './fakeData'; @@ -142,6 +143,24 @@ export const ChannelFixture = (props: { ); }; +export const GalleryChannelFixture = (props: { theme?: 'light' | 'dark' }) => { + const switcher = useChannelSwitcher(tlonLocalBulletinBoard); + + const [posts] = useState(() => createFakePosts(10, 'block')); + + return ( + + switcher.open()} + /> + + + ); +}; + export const NotebookChannelFixture = (props: { theme?: 'light' | 'dark' }) => { const switcher = useChannelSwitcher(tlonLocalGettingStarted); @@ -157,7 +176,6 @@ export const NotebookChannelFixture = (props: { theme?: 'light' | 'dark' }) => { ); }; - const ChannelFixtureWithImage = () => { const switcher = useChannelSwitcher(tlonLocalIntros); const [imageAttachment, setImageAttachment] = useState(null); @@ -493,6 +511,7 @@ export default { })} /> ), + gallery: , notebook: , chatWithImage: , negotiationMismatch: , diff --git a/apps/tlon-mobile/src/fixtures/DetailView/detailViewFixtureBase.tsx b/apps/tlon-mobile/src/fixtures/DetailView/detailViewFixtureBase.tsx index 4e038c33a9..408a7a4bc1 100644 --- a/apps/tlon-mobile/src/fixtures/DetailView/detailViewFixtureBase.tsx +++ b/apps/tlon-mobile/src/fixtures/DetailView/detailViewFixtureBase.tsx @@ -54,6 +54,7 @@ export const DetailViewFixture = ({ markRead={() => {}} canUpload={true} handleGoToUserProfile={() => {}} + headerMode="default" /> diff --git a/apps/tlon-mobile/src/fixtures/FindGroups.fixture.tsx b/apps/tlon-mobile/src/fixtures/FindGroups.fixture.tsx index d7fc516998..e6ff61f75c 100644 --- a/apps/tlon-mobile/src/fixtures/FindGroups.fixture.tsx +++ b/apps/tlon-mobile/src/fixtures/FindGroups.fixture.tsx @@ -7,7 +7,7 @@ export default { basic: ( - {}} onGroupAction={() => {}} /> + {}} goToContactHostedGroups={() => {}} /> ), diff --git a/apps/tlon-mobile/src/fixtures/Form.fixture.tsx b/apps/tlon-mobile/src/fixtures/Form.fixture.tsx index 4187ed7aff..75bb6d554a 100644 --- a/apps/tlon-mobile/src/fixtures/Form.fixture.tsx +++ b/apps/tlon-mobile/src/fixtures/Form.fixture.tsx @@ -87,6 +87,13 @@ const FormFixture = () => { > Reseet + + {}} + /> + ); diff --git a/apps/tlon-mobile/src/fixtures/GroupList.fixture.tsx b/apps/tlon-mobile/src/fixtures/GroupList.fixture.tsx index 7235088bb6..c19c1f192a 100644 --- a/apps/tlon-mobile/src/fixtures/GroupList.fixture.tsx +++ b/apps/tlon-mobile/src/fixtures/GroupList.fixture.tsx @@ -102,7 +102,9 @@ export default { {}} - showFilters={false} + searchQuery="" + onSearchQueryChange={() => {}} + showSearchInput={false} pinned={[groupWithLongTitle, groupWithImage].map((g) => makeChannelSummary({ group: g }) )} @@ -113,6 +115,7 @@ export default { groupWithNoColorOrImage, ].map((g) => makeChannelSummary({ group: g }))} pendingChats={[]} + onSearchToggle={() => {}} /> ), @@ -121,7 +124,7 @@ export default { {}} - showFilters={false} + showSearchInput={false} pinned={[dmSummary, groupDmSummary]} unpinned={[ groupWithColorAndNoImage, @@ -130,6 +133,9 @@ export default { groupWithNoColorOrImage, ].map((g) => makeChannelSummary({ group: g }))} pendingChats={[]} + searchQuery="" + onSearchQueryChange={() => {}} + onSearchToggle={() => {}} /> ), @@ -138,10 +144,13 @@ export default { {}} - showFilters={false} + showSearchInput={false} pinned={[]} unpinned={[]} pendingChats={[]} + searchQuery="" + onSearchQueryChange={() => {}} + onSearchToggle={() => {}} /> ), diff --git a/apps/tlon-mobile/src/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx b/apps/tlon-mobile/src/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx new file mode 100644 index 0000000000..0e1d4fdbdc --- /dev/null +++ b/apps/tlon-mobile/src/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx @@ -0,0 +1,85 @@ +import { ParentAgnosticKeyboardAvoidingView } from '@tloncorp/ui'; +import { useFixtureSelect } from 'react-cosmos/client'; +import { + Button, + Keyboard, + KeyboardAvoidingView, + TextInput, +} from 'react-native'; +import { ScrollView, View as TamaguiView, Text, YStack } from 'tamagui'; + +import { FixtureWrapper } from './FixtureWrapper'; + +export default function ParentAgnosticKeyboardAvoidingViewDemo() { + const [componentType, setComponentType] = useFixtureSelect( + 'KAV implementation', + { + defaultValue: 'ParentAgnosticKeyboardAvoidingView', + options: ['ParentAgnosticKeyboardAvoidingView', 'KeyboardAvoidingView'], + } + ); + + const KAVComponent = + componentType === 'ParentAgnosticKeyboardAvoidingView' + ? ParentAgnosticKeyboardAvoidingView + : KeyboardAvoidingView; + + return ( + + 0` would break layout. + paddingTop={100} + backgroundColor="$background" + flex={1} + > + + + + + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ + + Next + } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/ResetPasswordScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/ResetPasswordScreen.tsx index d8e06b5cc1..6257fb164f 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/ResetPasswordScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/ResetPasswordScreen.tsx @@ -3,12 +3,10 @@ import { EMAIL_REGEX } from '@tloncorp/app/constants'; import { requestPasswordReset } from '@tloncorp/app/lib/hostingApi'; import { trackError } from '@tloncorp/app/utils/posthog'; import { - Button, Field, - GenericHeader, KeyboardAvoidingView, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, @@ -66,16 +64,16 @@ export const ResetPasswordScreen = ({ return ( - navigation.goBack()} - showSpinner={isSubmitting} - rightContent={ + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ isValid && ( - + + Submit + ) } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/SetNicknameScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/SetNicknameScreen.tsx index 61d2109d97..bc35e9952a 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/SetNicknameScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/SetNicknameScreen.tsx @@ -3,11 +3,9 @@ import { useSignupContext } from '@tloncorp/app/contexts/signup'; import { requestNotificationToken } from '@tloncorp/app/lib/notifications'; import { trackError } from '@tloncorp/app/utils/posthog'; import { - Button, Field, - GenericHeader, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, @@ -85,13 +83,13 @@ export const SetNicknameScreen = ({ return ( - - Next - + rightControls={ + + Next + } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/SetTelemetryScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/SetTelemetryScreen.tsx index 2761bc9096..61298bef38 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/SetTelemetryScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/SetTelemetryScreen.tsx @@ -1,10 +1,9 @@ import type { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useSignupContext } from '@tloncorp/app/contexts/signup'; import { - Button, - GenericHeader, + PrimaryButton, + ScreenHeader, SizableText, - Text, View, XStack, YStack, @@ -43,15 +42,7 @@ export const SetTelemetryScreen = ({ return ( - - Next - - } - /> + We’re trying to make the app better and knowing how people use @@ -72,6 +63,7 @@ export const SetTelemetryScreen = ({ + Next ); diff --git a/apps/tlon-mobile/src/screens/Onboarding/ShipLoginScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/ShipLoginScreen.tsx index 3514f3059f..84d6f2093f 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/ShipLoginScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/ShipLoginScreen.tsx @@ -10,15 +10,13 @@ import { getShipFromCookie } from '@tloncorp/app/utils/ship'; import { transformShipURL } from '@tloncorp/app/utils/string'; import { getLandscapeAuthCookie } from '@tloncorp/shared/dist/api'; import { - Button, CheckboxInput, Field, - GenericHeader, Icon, KeyboardAvoidingView, ListItem, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, @@ -125,17 +123,17 @@ export const ShipLoginScreen = ({ navigation }: Props) => { return ( - navigation.goBack()} - showSpinner={isSubmitting} - rightContent={ + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ isValid && watch('eulaAgreed') && ( - + + Connect + ) } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/SignUpEmailScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/SignUpEmailScreen.tsx index 8b68985687..7a45acf8bd 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/SignUpEmailScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/SignUpEmailScreen.tsx @@ -8,19 +8,16 @@ import { getHostingAvailability } from '@tloncorp/app/lib/hostingApi'; import { trackError, trackOnboardingAction } from '@tloncorp/app/utils/posthog'; import { AppInviteDisplay, - Button, - GenericHeader, + Field, KeyboardAvoidingView, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, } from '@tloncorp/ui'; -import { Field } from '@tloncorp/ui'; import { useState } from 'react'; -import { useForm } from 'react-hook-form'; -import { Controller } from 'react-hook-form'; +import { Controller, useForm } from 'react-hook-form'; import type { OnboardingStackParamList } from '../../types'; @@ -89,16 +86,16 @@ export const SignUpEmailScreen = ({ navigation, route: { params } }: Props) => { return ( - navigation.goBack()} - showSpinner={isSubmitting} - rightContent={ + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ isValid && ( - + + Next + ) } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/SignUpPasswordScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/SignUpPasswordScreen.tsx index 25fc4d6558..81514a199c 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/SignUpPasswordScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/SignUpPasswordScreen.tsx @@ -4,9 +4,8 @@ import { initClient, } from '@google-cloud/recaptcha-enterprise-react-native'; import type { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { DEFAULT_LURE, RECAPTCHA_SITE_KEY } from '@tloncorp/app/constants'; +import { RECAPTCHA_SITE_KEY } from '@tloncorp/app/constants'; import { - useBranch, useLureMetadata, useSignupParams, } from '@tloncorp/app/contexts/branch'; @@ -19,15 +18,13 @@ import { isEulaAgreed, setEulaAgreed } from '@tloncorp/app/utils/eula'; import { trackError, trackOnboardingAction } from '@tloncorp/app/utils/posthog'; import { AppInviteDisplay, - Button, CheckboxInput, Field, - GenericHeader, Icon, KeyboardAvoidingView, ListItem, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, @@ -182,17 +179,17 @@ export const SignUpPasswordScreen = ({ return ( - navigation.goBack()} - showSpinner={isSubmitting} - rightContent={ + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ isValid && watch('eulaAgreed') && ( - + + Next + ) } /> diff --git a/apps/tlon-mobile/src/screens/Onboarding/TlonLoginScreen.tsx b/apps/tlon-mobile/src/screens/Onboarding/TlonLoginScreen.tsx index 1ebcc91ee9..56aa9e3b3e 100644 --- a/apps/tlon-mobile/src/screens/Onboarding/TlonLoginScreen.tsx +++ b/apps/tlon-mobile/src/screens/Onboarding/TlonLoginScreen.tsx @@ -15,15 +15,13 @@ import { isEulaAgreed, setEulaAgreed } from '@tloncorp/app/utils/eula'; import { getShipUrl } from '@tloncorp/app/utils/ship'; import { getLandscapeAuthCookie } from '@tloncorp/shared/dist/api'; import { - Button, CheckboxInput, Field, - GenericHeader, Icon, KeyboardAvoidingView, ListItem, + ScreenHeader, SizableText, - Text, TextInput, View, YStack, @@ -149,17 +147,17 @@ export const TlonLoginScreen = ({ navigation }: Props) => { return ( - navigation.goBack()} - showSpinner={isSubmitting} - rightContent={ + backAction={() => navigation.goBack()} + isLoading={isSubmitting} + rightControls={ isValid && watch('eulaAgreed') && ( - + + Connect + ) } /> diff --git a/apps/tlon-mobile/src/types.ts b/apps/tlon-mobile/src/types.ts index c5e32bce9f..b339b177ce 100644 --- a/apps/tlon-mobile/src/types.ts +++ b/apps/tlon-mobile/src/types.ts @@ -27,6 +27,9 @@ export type RootStackParamList = { selectedPostId?: string | null; }; FindGroups: undefined; + ContactHostedGroups: { + contactId: string; + }; CreateGroup: undefined; GroupChannels: { group: db.Group; @@ -98,6 +101,7 @@ export type OnboardingStackParamList = { SignUpEmail: undefined; EULA: undefined; SignUpPassword: { email: string }; + InviteLink: undefined; JoinWaitList: { email?: string }; RequestPhoneVerify: { user: User }; CheckVerify: { user: User }; diff --git a/apps/tlon-web-new/package.json b/apps/tlon-web-new/package.json index 39d7c65402..72e166d653 100644 --- a/apps/tlon-web-new/package.json +++ b/apps/tlon-web-new/package.json @@ -48,7 +48,7 @@ "@radix-ui/react-toggle-group": "^1.0.4", "@radix-ui/react-tooltip": "^1.0.0", "@react-navigation/native": "^6.1.7", - "@tamagui/vite-plugin": "1.101.3", + "@tamagui/vite-plugin": "~1.112.12", "@tanstack/react-query": "^4.28.0", "@tanstack/react-query-devtools": "^4.28.0", "@tanstack/react-query-persist-client": "^4.28.0", diff --git a/apps/tlon-web/package.json b/apps/tlon-web/package.json index 8ddd7ce2b5..f0417db966 100644 --- a/apps/tlon-web/package.json +++ b/apps/tlon-web/package.json @@ -53,7 +53,7 @@ "@radix-ui/react-toggle": "^1.0.2", "@radix-ui/react-toggle-group": "^1.0.4", "@radix-ui/react-tooltip": "^1.0.0", - "@tamagui/vite-plugin": "1.101.3", + "@tamagui/vite-plugin": "~1.112.12", "@tanstack/react-query": "^4.28.0", "@tanstack/react-query-devtools": "^4.28.0", "@tanstack/react-query-persist-client": "^4.28.0", diff --git a/desk/app/activity.hoon b/desk/app/activity.hoon index 5ea131a496..e4c2b18c17 100644 --- a/desk/app/activity.hoon +++ b/desk/app/activity.hoon @@ -49,7 +49,7 @@ +$ card card:agent:gall :: +$ current-state - $: %6 + $: %7 allowed=notifications-allowed:a =indices:a =activity:a @@ -137,20 +137,25 @@ =? old ?=(%3 -.old) (state-3-to-4 old) =? old ?=(%4 -.old) (state-4-to-5 old) =? old ?=(%5 -.old) (state-5-to-6 old) - ?> ?=(%6 -.old) + =? cor ?=(%6 -.old) + (emit %pass /adjust-old-default %agent [our.bowl dap.bowl] %poke noun+!>(%adjust-old-default)) + =? old ?=(%6 -.old) [%7 +.old] + ?> ?=(%7 -.old) =. state old =. allowed %all (emit %pass /fix-init-unreads %agent [our.bowl dap.bowl] %poke noun+!>(%fix-init-unreads)) +$ versioned-state - $% state-6 + $% state-7 + state-6 state-5 state-4 state-3 state-2 state-1 == - +$ state-6 current-state - +$ state-5 _%*(. *state-6 - %5) + +$ state-7 current-state + +$ state-6 _%*(. *state-7 - %6) + +$ state-5 _%*(. *state-7 - %5) ++ state-5-to-6 |= old=state-5 ^- state-6 @@ -258,6 +263,7 @@ %fix-init-unreads fix-init-unreads %show-orphans (drop-orphans &) %drop-orphans (drop-orphans |) + %adjust-old-default adjust-old-default :: %sync-reads =^ indices activity @@ -1144,6 +1150,30 @@ +$ indexes (list [=source:a =index:a]) -- :: +:: when we migrated from chat and channels, originally we didn't set the +:: correct new default. if someone is still on the old default, we need +:: to set the new default for them. +:: +++ adjust-old-default + =/ base-volume (~(gut by volume-settings) [%base ~] *volume-map:a) + =/ soft (~(got by old-volumes:a) %soft) + :: bail early if we've set something other than the old default + ?. =(soft base-volume) cor + =+ .^(=groups-ui:g %gx (scry-path %groups /groups/light/v1/noun)) + =/ groups ~(tap by groups-ui) + :: iterate through all groups and set volume to old default + |- + ?~ groups + :: finally set the new default + =. volume-settings + (~(put by volume-settings) [%base ~] default-volumes:a) + cor + =* next $(groups t.groups) + =/ [=flag:g group=group-ui:g] i.groups + ?: (~(has by volume-settings) [%group flag]) next + =. volume-settings (~(put by volume-settings) [%group flag] soft) + next +:: :: the original migration from old unreads and volume mgmt to %activity :: ++ migrate @@ -1304,7 +1334,11 @@ `mute:a $(entries t.entries) :: set any overrides from previous volume settings - =. cor (adjust [%base ~] `(~(got by old-volumes:a) base.volume)) + =. cor + %+ adjust [%base ~] + :: use new default since we set all channels to old default + ?: =(%soft base.volume) `default-volumes:a + `(~(got by old-volumes:a) base.volume) =. cor =/ entries ~(tap by chan.volume) |- diff --git a/desk/app/channels.hoon b/desk/app/channels.hoon index 9ac89c740c..364f628953 100644 --- a/desk/app/channels.hoon +++ b/desk/app/channels.hoon @@ -727,7 +727,7 @@ |= =(pole knot) ^- (unit (unit cage)) ?> ?=(^ pole) - =? +.pole !?=([?(%v0 %v1 %v2 %v3) *] +.pole) + =? +.pole !?=([?(%v0 %v1 %v2 %v3 %v4) *] +.pole) [%v0 +.pole] ?+ pole [~ ~] [%x ?(%v0 %v1) %channels ~] ``channels+!>((uv-channels-1:utils v-channels)) diff --git a/desk/app/chat.hoon b/desk/app/chat.hoon index 8311a8bed3..ad52669097 100644 --- a/desk/app/chat.hoon +++ b/desk/app/chat.hoon @@ -680,12 +680,6 @@ [%club id=@ rest=*] =/ =id:club:c (slav %uv id.pole) cu-abet:(cu-agent:(cu-abed id) rest.pole sign) - :: - [%hark ~] - ?> ?=(%poke-ack -.sign) - ?~ p.sign cor - %- (slog leaf/"Failed to hark" u.p.sign) - cor == ++ give-kick |= [pas=(list path) =cage] @@ -823,24 +817,12 @@ |= [=whom:c =unread:unreads:c] (give %fact ~[/unreads] chat-unread-update+!>([whom unread])) :: -++ want-hark - |= kind=?(%msg %to-us) - %+ (fit-level:volume [our now]:bowl) ~ - ?- kind - %to-us %soft - %msg %loud - == -:: ++ pass-hark |= =cage ^- card =/ =wire /hark =/ =dock [our.bowl %hark] [%pass wire %agent dock %poke cage] -++ pass-yarn - |= =new-yarn:ha - =/ =cage hark-action-1+!>([%new-yarn new-yarn]) - (pass-hark cage) :: ++ pass-activity =, activity @@ -1261,16 +1243,23 @@ =/ uid `@uv`(shax (jam ['clubs' (add counter eny.bowl)])) [uid cu-core(counter +(counter))] :: - ++ cu-spin - |= [rest=path con=(list content:ha) but=(unit button:ha)] - ^- new-yarn:ha - =/ rope [~ ~ %groups /club/(scot %uv id)] - =/ link (welp /dm/(scot %uv id) rest) - [& & rope con link but] - :: - ++ cu-activity !. - |* a=* - =. cor (pass-activity [%club id] a) + ++ cu-activity + =, activity + |= $: $= concern + $% [%invite ~] + [%post key=message-key] + [%delete-post key=message-key] + [%reply key=message-key top=message-key] + [%delete-reply key=message-key top=message-key] + == + content=story:d + mention=? + == + ?. ?| =(net.crew.club %done) + &(=(net.crew.club %invited) =(%invite -.concern)) + == + cu-core + =. cor (pass-activity [%club id] concern content mention) cu-core :: ++ cu-pass @@ -1408,18 +1397,6 @@ =/ concern [%post p.diff.delta now.bowl] =/ mention (was-mentioned:utils content.memo our.bowl) =. cu-core (cu-activity concern content.memo mention) - ?: =(our.bowl author.memo) (cu-give-writs-diff diff.delta) - ?^ kind.q.diff.delta (cu-give-writs-diff diff.delta) - =/ new-yarn - %^ cu-spin - ~ - :~ [%ship author.memo] - ': ' - (flatten:utils content.memo) - == - ~ - =? cor (want-hark %to-us) - (emit (pass-yarn new-yarn)) (cu-give-writs-diff diff.delta) :: %del @@ -1460,18 +1437,6 @@ =/ concern [%reply [id.q.diff.delta now.bowl] top-con] =/ mention (was-mentioned:utils content.memo our.bowl) =. cu-core (cu-activity concern content.memo mention) - ?: =(our.bowl author.memo) (cu-give-writs-diff diff.delta) - =/ new-yarn - %^ cu-spin - /message/(scot %p p.id.op)/(scot %ud q.id.op) - :~ [%ship author.memo] ' replied to ' - [%emph (flatten:utils content.op)] ': ' - [%ship author.memo] ': ' - (flatten:utils content.memo) - == - ~ - =? cor (want-hark %to-us) - (emit (pass-yarn new-yarn)) (cu-give-writs-diff diff.delta) == == @@ -1719,23 +1684,30 @@ | == =. di-core di-core(ship s, dm new) + ?: =(src our):bowl di-core (di-activity [%invite ~] *story:d &) :: ++ di-area `path`/dm/(scot %p ship) ++ di-area-writs `path`/dm/(scot %p ship)/writs :: - ++ di-activity !. - |* a=* - =. cor (pass-activity [%ship ship] a) + ++ di-activity + |= $: $= concern + $% [%invite ~] + [%post key=message-key:activity] + [%delete-post key=message-key:activity] + [%reply key=message-key:activity top=message-key:activity] + [%delete-reply key=message-key:activity top=message-key:activity] + == + content=story:d + mention=? + == + ?. ?| =(net.dm %done) + &(=(net.dm %invited) =(%invite -.concern)) + == + di-core + =. cor (pass-activity [%ship ship] concern content mention) di-core :: - ++ di-spin - |= [rest=path con=(list content:ha) but=(unit button:ha)] - ^- new-yarn:ha - =/ rope [~ ~ %groups /dm/(scot %p ship)] - =/ link (welp /dm/(scot %p ship) rest) - [& & rope con link but] - :: ++ di-proxy |= =diff:dm:c =. di-core (di-ingest-diff diff) @@ -1800,23 +1772,9 @@ =. recency.remark.dm now.bowl =? cor &(!=(old-unread di-unread) !=(net.dm %invited)) (give-unread ship/ship di-unread) - =/ concern - ?: =(net.dm %invited) [%invite ~] - [%post p.diff now.bowl] + =/ concern [%post p.diff now.bowl] =/ mention (was-mentioned:utils content.memo our.bowl) =. di-core (di-activity concern content.memo mention) - ?: from-self (di-give-writs-diff diff) - ?^ kind.q.diff (di-give-writs-diff diff) - =/ new-yarn - %^ di-spin ~ - :~ [%ship author.memo] - ?: =(net.dm %invited) ' has invited you to a direct message' - ': ' - ?:(=(net.dm %invited) '' (flatten:utils content.memo)) - == - ~ - =? cor (want-hark %to-us) - (emit (pass-yarn new-yarn)) (di-give-writs-diff diff) :: %del @@ -1856,18 +1814,6 @@ =/ concern [%reply [id.q.diff now.bowl] top-con] =/ mention (was-mentioned:utils content.memo our.bowl) =. di-core (di-activity concern content.memo mention) - ?: =(our.bowl author.memo) (di-give-writs-diff diff) - =* op writ.u.entry - =/ new-yarn - %^ di-spin /message/(scot %p p.id.op)/(scot %ud q.id.op) - :~ [%ship author.memo] ' replied to ' - [%emph (flatten:utils content.op)] ': ' - [%ship author.memo] ': ' - (flatten:utils content.memo) - == - ~ - =? cor (want-hark %to-us) - (emit (pass-yarn new-yarn)) (di-give-writs-diff diff) == == @@ -1917,13 +1863,6 @@ :: TODO: handle? %- (slog leaf/"Failed to add contact" u.p.sign) di-core - :: - [%hark ~] - ?> ?=(%poke-ack -.sign) - ?~ p.sign di-core - :: TODO: handle? - %- (slog leaf/"Failed to notify about dm {}" u.p.sign) - di-core :: [%proxy *] ?> ?=(%poke-ack -.sign) diff --git a/desk/app/expose.hoon b/desk/app/expose.hoon index 54989d4674..9b9f1ad7d7 100644 --- a/desk/app/expose.hoon +++ b/desk/app/expose.hoon @@ -11,7 +11,6 @@ :: /= page /app/expose/page /= widget /app/expose/widget -/* style-shared %css /app/expose/style/shared/css :: |% +$ state-0 @@ -157,10 +156,7 @@ :_ (spout:hutils rid payload) :: if we handled a request here, make sure it's cached for next time :: - [%pass /eyre/cache %arvo %e %set-response url.request `[| %payload payload]] - ?: =('/expose/style/shared.css' url.request) - :- [200 ['content-type' 'text/css']~] - `(as-octs:mimes:html style-shared) + (store:hutils url.request `[| %payload payload]) =/ ref=(unit cite:c) (rush url.request (sear purse:c ;~(pfix (jest '/expose') stap))) ?~ ref @@ -194,10 +190,6 @@ :: [%refresh ~] :_ this - :- %+ store:hutils '/expose/style/shared.css' - =/ bod=(unit octs) - `(as-octs:mimes:html style-shared) - `[| %payload [200 ['content-type' 'text/css'] ~] bod] %+ weld (refresh-widget:e bowl open) (refresh-pages:e bowl ~(tap in open)) diff --git a/desk/app/expose/page.hoon b/desk/app/expose/page.hoon index f7f66e612e..f1d8d9e574 100644 --- a/desk/app/expose/page.hoon +++ b/desk/app/expose/page.hoon @@ -75,7 +75,7 @@ |= [title=tape img=(unit @t)] ;head ;title:"{title}" - ;link(rel "stylesheet", href "/expose/style/shared.css"); + ;link(rel "stylesheet", href "/profile/style/shared.css"); ;style:"{(trip style-page)}" :: ;meta(charset "utf-8"); diff --git a/desk/app/profile.hoon b/desk/app/profile.hoon index abf2c6e084..b555c9b039 100644 --- a/desk/app/profile.hoon +++ b/desk/app/profile.hoon @@ -9,7 +9,7 @@ /+ dbug, verb, sigil, hutils=http-utils /= stock-widgets /app/profile/widgets :: -/* style-shared %css /app/expose/style/shared/css +/* style-shared %css /app/profile/style/shared/css /* style-page %css /app/profile/style/page/css :: |% @@ -130,30 +130,41 @@ ++ serve |= order:hutils ^- (list card) - =; payload=simple-payload:http - ?. =('/profile' url.request) (spout:hutils id payload) - :: if we got requested the profile page, that means it's not in cache. - :: serve the response, but also add it into cache. - :: - :- (store:hutils '/profile' `[| %payload payload]) + =; [cache=? payload=simple-payload:http] + ?. cache (spout:hutils id payload) + :- (store:hutils url.request `[| %payload payload]) (spout:hutils id payload) + ?: =('/profile/style/shared.css' url.request) + :- & + :- [200 ['content-type' 'text/css']~] + `(as-octs:mimes:html style-shared) ?: =('/profile/style/page.css' url.request) - :- [200 ['content-type' 'text/css']~] - `(as-octs:mimes:html style-page) - %- paint:hutils - =/ =query:hutils (purse:hutils url.request) + :- & + :- [200 ['content-type' 'text/css']~] + `(as-octs:mimes:html style-page) :: if the request is not for /profile, we redirect to landscape :: + =/ =query:hutils (purse:hutils url.request) ?. ?=([%profile ~] site.query) - [%move '/apps/landscape/'] - [%page render-page] + [| (paint:hutils %move '/apps/landscape/')] + [& (paint:hutils %page render-page)] :: ++ update-cache ^- (list card) - ?. bound ~ - =/ payload=simple-payload:http - (paint:hutils %page render-page) - [%pass /eyre/cache %arvo %e %set-response '/profile' `[| %payload payload]]~ + :~ %+ store:hutils '/profile' + ?. bound ~ + `[| %payload (paint:hutils %page render-page)] + :: + %+ store:hutils '/profile/style/shared.css' + :^ ~ | %payload + :- [200 ['content-type' 'text/css']~] + `(as-octs:mimes:html style-shared) + :: + %+ store:hutils '/profile/style/page.css' + :^ ~ | %payload + :- [200 ['content-type' 'text/css']~] + `(as-octs:mimes:html style-page) + == :: ++ update-group-widgets ^- (quip card _state) @@ -179,7 +190,7 @@ "{(trip nickname.u.ours)} ({ship})" ;head ;title:"{name}" - ;link(rel "stylesheet", href "/expose/style/shared.css"); + ;link(rel "stylesheet", href "/profile/style/shared.css"); ;link(rel "stylesheet", href "/profile/style/page.css"); ;meta(charset "utf-8"); ;meta(name "viewport", content "width=device-width, initial-scale=1"); diff --git a/desk/app/expose/style/shared.css b/desk/app/profile/style/shared.css similarity index 100% rename from desk/app/expose/style/shared.css rename to desk/app/profile/style/shared.css diff --git a/desk/desk.docket-0 b/desk/desk.docket-0 index ccc05cbbc1..d4843cc0f0 100644 --- a/desk/desk.docket-0 +++ b/desk/desk.docket-0 @@ -2,7 +2,7 @@ info+'Start, host, and cultivate communities. Own your communications, organize your resources, and share documents. Tlon is a decentralized platform that offers a full, communal suite of tools for messaging, writing and sharing media with others.' color+0xde.dede image+'https://bootstrap.urbit.org/tlon.svg?v=1' - glob-http+['https://bootstrap.urbit.org/glob-0vgsiup.8b5ag.nf309.99824.uuril.glob' 0vgsiup.8b5ag.nf309.99824.uuril] + glob-http+['https://bootstrap.urbit.org/glob-0v6.slci9.jv3n5.rrkgt.a6plj.jnc26.glob' 0v6.slci9.jv3n5.rrkgt.a6plj.jnc26] base+'groups' version+[6 4 1] website+'https://tlon.io' diff --git a/package.json b/package.json index 6566d07a81..4845f6f64d 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "drizzle-orm@0.30.9": "patches/drizzle-orm@0.30.9.patch", "@10play/tentap-editor@0.4.55": "patches/@10play__tentap-editor@0.4.55.patch", "any-ascii@0.3.2": "patches/any-ascii@0.3.2.patch", - "react-native-gesture-handler@2.18.1": "patches/react-native-gesture-handler@2.18.1.patch", "@likashefqet/react-native-image-zoom@3.0.0": "patches/@likashefqet__react-native-image-zoom@3.0.0.patch", "react-native@0.73.4": "patches/react-native@0.73.4.patch" }, diff --git a/packages/app/contexts/branch.tsx b/packages/app/contexts/branch.tsx index 05ac82ade5..9b49c63680 100644 --- a/packages/app/contexts/branch.tsx +++ b/packages/app/contexts/branch.tsx @@ -1,5 +1,5 @@ import { DeepLinkMetadata, createDevLogger } from '@tloncorp/shared/dist'; -import { extractLureMetadata } from '@tloncorp/shared/src/logic'; +import { DeepLinkData, extractLureMetadata } from '@tloncorp/shared/src/logic'; import { type ReactNode, createContext, @@ -30,6 +30,7 @@ type State = Lure & { }; type ContextValue = State & { + setLure: (metadata: DeepLinkData) => void; clearLure: () => void; clearDeepLink: () => void; }; @@ -165,6 +166,26 @@ export const BranchProvider = ({ children }: { children: ReactNode }) => { }; }, [isAuthenticated]); + const setLure = useCallback( + (metadata: DeepLinkData) => { + const nextLure: Lure = { + lure: { + ...metadata, + id: metadata.lure as string, + // if not already authenticated, we should run Lure's invite auto-join capability after signing in + shouldAutoJoin: !isAuthenticated, + }, + priorityToken: undefined, + }; + setState({ + ...nextLure, + deepLinkPath: undefined, + }); + saveLure(nextLure); + }, + [isAuthenticated] + ); + const clearLure = useCallback(() => { console.debug('[branch] Clearing lure state'); setState((curr) => ({ @@ -189,6 +210,7 @@ export const BranchProvider = ({ children }: { children: ReactNode }) => { deepLinkPath, lure, priorityToken, + setLure, clearLure, clearDeepLink, }} diff --git a/packages/app/features/groups/GroupPrivacyScreen.tsx b/packages/app/features/groups/GroupPrivacyScreen.tsx index 9aee055e30..29f4886ffe 100644 --- a/packages/app/features/groups/GroupPrivacyScreen.tsx +++ b/packages/app/features/groups/GroupPrivacyScreen.tsx @@ -1,23 +1,18 @@ -import { GroupPrivacy } from '@tloncorp/shared/dist/db/schema'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { GroupPrivacy } from '@tloncorp/shared/dist/db/schema'; import * as store from '@tloncorp/shared/dist/store'; import { - GenericHeader, GroupPrivacySelector, + ScreenHeader, View, triggerHaptic, } from '@tloncorp/ui'; import { useCallback } from 'react'; -import { GroupSettingsStackParamList } from '../../navigation/types'; import { useGroupContext } from '../../hooks/useGroupContext'; +import { GroupSettingsStackParamList } from '../../navigation/types'; - -type Props = NativeStackScreenProps< - GroupSettingsStackParamList, - 'Privacy' ->; - +type Props = NativeStackScreenProps; export function GroupPrivacyScreen(props: Props) { const { groupId } = props.route.params; @@ -35,7 +30,7 @@ export function GroupPrivacyScreen(props: Props) { return ( - + {group ? ( - props.navigation.goBack()} + props.navigation.goBack()} /> diff --git a/packages/app/features/settings/BlockedUsersScreen.tsx b/packages/app/features/settings/BlockedUsersScreen.tsx index 7ec5eeef40..a49cdedf87 100644 --- a/packages/app/features/settings/BlockedUsersScreen.tsx +++ b/packages/app/features/settings/BlockedUsersScreen.tsx @@ -8,7 +8,6 @@ import { Alert } from 'react-native'; import { useCurrentUserId } from '../../hooks/useCurrentUser'; import { RootStackParamList } from '../../navigation/types'; - type Props = NativeStackScreenProps; export function BlockedUsersScreen(props: Props) { @@ -38,10 +37,10 @@ export function BlockedUsersScreen(props: Props) { return ( - - props.navigation.goBack()} /> - Blocked Users - + props.navigation.goBack()} + title="Blocked users" + /> - - - {goingBack ? ( + ) : ( - )} - - Manage Account - + ) + } + title="Manage account" + /> {isWeb && (