diff --git a/app/soapbox/__fixtures__/intlMessages.json b/app/soapbox/__fixtures__/intlMessages.json index 82a489909..361eeffd9 100644 --- a/app/soapbox/__fixtures__/intlMessages.json +++ b/app/soapbox/__fixtures__/intlMessages.json @@ -159,7 +159,7 @@ "empty_column.follow_requests": "You don\"t have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don\"t have any lists yet. When you create one, it will show up here.", @@ -637,7 +637,7 @@ "empty_column.follow_requests": "You don\"t have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don\"t have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/components/scrollable_list.tsx b/app/soapbox/components/scrollable_list.tsx index 31b892e6d..92cf79348 100644 --- a/app/soapbox/components/scrollable_list.tsx +++ b/app/soapbox/components/scrollable_list.tsx @@ -7,7 +7,7 @@ import PullToRefresh from 'soapbox/components/pull-to-refresh'; import { useSettings } from 'soapbox/hooks'; import LoadMore from './load_more'; -import { Spinner, Text } from './ui'; +import { Card, Spinner, Text } from './ui'; /** Custom Viruoso component context. */ type Context = { @@ -157,13 +157,13 @@ const ScrollableList = React.forwardRef(({
{alwaysPrepend && prepend} -
+ {isLoading ? ( ) : ( {emptyMessage} )} -
+
); }; diff --git a/app/soapbox/features/home_timeline/index.tsx b/app/soapbox/features/home_timeline/index.tsx index 6f19239ac..f1494198a 100644 --- a/app/soapbox/features/home_timeline/index.tsx +++ b/app/soapbox/features/home_timeline/index.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'; import { expandHomeTimeline } from 'soapbox/actions/timelines'; import { Column, Stack, Text } from 'soapbox/components/ui'; import Timeline from 'soapbox/features/ui/components/timeline'; -import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; +import { useAppSelector, useAppDispatch, useFeatures } from 'soapbox/hooks'; const messages = defineMessages({ title: { id: 'column.home', defaultMessage: 'Home' }, @@ -14,6 +14,8 @@ const messages = defineMessages({ const HomeTimeline: React.FC = () => { const intl = useIntl(); const dispatch = useAppDispatch(); + const features = useFeatures(); + const polling = useRef(null); const isPartial = useAppSelector(state => state.timelines.get('home')?.isPartial === true); @@ -66,12 +68,35 @@ const HomeTimeline: React.FC = () => { emptyMessage={ - You’re not following anyone yet + - {siteTitle} gets more interesting once you follow other users. + + + {features.federating && ( + + + + + ), + }} + /> + + )} } /> diff --git a/app/soapbox/hooks/__tests__/useDimensions.test.ts b/app/soapbox/hooks/__tests__/useDimensions.test.ts index ec86d691a..c437f1394 100644 --- a/app/soapbox/hooks/__tests__/useDimensions.test.ts +++ b/app/soapbox/hooks/__tests__/useDimensions.test.ts @@ -5,12 +5,14 @@ import { useDimensions } from '../useDimensions'; let listener: ((rect: any) => void) | undefined = undefined; (window as any).ResizeObserver = class ResizeObserver { + constructor(ls) { listener = ls; } observe() {} disconnect() {} + }; describe('useDimensions()', () => { @@ -56,10 +58,12 @@ describe('useDimensions()', () => { it('disconnects on unmount', () => { const disconnect = jest.fn(); (window as any).ResizeObserver = class ResizeObserver { + observe() {} disconnect() { disconnect(); } + }; const { result, unmount } = renderHook(() => useDimensions()); diff --git a/app/soapbox/locales/bg.json b/app/soapbox/locales/bg.json index 7a62a52f0..4e937e97c 100644 --- a/app/soapbox/locales/bg.json +++ b/app/soapbox/locales/bg.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/br.json b/app/soapbox/locales/br.json index 1a0d58e9a..9bec55d5b 100644 --- a/app/soapbox/locales/br.json +++ b/app/soapbox/locales/br.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/defaultMessages.json b/app/soapbox/locales/defaultMessages.json index 1d554d379..e9c48411f 100644 --- a/app/soapbox/locales/defaultMessages.json +++ b/app/soapbox/locales/defaultMessages.json @@ -3793,7 +3793,7 @@ "id": "column.home" }, { - "defaultMessage": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "defaultMessage": "Or you can visit {public} to get started and meet other users.", "id": "empty_column.home" }, { diff --git a/app/soapbox/locales/en.json b/app/soapbox/locales/en.json index 2d246e12c..3e740d32c 100644 --- a/app/soapbox/locales/en.json +++ b/app/soapbox/locales/en.json @@ -453,7 +453,9 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", + "empty_column.home.title": "You're not following anyone yet", + "empty_column.home.subtitle": "{siteTitle} gets more interesting once you follow other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/ga.json b/app/soapbox/locales/ga.json index eec9f2971..eb21a107f 100644 --- a/app/soapbox/locales/ga.json +++ b/app/soapbox/locales/ga.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/hi.json b/app/soapbox/locales/hi.json index 292d6a033..cbc84692c 100644 --- a/app/soapbox/locales/hi.json +++ b/app/soapbox/locales/hi.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/lt.json b/app/soapbox/locales/lt.json index 44b913afb..ff62cbf65 100644 --- a/app/soapbox/locales/lt.json +++ b/app/soapbox/locales/lt.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/mk.json b/app/soapbox/locales/mk.json index c760d08e0..8d017fb27 100644 --- a/app/soapbox/locales/mk.json +++ b/app/soapbox/locales/mk.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.", diff --git a/app/soapbox/locales/ms.json b/app/soapbox/locales/ms.json index eaafcd52f..dc75e0a32 100644 --- a/app/soapbox/locales/ms.json +++ b/app/soapbox/locales/ms.json @@ -450,7 +450,7 @@ "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.group": "There is nothing in this group yet. When members of this group make new posts, they will appear here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "Your home timeline is empty! Visit {public} to get started and meet other users.", + "empty_column.home": "Or you can visit {public} to get started and meet other users.", "empty_column.home.local_tab": "the {site_title} tab", "empty_column.list": "There is nothing in this list yet. When members of this list create new posts, they will appear here.", "empty_column.lists": "You don't have any lists yet. When you create one, it will show up here.",