From 00bcb014dfc9f6e23b7ad2d070f628ea64727c8a Mon Sep 17 00:00:00 2001 From: Echo Date: Fri, 20 Mar 2026 14:32:48 +0100 Subject: [PATCH] Profile editing: Use server flag (#38310) --- app/javascript/mastodon/components/follow_button.tsx | 4 ++-- app/javascript/mastodon/features/ui/index.jsx | 4 ++-- app/javascript/mastodon/utils/environment.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/components/follow_button.tsx b/app/javascript/mastodon/components/follow_button.tsx index a682dd95521..14f2d62d9aa 100644 --- a/app/javascript/mastodon/components/follow_button.tsx +++ b/app/javascript/mastodon/components/follow_button.tsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; import { Link } from 'react-router-dom'; import { useIdentity } from '@/mastodon/identity_context'; -import { isClientFeatureEnabled } from '@/mastodon/utils/environment'; +import { isServerFeatureEnabled } from '@/mastodon/utils/environment'; import { fetchRelationships, followAccount, @@ -171,7 +171,7 @@ export const FollowButton: React.FC<{ 'button--compact': compact, }); - if (isClientFeatureEnabled('profile_editing')) { + if (isServerFeatureEnabled('profile_redesign')) { return ( {label} diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx index eae6d35a5f7..7540d64b4e6 100644 --- a/app/javascript/mastodon/features/ui/index.jsx +++ b/app/javascript/mastodon/features/ui/index.jsx @@ -23,7 +23,7 @@ import { identityContextPropShape, withIdentity } from 'mastodon/identity_contex import { layoutFromWindow } from 'mastodon/is_mobile'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; import { checkAnnualReport } from '@/mastodon/reducers/slices/annual_report'; -import { isClientFeatureEnabled } from '@/mastodon/utils/environment'; +import { isServerFeatureEnabled } from '@/mastodon/utils/environment'; import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose'; import { clearHeight } from '../../actions/height_cache'; @@ -182,7 +182,7 @@ class SwitchingColumnsArea extends PureComponent { } const profileRedesignRoutes = []; - if (isClientFeatureEnabled('profile_editing')) { + if (isServerFeatureEnabled('profile_redesign')) { profileRedesignRoutes.push( , diff --git a/app/javascript/mastodon/utils/environment.ts b/app/javascript/mastodon/utils/environment.ts index 58421817ade..5f736fa80c5 100644 --- a/app/javascript/mastodon/utils/environment.ts +++ b/app/javascript/mastodon/utils/environment.ts @@ -18,7 +18,7 @@ export function isServerFeatureEnabled(feature: ServerFeatures) { return initialState?.features.includes(feature) ?? false; } -type ClientFeatures = 'collections' | 'profile_editing'; +type ClientFeatures = 'collections'; export function isClientFeatureEnabled(feature: ClientFeatures) { try {