diff --git a/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.test.tsx b/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.test.tsx index 39eb7d50cb..eeb88c633d 100644 --- a/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.test.tsx +++ b/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.test.tsx @@ -28,15 +28,15 @@ test('should render bulk disable dialog in regular mode', async () => { render(); - expect(screen.getByText('Disable feature toggles')).toBeInTheDocument(); + expect(screen.getByText('Disable feature flags')).toBeInTheDocument(); expect(screen.getByText('env1')).toBeInTheDocument(); expect( - screen.getByText('1 feature toggle is already disabled.'), + screen.getByText('1 feature flag is already disabled.'), ).toBeInTheDocument(); expect( screen.queryByText('Change requests are enabled for this environment.'), ).not.toBeInTheDocument(); - expect(screen.getByText('Disable toggles')).toBeInTheDocument(); + expect(screen.getByText('Disable flags')).toBeInTheDocument(); }); test('should render bulk disable dialog in change request mode', async () => { @@ -102,10 +102,10 @@ test('should render bulk disable dialog in change request mode', async () => { ); await screen.findByText('3'); - expect(screen.getByText('Disable feature toggles')).toBeInTheDocument(); + expect(screen.getByText('Disable feature flags')).toBeInTheDocument(); expect(screen.getByText('env1')).toBeInTheDocument(); expect( - screen.getByText('2 feature toggles are already disabled.'), + screen.getByText('2 feature flags are already disabled.'), ).toBeInTheDocument(); expect(screen.getByText('Add to change request')).toBeInTheDocument(); }); diff --git a/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.tsx b/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.tsx index 963adc2031..8be537914a 100644 --- a/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.tsx +++ b/frontend/src/component/feature/FeatureToggleList/BulkDisableDialog.tsx @@ -73,7 +73,7 @@ export const BulkDisableDialog = ({ ); refetchChangeRequests(); setToastData({ - text: 'Your disabled feature toggles changes have been added to change request', + text: 'Your disabled feature flags changes have been added to change request', type: 'success', title: 'Changes added to a draft', }); @@ -84,7 +84,7 @@ export const BulkDisableDialog = ({ selected, ); setToastData({ - text: 'Your feature toggles have been disabled', + text: 'Your feature flags have been disabled', type: 'success', title: 'Features disabled', }); @@ -98,20 +98,19 @@ export const BulkDisableDialog = ({ const buttonText = isChangeRequestConfigured(selected) ? 'Add to change request' - : 'Disable toggles'; + : 'Disable flags'; return ( - You have selected {data.length} feature toggles to - disable. + You have selected {data.length} feature flags to disable.

@@ -136,8 +135,8 @@ export const BulkDisableDialog = ({ {alreadyDisabledCount} feature{' '} {alreadyDisabledCount > 1 - ? 'toggles are ' - : 'toggle is '} + ? 'flags are ' + : 'flag is '} already disabled. } diff --git a/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.test.tsx b/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.test.tsx index e4ee872b25..0067a111af 100644 --- a/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.test.tsx +++ b/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.test.tsx @@ -28,15 +28,15 @@ test('should render bulk enable dialog in regular mode', async () => { render(); - expect(screen.getByText('Enable feature toggles')).toBeInTheDocument(); + expect(screen.getByText('Enable feature flags')).toBeInTheDocument(); expect(screen.getByText('env1')).toBeInTheDocument(); expect( - screen.getByText('1 feature toggle is already enabled.'), + screen.getByText('1 feature flag is already enabled.'), ).toBeInTheDocument(); expect( screen.queryByText('Change requests are enabled for this environment.'), ).not.toBeInTheDocument(); - expect(screen.getByText('Enable toggles')).toBeInTheDocument(); + expect(screen.getByText('Enable flags')).toBeInTheDocument(); }); test('should render bulk enable dialog in change request mode', async () => { @@ -102,10 +102,10 @@ test('should render bulk enable dialog in change request mode', async () => { ); await screen.findByText('3'); - expect(screen.getByText('Enable feature toggles')).toBeInTheDocument(); + expect(screen.getByText('Enable feature flags')).toBeInTheDocument(); expect(screen.getByText('env1')).toBeInTheDocument(); expect( - screen.getByText('2 feature toggles are already enabled.'), + screen.getByText('2 feature flags are already enabled.'), ).toBeInTheDocument(); expect(screen.getByText('Add to change request')).toBeInTheDocument(); }); diff --git a/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.tsx b/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.tsx index f3342d086b..29d748c0fc 100644 --- a/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.tsx +++ b/frontend/src/component/feature/FeatureToggleList/BulkEnableDialog.tsx @@ -73,7 +73,7 @@ export const BulkEnableDialog = ({ ); refetchChangeRequests(); setToastData({ - text: 'Your enable feature toggles changes have been added to change request', + text: 'Your enable feature flags changes have been added to change request', type: 'success', title: 'Changes added to a draft', }); @@ -84,7 +84,7 @@ export const BulkEnableDialog = ({ selected, ); setToastData({ - text: 'Your feature toggles have been enabled', + text: 'Your feature flags have been enabled', type: 'success', title: 'Features enabled', }); @@ -99,20 +99,19 @@ export const BulkEnableDialog = ({ const buttonText = isChangeRequestConfigured(selected) ? 'Add to change request' - : 'Enable toggles'; + : 'Enable flags'; return ( - You have selected {data.length} feature toggles to - enable. + You have selected {data.length} feature flags to enable.

@@ -137,8 +136,8 @@ export const BulkEnableDialog = ({ {alreadyEnabledCount} feature{' '} {alreadyEnabledCount > 1 - ? 'toggles are ' - : 'toggle is '} + ? 'flags are ' + : 'flag is '} already enabled. } diff --git a/frontend/src/component/feature/FeatureToggleList/ExportDialog.tsx b/frontend/src/component/feature/FeatureToggleList/ExportDialog.tsx index e1a5c4a2ab..6cd79682c4 100644 --- a/frontend/src/component/feature/FeatureToggleList/ExportDialog.tsx +++ b/frontend/src/component/feature/FeatureToggleList/ExportDialog.tsx @@ -81,7 +81,7 @@ export const ExportDialog = ({ return ( The current search filter will be used to export - feature toggles. Currently {data.length} feature - toggles will be exported. + feature flags. Currently {data.length} feature flags + will be exported. } elseShow={ - You will export all feature toggles from this - project. + You will export all feature flags from this project. } /> @@ -108,7 +107,7 @@ export const ExportDialog = ({

- Select which environment to export feature toggle + Select which environment to export feature flag configuration from: { await userEvent.click(batchReviveButton!); - await screen.findByText('New feature toggle'); + await screen.findByText('New feature flag'); await screen.findByText('Export'); }); diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx index 08ead4d9da..0d8482f054 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx @@ -31,13 +31,13 @@ const StyledPopover = styled(Popover)(({ theme }) => ({ padding: theme.spacing(1, 1.5), })); -interface IFeatureToggleListActions { +interface IFeatureFlagListActions { onExportClick: () => void; } -export const FeatureToggleListActions: FC = ({ +export const FeatureToggleListActions: FC = ({ onExportClick, -}: IFeatureToggleListActions) => { +}: IFeatureFlagListActions) => { const { trackEvent } = usePlausibleTracker(); const [anchorEl, setAnchorEl] = useState(null); const featuresExportImport = useUiFlag('featuresExportImport'); @@ -59,7 +59,7 @@ export const FeatureToggleListActions: FC = ({ setAnchorEl(null); }; - const id = `feature-toggle-list-actions`; + const id = `feature-flag-list-actions`; const menuId = `${id}-menu`; return ( @@ -117,7 +117,7 @@ export const FeatureToggleListActions: FC = ({ - New feature toggle + New feature flag diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.test.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.test.tsx index b3f2d15269..f4e1d08276 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.test.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.test.tsx @@ -137,7 +137,7 @@ test('Filter table by project', async () => { await filterFeaturesByProject('Project B'); await screen.findByText( - 'No feature toggles found matching your criteria. Get started by adding a new feature toggle.', + 'No feature flags found matching your criteria. Get started by adding a new feature flag.', ); expect(window.location.href).toContain( '?offset=0&columns=&project=IS%3Aproject-b', diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx index 31a89b9806..34525ae5e5 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx @@ -339,7 +339,7 @@ export const FeatureToggleListTable: VFC = () => { expandable initialValue={query || ''} onChange={setSearchValue} - id='globalFeatureToggles' + id='globalFeatureFlags' /> @@ -430,7 +430,7 @@ export const FeatureToggleListTable: VFC = () => { } /> @@ -454,16 +454,16 @@ export const FeatureToggleListTable: VFC = () => { condition={(query || '')?.length > 0} show={ - No feature toggles found matching “ + No feature flags found matching “ {query} ” } elseShow={ - No feature toggles found matching your + No feature flags found matching your criteria. Get started by adding a new - feature toggle. + feature flag. } /> diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog.tsx index 656ecfc72d..9881a6bfb4 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog.tsx @@ -229,7 +229,7 @@ export const ManageBulkTagsDialog: VFC = ({ open={open} secondaryButtonText='Cancel' primaryButtonText='Save tags' - title='Update feature toggle tags' + title='Update feature flag tags' onClick={() => onSubmit(payload)} disabledPrimaryButton={ payload.addedTags.length === 0 && diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx index 1e98b1ce21..ed516a5415 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx @@ -179,9 +179,7 @@ export const ManageTagsDialog = ({ open, setOpen }: IManageTagsProps) => { differenceCount > 0 && setToastData({ type: 'success', - title: `Updated tag${ - added.length > 1 ? 's' : '' - } to toggle`, + title: `Updated tag${added.length > 1 ? 's' : ''} to flag`, text: getToastText(added.length, removed.length), confetti: true, }); @@ -253,7 +251,7 @@ export const ManageTagsDialog = ({ open, setOpen }: IManageTagsProps) => { open={open} secondaryButtonText='Cancel' primaryButtonText='Save tags' - title='Update feature toggle tags' + title='Update feature flag tags' onClick={onSubmit} disabledPrimaryButton={loading || differenceCount === 0} onClose={onCancel} diff --git a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/EnvironmentVariantsModal.tsx b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/EnvironmentVariantsModal.tsx index 4c28d715c0..b4794a14c2 100644 --- a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/EnvironmentVariantsModal.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/EnvironmentVariantsModal.tsx @@ -329,9 +329,9 @@ export const EnvironmentVariantsModal = ({ diff --git a/frontend/src/component/menu/Footer/__snapshots__/Footer.test.tsx.snap b/frontend/src/component/menu/Footer/__snapshots__/Footer.test.tsx.snap index 266080de3c..c08f1ef092 100644 --- a/frontend/src/component/menu/Footer/__snapshots__/Footer.test.tsx.snap +++ b/frontend/src/component/menu/Footer/__snapshots__/Footer.test.tsx.snap @@ -27,7 +27,7 @@ exports[`should render DrawerMenu 1`] = `
- The enterprise ready feature toggle service. + The enterprise ready feature flag service.
@@ -571,7 +571,7 @@ exports[`should render DrawerMenu with "features" selected 1`] = `
- The enterprise ready feature toggle service. + The enterprise ready feature flag service.
diff --git a/frontend/src/component/project/Project/CreateProject/CreateProject.tsx b/frontend/src/component/project/Project/CreateProject/CreateProject.tsx index 62a2bbfc6b..95b292f6f4 100644 --- a/frontend/src/component/project/Project/CreateProject/CreateProject.tsx +++ b/frontend/src/component/project/Project/CreateProject/CreateProject.tsx @@ -57,7 +57,7 @@ const CreateProject = () => { } const generalDocumentation = - 'Projects allows you to group feature toggles together in the management UI.'; + 'Projects allows you to group feature flags together in the management UI.'; const [documentation, setDocumentation] = useState(generalDocumentation); @@ -82,7 +82,7 @@ const CreateProject = () => { navigate(`/projects/${createdProject.id}`, { replace: true }); setToastData({ title: 'Project created', - text: 'Now you can add toggles to this project', + text: 'Now you can add flags to this project', confetti: true, type: 'success', }); @@ -118,7 +118,7 @@ const CreateProject = () => { = ({ }} onOpen={() => overrideDocumentation( - `Each feature toggle can have a separate configuration per environment. This setting configures which environments your project should start with.`, + `Each feature flag can have a separate configuration per environment. This setting configures which environments your project should start with.`, ) } onClose={clearDocumentationOverride} diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.test.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.test.tsx index e8bb40b256..b3936fa43f 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.test.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.test.tsx @@ -35,7 +35,7 @@ test('selects project features', async () => { ); await screen.findByText('featureA'); await screen.findByText('featureB'); - await screen.findByText('Feature toggles (2)'); + await screen.findByText('Feature flags (2)'); const [selectAll, selectFeatureA, selectFeatureB] = screen.queryAllByRole('checkbox'); diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx index d9a899dfb0..f29ebced07 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx @@ -95,7 +95,7 @@ export const ProjectFeatureTogglesHeader: VFC< setShowTitle(false)} onBlur={() => setShowTitle(true)} hasFilters - id='projectFeatureToggles' + id='projectFeatureFlags' /> } /> @@ -125,7 +125,7 @@ export const ProjectFeatureTogglesHeader: VFC< show={ <> - New feature toggle + New feature flag } @@ -200,7 +200,7 @@ export const ProjectFeatureTogglesHeader: VFC< initialValue={searchQuery || ''} onChange={handleSearch} hasFilters - id='projectFeatureToggles' + id='projectFeatureFlags' /> } /> diff --git a/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx b/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx index 9d5d00db96..5cb9ac384e 100644 --- a/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx +++ b/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx @@ -89,7 +89,7 @@ export const ProjectDoraMetrics = () => { align: 'center', Cell: ({ row: { original } }: any) => ( { isLoading={loading} header={ } > diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx index d5bf92afcb..70dd62f8a7 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx @@ -88,7 +88,7 @@ export const ActionsCell: VFC = ({ return ( - + = ({ setToastData({ title: 'Tags updated', - text: `${features.length} feature toggles updated. ${added} ${removed}`, + text: `${features.length} feature flags updated. ${added} ${removed}`, type: 'success', autoHideDuration: 12000, }); diff --git a/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx b/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx index 11a95df9e7..e59046f15b 100644 --- a/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx +++ b/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx @@ -187,8 +187,8 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => { const title = rows.length < data.length - ? `Feature toggles (${rows.length} of ${data.length})` - : `Feature toggles (${data.length})`; + ? `Feature flags (${rows.length} of ${data.length})` + : `Feature flags (${data.length})`; return ( { condition={globalFilter?.length > 0} show={ - No feature toggles found matching “ + No feature flags found matching “ {globalFilter} ” } elseShow={ - No feature toggles available. Get started by + No feature flags available. Get started by adding a new feature toggle. } diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectApiAccess/CreateProjectApiTokenForm.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectApiAccess/CreateProjectApiTokenForm.tsx index d39fbeab2a..9fcf54190a 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectApiAccess/CreateProjectApiTokenForm.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectApiAccess/CreateProjectApiTokenForm.tsx @@ -102,7 +102,7 @@ export const CreateProjectApiTokenForm = () => { loading={loading} title={pageTitle} modal - description="Unleash SDKs use API tokens to authenticate to the Unleash API. Client SDKs need a token with 'client privileges', which allows them to fetch feature toggle configurations and post usage metrics." + description="Unleash SDKs use API tokens to authenticate to the Unleash API. Client SDKs need a token with 'client privileges', which allows them to fetch feature flag configurations and post usage metrics." documentationLink='https://docs.getunleash.io/reference/api-tokens-and-client-keys' documentationLinkLabel='API tokens documentation' formatApiCode={formatApiCode} diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx index 28fa975c75..6078489d4d 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx @@ -207,7 +207,7 @@ export const formatUpdateStrategyApiCode = ( export const projectDefaultStrategyHelp = ` An activation strategy will only run when a feature flag is enabled and provides a way to control who will get access to the feature. - If any of a feature toggle's activation strategies returns true, the user will get access. + If any of a feature flag's activation strategies returns true, the user will get access. `; export const projectDefaultStrategyDocsLink = diff --git a/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/UpdateProject.tsx b/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/UpdateProject.tsx index 35c79ae723..6f82fa80d2 100644 --- a/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/UpdateProject.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/UpdateProject.tsx @@ -114,7 +114,7 @@ export const UpdateProject = ({ project }: IUpdateProject) => { Danger! Hiding an environment will disable all - the feature toggles that are enabled in this environment and it + the feature flags that are enabled in this environment and it can impact client applications connected to the environment. diff --git a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx b/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx index 7d971052ed..5cb2338b61 100644 --- a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx +++ b/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx @@ -186,7 +186,7 @@ const ProjectEnvironmentList = () => { { export const segmentsFormDescription = ` Segments make it easy for you to define which of your users should get access to a feature. A segment is a reusable collection of constraints. - You can create and apply a segment when configuring activation strategies for a feature toggle or at any time from the segments page in the navigation menu. + You can create and apply a segment when configuring activation strategies for a feature flag or at any time from the segments page in the navigation menu. `; diff --git a/frontend/src/hooks/api/getters/useFeature/useFeature.ts b/frontend/src/hooks/api/getters/useFeature/useFeature.ts index 4f374713b8..10f4ecaad7 100644 --- a/frontend/src/hooks/api/getters/useFeature/useFeature.ts +++ b/frontend/src/hooks/api/getters/useFeature/useFeature.ts @@ -54,7 +54,7 @@ export const featureFetcher = async ( } if (!res.ok) { - await handleErrorResponses('Feature toggle data')(res); + await handleErrorResponses('Feature flag data')(res); } return { diff --git a/frontend/src/hooks/api/getters/useFeatures/useFeatures.ts b/frontend/src/hooks/api/getters/useFeatures/useFeatures.ts index 0d5e636f73..a57d668796 100644 --- a/frontend/src/hooks/api/getters/useFeatures/useFeatures.ts +++ b/frontend/src/hooks/api/getters/useFeatures/useFeatures.ts @@ -5,7 +5,7 @@ import handleErrorResponses from '../httpErrorResponseHandler'; const fetcher = (path: string) => { return fetch(path) - .then(handleErrorResponses('Feature toggle')) + .then(handleErrorResponses('Feature flag')) .then((res) => res.json()); }; diff --git a/frontend/src/hooks/api/getters/useFeaturesArchive/useFeaturesArchive.ts b/frontend/src/hooks/api/getters/useFeaturesArchive/useFeaturesArchive.ts index e37141533c..2a6f038dc2 100644 --- a/frontend/src/hooks/api/getters/useFeaturesArchive/useFeaturesArchive.ts +++ b/frontend/src/hooks/api/getters/useFeaturesArchive/useFeaturesArchive.ts @@ -12,7 +12,7 @@ export interface IUseFeaturesArchiveOutput { const fetcher = (path: string) => { return fetch(path) - .then(handleErrorResponses('Feature toggle archive')) + .then(handleErrorResponses('Feature flag archive')) .then((res) => res.json()); }; diff --git a/frontend/src/hooks/api/getters/useUiConfig/defaultValue.ts b/frontend/src/hooks/api/getters/useUiConfig/defaultValue.ts index bf5ddda830..bb4a6b8e51 100644 --- a/frontend/src/hooks/api/getters/useUiConfig/defaultValue.ts +++ b/frontend/src/hooks/api/getters/useUiConfig/defaultValue.ts @@ -4,7 +4,7 @@ import type { IUiConfig } from 'interfaces/uiConfig'; export const defaultValue: IUiConfig = { name: 'Unleash', version: '5.x', - slogan: 'The enterprise ready feature toggle service.', + slogan: 'The enterprise ready feature flag service.', flags: { P: false, RE: false, diff --git a/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap b/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap index e25f10db3a..bf49309fe6 100644 --- a/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap +++ b/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap @@ -16,7 +16,7 @@ exports[`Should format specialised text for events when a scheduled change reque exports[`Should format specialised text for events when change request is scheduled 1`] = ` { - "text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at in project *my-other-project*", + "text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at in project *my-other-project*", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; @@ -170,14 +170,14 @@ exports[`Should format specialised text for events when rollout percentage chang exports[`Should format specialised text for events when scheduled change request fails 1`] = ` { - "text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", + "text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; exports[`Should format specialised text for events when scheduled change request succeeds 1`] = ` { - "text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", + "text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; diff --git a/src/lib/addons/datadog-definition.ts b/src/lib/addons/datadog-definition.ts index 582db7e4f9..e05d8b3787 100644 --- a/src/lib/addons/datadog-definition.ts +++ b/src/lib/addons/datadog-definition.ts @@ -22,7 +22,7 @@ const dataDogDefinition: IAddonDefinition = { displayName: 'Datadog', description: 'Allows Unleash to post updates to Datadog.', documentationUrl: 'https://docs.getunleash.io/docs/addons/datadog', - howTo: 'The Datadog integration allows Unleash to post Updates to Datadog when a feature toggle is updated.', + howTo: 'The Datadog integration allows Unleash to post Updates to Datadog when a feature flag is updated.', parameters: [ { name: 'url', diff --git a/src/lib/addons/feature-event-formatter-md.ts b/src/lib/addons/feature-event-formatter-md.ts index 9b6b9c9251..11eeb0082e 100644 --- a/src/lib/addons/feature-event-formatter-md.ts +++ b/src/lib/addons/feature-event-formatter-md.ts @@ -334,7 +334,7 @@ export class FeatureEventFormatterMd implements FeatureEventFormatter { const text = `#${changeRequestId}`; const featureLink = this.generateFeatureLink(event); const featureText = featureLink - ? ` for feature toggle *${featureLink}*` + ? ` for feature flag *${featureLink}*` : ''; const environmentText = environment ? ` in the *${environment}* environment` diff --git a/src/lib/addons/slack-app-definition.ts b/src/lib/addons/slack-app-definition.ts index 606422c838..cd16caaa97 100644 --- a/src/lib/addons/slack-app-definition.ts +++ b/src/lib/addons/slack-app-definition.ts @@ -64,7 +64,7 @@ const slackAppDefinition: IAddonDefinition = { displayName: 'Slack App', description: 'The Unleash Slack App posts messages to the selected channels in your Slack workspace.', - howTo: 'Below you can specify which Slack channels receive event notifications. The configuration settings allow you to choose the events and whether you want to filter them by projects and environments.\n\nYou can also select which channels to post to by configuring your feature toggles with “slack” tags. For example, if you’d like the bot to post messages to the #general channel, you can configure your feature toggle with the “slack:general” tag.\n\nThe Unleash Slack App bot has access to public channels by default. If you want the bot to post messages to private channels, you’ll need to invite it to those channels.', + howTo: 'Below you can specify which Slack channels receive event notifications. The configuration settings allow you to choose the events and whether you want to filter them by projects and environments.\n\nYou can also select which channels to post to by configuring your feature flags with “slack” tags. For example, if you’d like the bot to post messages to the #general channel, you can configure your feature flag with the “slack:general” tag.\n\nThe Unleash Slack App bot has access to public channels by default. If you want the bot to post messages to private channels, you’ll need to invite it to those channels.', documentationUrl: 'https://docs.getunleash.io/docs/addons/slack-app', installation: { url: 'https://unleash-slack-app.vercel.app/install', diff --git a/src/lib/addons/teams-definition.ts b/src/lib/addons/teams-definition.ts index a1c5656404..b00c18db8a 100644 --- a/src/lib/addons/teams-definition.ts +++ b/src/lib/addons/teams-definition.ts @@ -22,7 +22,7 @@ const teamsDefinition: IAddonDefinition = { displayName: 'Microsoft Teams', description: 'Allows Unleash to post updates to Microsoft Teams.', documentationUrl: 'https://docs.getunleash.io/docs/addons/teams', - howTo: 'The Microsoft Teams integration allows Unleash to post Updates when a feature toggle is updated.', + howTo: 'The Microsoft Teams integration allows Unleash to post Updates when a feature flag is updated.', parameters: [ { name: 'url', diff --git a/src/lib/domain/project-health/project-health.test.ts b/src/lib/domain/project-health/project-health.test.ts index 6dd844d166..4c89d0fd82 100644 --- a/src/lib/domain/project-health/project-health.test.ts +++ b/src/lib/domain/project-health/project-health.test.ts @@ -35,7 +35,7 @@ describe('calculateProjectHealth', () => { }); }); - it('counts active toggles', () => { + it('counts active flags', () => { const features = [{ stale: false }, {}]; expect(calculateProjectHealth(features, exampleFeatureTypes)).toEqual({ @@ -45,7 +45,7 @@ describe('calculateProjectHealth', () => { }); }); - it('counts stale toggles', () => { + it('counts stale flags', () => { const features = [{ stale: true }, { stale: false }, {}]; expect(calculateProjectHealth(features, exampleFeatureTypes)).toEqual({ @@ -55,7 +55,7 @@ describe('calculateProjectHealth', () => { }); }); - it('takes feature type into account when calculating potentially stale toggles', () => { + it('takes feature type into account when calculating potentially stale flags', () => { expect( calculateProjectHealth( [ @@ -108,7 +108,7 @@ describe('calculateProjectHealth', () => { }); }); - it("doesn't count stale toggles as potentially stale or stale as active", () => { + it("doesn't count stale flags as potentially stale or stale as active", () => { const features = [ { stale: true, @@ -150,11 +150,11 @@ describe('calculateProjectHealth', () => { }); describe('calculateHealthRating', () => { - it('works with empty feature toggles', () => { + it('works with empty feature flags', () => { expect(calculateHealthRating([], exampleFeatureTypes)).toEqual(100); }); - it('works with stale and active feature toggles', () => { + it('works with stale and active feature flags', () => { expect( calculateHealthRating( [{ stale: true }, { stale: true }], @@ -175,7 +175,7 @@ describe('calculateHealthRating', () => { ).toEqual(67); }); - it('counts potentially stale toggles', () => { + it('counts potentially stale flags', () => { expect( calculateHealthRating( [ diff --git a/src/lib/features/client-feature-toggles/client-feature-toggle.controller.ts b/src/lib/features/client-feature-toggles/client-feature-toggle.controller.ts index c862ff0482..9b46e9b073 100644 --- a/src/lib/features/client-feature-toggles/client-feature-toggle.controller.ts +++ b/src/lib/features/client-feature-toggles/client-feature-toggle.controller.ts @@ -102,9 +102,9 @@ export default class FeatureController extends Controller { middleware: [ openApiService.validPath({ operationId: 'getClientFeature', - summary: 'Get a single feature toggle', + summary: 'Get a single feature flag', description: - 'Gets all the client data for a single toggle. Contains the exact same information about a toggle as the `/api/client/features` endpoint does, but only contains data about the specified toggle. All SDKs should use `/api/client/features`', + 'Gets all the client data for a single flag. Contains the exact same information about a flag as the `/api/client/features` endpoint does, but only contains data about the specified flag. All SDKs should use `/api/client/features`', tags: ['Client'], responses: { 200: createResponseSchema('clientFeatureSchema'), @@ -120,9 +120,9 @@ export default class FeatureController extends Controller { permission: NONE, middleware: [ openApiService.validPath({ - summary: 'Get all toggles (SDK)', + summary: 'Get all flags (SDK)', description: - 'Returns the SDK configuration for all feature toggles that are available to the provided API key. Used by SDKs to configure local evaluation', + 'Returns the SDK configuration for all feature flags that are available to the provided API key. Used by SDKs to configure local evaluation', operationId: 'getAllClientFeatures', tags: ['Client'], responses: { @@ -302,7 +302,7 @@ export default class FeatureController extends Controller { const toggle = toggles.find((t) => t.name === name); if (!toggle) { - throw new NotFoundError(`Could not find feature toggle ${name}`); + throw new NotFoundError(`Could not find feature flag ${name}`); } this.openApiService.respondWithValidation( 200, diff --git a/src/lib/features/export-import-toggles/export-import-controller.ts b/src/lib/features/export-import-toggles/export-import-controller.ts index 5b2ea65102..8a0201b7fa 100644 --- a/src/lib/features/export-import-toggles/export-import-controller.ts +++ b/src/lib/features/export-import-toggles/export-import-controller.ts @@ -66,7 +66,7 @@ class ExportImportController extends Controller { }, description: "Exports all features listed in the `features` property from the environment specified in the request body. If set to `true`, the `downloadFile` property will let you download a file with the exported data. Otherwise, the export data is returned directly as JSON. Refer to the documentation for more information about [Unleash's export functionality](https://docs.getunleash.io/reference/deploy/environment-import-export#export).", - summary: 'Export feature toggles from an environment', + summary: 'Export feature flags from an environment', }), ], }); diff --git a/src/lib/metrics.test.ts b/src/lib/metrics.test.ts index 351caeada8..493272aa6c 100644 --- a/src/lib/metrics.test.ts +++ b/src/lib/metrics.test.ts @@ -205,12 +205,12 @@ test('should collect metrics for function timings', async () => { ); }); -test('should collect metrics for feature toggle size', async () => { +test('should collect metrics for feature flag size', async () => { const metrics = await prometheusRegister.metrics(); expect(metrics).toMatch(/feature_toggles_total\{version="(.*)"\} 0/); }); -test('should collect metrics for archived feature toggle size', async () => { +test('should collect metrics for archived feature flag size', async () => { const metrics = await prometheusRegister.metrics(); expect(metrics).toMatch(/feature_toggles_archived_total 0/); }); diff --git a/src/lib/metrics.ts b/src/lib/metrics.ts index 6273bbb60d..096f07c4a0 100644 --- a/src/lib/metrics.ts +++ b/src/lib/metrics.ts @@ -94,25 +94,25 @@ export default class MetricsMonitor { maxAgeSeconds: 600, ageBuckets: 5, }); - const featureToggleUpdateTotal = createCounter({ + const featureFlagUpdateTotal = createCounter({ name: 'feature_toggle_update_total', - help: 'Number of times a toggle has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature toggle is created.', + help: 'Number of times a toggle has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature flag is created.', labelNames: ['toggle', 'project', 'environment', 'environmentType'], }); - const featureToggleUsageTotal = createCounter({ + const featureFlagUsageTotal = createCounter({ name: 'feature_toggle_usage_total', - help: 'Number of times a feature toggle has been used', + help: 'Number of times a feature flag has been used', labelNames: ['toggle', 'active', 'appName'], }); - const featureTogglesTotal = createGauge({ + const featureFlagsTotal = createGauge({ name: 'feature_toggles_total', - help: 'Number of feature toggles', + help: 'Number of feature flags', labelNames: ['version'], }); const featureTogglesArchivedTotal = createGauge({ name: 'feature_toggles_archived_total', - help: 'Number of archived feature toggles', + help: 'Number of archived feature flags', }); const usersTotal = createGauge({ name: 'users_total', @@ -275,10 +275,8 @@ export default class MetricsMonitor { try { const stats = await instanceStatsService.getStats(); - featureTogglesTotal.reset(); - featureTogglesTotal - .labels({ version }) - .set(stats.featureToggles); + featureFlagsTotal.reset(); + featureFlagsTotal.labels({ version }).set(stats.featureToggles); featureTogglesArchivedTotal.reset(); featureTogglesArchivedTotal.set(stats.archivedFeatureToggles); @@ -495,7 +493,7 @@ export default class MetricsMonitor { }); eventStore.on(FEATURE_CREATED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'n/a', @@ -503,7 +501,7 @@ export default class MetricsMonitor { }); }); eventStore.on(FEATURE_VARIANTS_UPDATED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'n/a', @@ -511,7 +509,7 @@ export default class MetricsMonitor { }); }); eventStore.on(FEATURE_METADATA_UPDATED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'n/a', @@ -519,7 +517,7 @@ export default class MetricsMonitor { }); }); eventStore.on(FEATURE_UPDATED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'default', @@ -533,7 +531,7 @@ export default class MetricsMonitor { environment, cachedEnvironments, ); - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment, @@ -548,7 +546,7 @@ export default class MetricsMonitor { environment, cachedEnvironments, ); - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment, @@ -563,7 +561,7 @@ export default class MetricsMonitor { environment, cachedEnvironments, ); - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment, @@ -578,7 +576,7 @@ export default class MetricsMonitor { environment, cachedEnvironments, ); - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment, @@ -593,7 +591,7 @@ export default class MetricsMonitor { environment, cachedEnvironments, ); - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment, @@ -602,7 +600,7 @@ export default class MetricsMonitor { }, ); eventStore.on(FEATURE_ARCHIVED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'n/a', @@ -610,7 +608,7 @@ export default class MetricsMonitor { }); }); eventStore.on(FEATURE_REVIVED, ({ featureName, project }) => { - featureToggleUpdateTotal.increment({ + featureFlagUpdateTotal.increment({ toggle: featureName, project, environment: 'n/a', @@ -620,7 +618,7 @@ export default class MetricsMonitor { eventBus.on(CLIENT_METRICS, (m: ValidatedClientMetrics) => { for (const entry of Object.entries(m.bucket.toggles)) { - featureToggleUsageTotal.increment( + featureFlagUsageTotal.increment( { toggle: entry[0], active: 'true', @@ -628,7 +626,7 @@ export default class MetricsMonitor { }, entry[1].yes, ); - featureToggleUsageTotal.increment( + featureFlagUsageTotal.increment( { toggle: entry[0], active: 'false', diff --git a/src/test/e2e/services/access-service.e2e.test.ts b/src/test/e2e/services/access-service.e2e.test.ts index 1870fe04e4..8f2cbd8c31 100644 --- a/src/test/e2e/services/access-service.e2e.test.ts +++ b/src/test/e2e/services/access-service.e2e.test.ts @@ -450,7 +450,7 @@ test('should grant user access to project', async () => { const projectRole = await accessService.getRoleByName(RoleName.MEMBER); await accessService.addUserToRole(sUser.id, projectRole.id, project); - // // Should be able to update feature toggles inside the project + // // Should be able to update feature flags inside the project await hasCommonProjectAccess(sUser, project, true); // Should not be able to admin the project itself. @@ -472,7 +472,7 @@ test('should not get access if not specifying project', async () => { await accessService.addUserToRole(sUser.id, projectRole.id, project); - // Should not be able to update feature toggles outside project + // Should not be able to update feature flags outside project await hasCommonProjectAccess(sUser, undefined, false); }); @@ -766,7 +766,7 @@ test('Should be denied access to delete a role that is in use', async () => { } }); -test('Should be denied move feature toggle to project where the user does not have access', async () => { +test('Should be denied move feature flag to project where the user does not have access', async () => { const user = editorUser; const editorUser2 = await createUser(editorRole.id); @@ -787,18 +787,18 @@ test('Should be denied move feature toggle to project where the user does not ha TEST_AUDIT_USER, ); - const featureToggle = { name: 'moveableToggle' }; + const featureFlag = { name: 'moveableFlag' }; await featureToggleService.createFeatureToggle( projectOrigin.id, - featureToggle, + featureFlag, extractAuditInfoFromUser(user), ); try { await projectService.changeProject( projectDest.id, - featureToggle.name, + featureFlag.name, user, projectOrigin.id, TEST_AUDIT_USER, @@ -812,7 +812,7 @@ test('Should be denied move feature toggle to project where the user does not ha } }); -test('Should be allowed move feature toggle to project when the user has access', async () => { +test('Should be allowed move feature flag to project when the user has access', async () => { const user = editorUser; const projectOrigin = { @@ -836,17 +836,17 @@ test('Should be allowed move feature toggle to project when the user has access' extractAuditInfoFromUser(user), ); - const featureToggle = { name: 'moveableToggle2' }; + const featureFlag = { name: 'moveableFlag2' }; await featureToggleService.createFeatureToggle( projectOrigin.id, - featureToggle, + featureFlag, extractAuditInfoFromUser(user), ); await projectService.changeProject( projectDest.id, - featureToggle.name, + featureFlag.name, user, projectOrigin.id, extractAuditInfoFromUser(user), @@ -921,7 +921,7 @@ test('Should not be allowed to delete a project role', async () => { } }); -test('Should be allowed move feature toggle to project when given access through group', async () => { +test('Should be allowed move feature flag to project when given access through group', async () => { const project = { id: 'yet-another-project1', name: 'yet-another-project1', @@ -976,13 +976,13 @@ test('Should not lose user role access when given permissions from a group', asy test('Should allow user to take multiple group roles and have expected permissions on each project', async () => { const projectForCreate = { - id: 'project-that-should-have-create-toggle-permission', - name: 'project-that-should-have-create-toggle-permission', + id: 'project-that-should-have-create-flag-permission', + name: 'project-that-should-have-create-flag-permission', description: 'Blah', }; const projectForDelete = { - id: 'project-that-should-have-delete-toggle-permission', - name: 'project-that-should-have-delete-toggle-permission', + id: 'project-that-should-have-delete-flag-permission', + name: 'project-that-should-have-delete-flag-permission', description: 'Blah', };