From ef88ae5387cc5a2b260c555b97d152502079ed64 Mon Sep 17 00:00:00 2001 From: Petri-Johan Last Date: Mon, 3 Jun 2024 12:12:15 +0200 Subject: [PATCH] Remove external accounts modal feature flag (#62983) --- CHANGELOG.md | 1 + .../src/external-account-modal/ExternalAccountsModal.tsx | 6 +----- client/web/src/featureFlags/featureFlags.ts | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41798c21767..57f9407ee0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable changes to Sourcegraph are documented in this file. - Mermaid diagrams in Markdown are now rendered in the Sourcegraph web app ([#62678](https://github.com/sourcegraph/sourcegraph/pull/62678)) - A feature flag for Cody, `completions.smartContextWindow` is added and set to "enabled" by default. It allows clients to adjust the context window based on the name of the chat model. When smartContextWindow is enabled, the `completions.chatModelMaxTokens` value is ignored. ([#62802](https://github.com/sourcegraph/sourcegraph/pull/62802)) - Code Insights: When facing the "incomplete datapoints" warning, you can now use GraphQL to discover which repositories had problems. The schemas for `TimeoutDatapointAlert` and `GenericIncompleteDatapointAlert` now contain an additional `repositories` field. ([#62756](https://github.com/sourcegraph/sourcegraph/pull/62756)). +- Users will now be presented with a modal that reminds them to connect any external code host accounts that's required for permissions. Without these accounts connected, users may be unable to view repositories that they otherwise have access to. [#62983](https://github.com/sourcegraph/sourcegraph/pull/62983) ### Changed diff --git a/client/web/src/external-account-modal/ExternalAccountsModal.tsx b/client/web/src/external-account-modal/ExternalAccountsModal.tsx index 9c1ffecec4d..e6854bd7acc 100644 --- a/client/web/src/external-account-modal/ExternalAccountsModal.tsx +++ b/client/web/src/external-account-modal/ExternalAccountsModal.tsx @@ -9,7 +9,6 @@ import { Button, ErrorAlert, H2, LoadingSpinner, Modal, Text } from '@sourcegrap import type { AuthenticatedUser } from '../auth' import { BrandLogo } from '../components/branding/BrandLogo' -import { useFeatureFlag } from '../featureFlags/useFeatureFlag' import type { UserExternalAccountsWithAccountDataVariables } from '../graphql-operations' import type { AuthProvider, SourcegraphContext } from '../jscontext' import { ExternalAccountsSignIn } from '../user/settings/auth/ExternalAccountsSignIn' @@ -85,8 +84,6 @@ function filterAuthProviders( } export const ExternalAccountsModal: React.FunctionComponent = props => { - const [enableExternalAccountsModal] = useFeatureFlag('external-accounts-modal') - const [seenAuthzProviders, setSeenAuthzProviders] = useTemporarySetting('user.seenAuthProviders', []) const [userExternalAccounts, setUserExternalAccounts] = useState<{ @@ -106,7 +103,6 @@ export const ExternalAccountsModal: React.FunctionComponent(USER_EXTERNAL_ACCOUNTS, { variables: { username: props.authenticatedUser.username }, - skip: !enableExternalAccountsModal, onCompleted: res => setUserExternalAccounts({ loading: false, fetched: res.user.externalAccounts.nodes, lastRemoved: '' }), }) @@ -162,7 +158,7 @@ export const ExternalAccountsModal: React.FunctionComponent