From e571994b5c6700cd896795f792978a709a09c5ce Mon Sep 17 00:00:00 2001 From: diondiondion Date: Fri, 17 Apr 2026 10:50:35 +0200 Subject: [PATCH] Remove "View other collections from this user" from collection menu (#38728) --- .../components/collection_menu.tsx | 31 +++---------------- app/javascript/mastodon/locales/en.json | 1 - 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/app/javascript/mastodon/features/collections/components/collection_menu.tsx b/app/javascript/mastodon/features/collections/components/collection_menu.tsx index 1cbb7279e9..661e879df5 100644 --- a/app/javascript/mastodon/features/collections/components/collection_menu.tsx +++ b/app/javascript/mastodon/features/collections/components/collection_menu.tsx @@ -2,8 +2,6 @@ import { useCallback, useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { matchPath } from 'react-router'; - import { showAlert } from '@/mastodon/actions/alerts'; import { initBlockModal } from '@/mastodon/actions/blocks'; import { useAccount } from '@/mastodon/hooks/useAccount'; @@ -35,10 +33,6 @@ const messages = defineMessages({ id: 'collections.copy_link_confirmation', defaultMessage: 'Copied collection link to clipboard', }, - viewOtherCollections: { - id: 'collections.view_other_collections_by_user', - defaultMessage: 'View other collections by this user', - }, delete: { id: 'collections.delete_collection', defaultMessage: 'Delete collection', @@ -168,25 +162,11 @@ export const CollectionMenu: React.FC<{ return ownerItems; } } else { - const nonOwnerItems: MenuItem[] = [viewCollectionItem, ...shareItems]; - - if (context !== 'notifications' && ownerAccount) { - const featuredCollectionsPath = `/@${ownerAccount.acct}/featured`; - // Don't show menu link to featured collections while on that very page - if ( - !matchPath(location.pathname, { - path: featuredCollectionsPath, - exact: true, - }) - ) { - nonOwnerItems.push({ - text: intl.formatMessage(messages.viewOtherCollections), - to: featuredCollectionsPath, - }); - } - } - - nonOwnerItems.push(null); + const nonOwnerItems: MenuItem[] = [ + viewCollectionItem, + ...shareItems, + null, + ]; // Collection notifications already have a prominent 'Remove me' button if (currentAccountInCollection && context !== 'notifications') { @@ -218,7 +198,6 @@ export const CollectionMenu: React.FC<{ dispatch, openDeleteConfirmation, context, - ownerAccount, currentAccountInCollection, openReportModal, openBlockModal, diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 51d91c2115..449679aab5 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -415,7 +415,6 @@ "collections.unlisted_collections_description": "These don’t appear on your profile to others. Anyone with the link can discover them.", "collections.unlisted_collections_with_count": "Unlisted collections ({count})", "collections.view_collection": "View collection", - "collections.view_other_collections_by_user": "View other collections by this user", "collections.visibility_public": "Public", "collections.visibility_public_hint": "Discoverable in search results and other areas where recommendations appear.", "collections.visibility_title": "Visibility",