From bcec8f53a48cc3892bd646ca7960b30edc402dcf Mon Sep 17 00:00:00 2001 From: Travis Briggs Date: Fri, 9 Aug 2024 09:12:51 -0700 Subject: [PATCH] Add hint to user that other remote statuses may not be displayed (#26910) --- app/javascript/mastodon/features/status/index.jsx | 10 ++++++++-- app/javascript/mastodon/locales/en.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 7f3044c5c..8f36c4427 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import { defineMessages, injectIntl } from 'react-intl'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import { Helmet } from 'react-helmet'; @@ -18,6 +18,7 @@ import VisibilityIcon from '@/material-icons/400-24px/visibility.svg?react'; import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Icon } from 'mastodon/components/icon'; import { LoadingIndicator } from 'mastodon/components/loading_indicator'; +import { TimelineHint } from 'mastodon/components/timeline_hint'; import ScrollContainer from 'mastodon/containers/scroll_container'; import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error'; import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; @@ -598,7 +599,7 @@ class Status extends ImmutablePureComponent { }; render () { - let ancestors, descendants; + let ancestors, descendants, remoteHint; const { isLoading, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, pictureInPicture } = this.props; const { fullscreen } = this.state; @@ -627,6 +628,10 @@ class Status extends ImmutablePureComponent { const isLocal = status.getIn(['account', 'acct'], '').indexOf('@') === -1; const isIndexable = !status.getIn(['account', 'noindex']); + if (!isLocal) { + remoteHint = } />; + } + const handlers = { moveUp: this.handleHotkeyMoveUp, moveDown: this.handleHotkeyMoveDown, @@ -695,6 +700,7 @@ class Status extends ImmutablePureComponent { {descendants} + {remoteHint} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 388fb80de..fae630a27 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -831,6 +831,7 @@ "timeline_hint.remote_resource_not_displayed": "{resource} from other servers are not displayed.", "timeline_hint.resources.followers": "Followers", "timeline_hint.resources.follows": "Follows", + "timeline_hint.resources.replies": "Some replies", "timeline_hint.resources.statuses": "Older posts", "trends.counter_by_accounts": "{count, plural, one {{counter} person} other {{counter} people}} in the past {days, plural, one {day} other {{days} days}}", "trends.trending_now": "Trending now",