Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename toggle to flag #8854

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const NewStrategyVariants: FC<{
tooltip={
<Box>
<Typography variant='body2'>
Variants in feature toggling allow you to serve
Variants in feature flagging allow you to serve
different versions of a feature to different
users. This can be used for A/B testing, gradual
rollouts, and canary releases. Variants provide
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/project/Project/Import/Import.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test('Import happy path', async () => {

const codeEditorLabel = screen.getByText('Code editor');
codeEditorLabel.click();
const editor = screen.getByLabelText('Exported toggles');
const editor = screen.getByLabelText('Exported feature flags');
expect(editor.textContent).toBe('{}');

screen.getByText('Validate').click();
Expand Down Expand Up @@ -92,7 +92,7 @@ test('Block when importing non json content', async () => {

const codeEditorLabel = screen.getByText('Code editor');
codeEditorLabel.click();
const editor = await screen.findByLabelText('Exported toggles');
const editor = await screen.findByLabelText('Exported feature flags');
await userEvent.type(editor, 'invalid non json');

const validateButton = screen.getByText('Validate');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const ImportArea: FC<{
}
elseShow={
<StyledTextField
label='Exported toggles'
label='Exported feature flags'
variant='outlined'
onChange={(event) => setImportPayload(event.target.value)}
value={importPayload}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function registerPrometheusMetrics(
});
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 flag is created.',
help: 'Number of times a flag 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',
Expand Down
11 changes: 6 additions & 5 deletions src/lib/openapi/spec/playground-request-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ import { sdkContextSchema } from './sdk-context-schema';

export const playgroundRequestSchema = {
$id: '#/components/schemas/playgroundRequestSchema',
description: 'Data for the playground API to evaluate toggles',
description: 'Data for the playground API to evaluate feature flags',
type: 'object',
required: ['environment', 'context'],
properties: {
environment: {
type: 'string',
example: 'development',
description: 'The environment to evaluate toggles in.',
description: 'The environment to evaluate feature flags in.',
},
projects: {
description: 'A list of projects to check for toggles in.',
description: 'A list of projects to check for feature flags in.',
oneOf: [
{
type: 'array',
items: { type: 'string' },
example: ['my-project'],
description: 'A list of projects to check for toggles in.',
description:
'A list of projects to check for feature flags in.',
},
{
type: 'string',
enum: [ALL],
description: 'Check toggles in all projects.',
description: 'Check feature flags in all projects.',
},
],
},
Expand Down
Loading