Commit c15e66a6 authored by Amy Troschinetz's avatar Amy Troschinetz

Updates copy for feature flag user lists

**app/assets/javascripts/feature_flags/components/
feature_flags.vue:**
**app/assets/javascripts/feature_flags/components/
feature_flags_tab.vue:**

Custom empty tile description.

**locale/gitlab.pot:**
**spec/frontend/feature_flags/components/feature_flags_tab_spec.js:**

Updated.

**changelogs/unreleased/update-copy-on-user-lists-empty-state.yml:**

Changelog.
parent a5f940c9
...@@ -7,7 +7,6 @@ import { FEATURE_FLAG_SCOPE, USER_LIST_SCOPE } from '../constants'; ...@@ -7,7 +7,6 @@ import { FEATURE_FLAG_SCOPE, USER_LIST_SCOPE } from '../constants';
import FeatureFlagsTab from './feature_flags_tab.vue'; import FeatureFlagsTab from './feature_flags_tab.vue';
import FeatureFlagsTable from './feature_flags_table.vue'; import FeatureFlagsTable from './feature_flags_table.vue';
import UserListsTable from './user_lists_table.vue'; import UserListsTable from './user_lists_table.vue';
import { s__ } from '~/locale';
import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue'; import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue';
import { import {
buildUrlWithCurrentLocation, buildUrlWithCurrentLocation,
...@@ -96,9 +95,6 @@ export default { ...@@ -96,9 +95,6 @@ export default {
hasNewPath() { hasNewPath() {
return !isEmpty(this.newFeatureFlagPath); return !isEmpty(this.newFeatureFlagPath);
}, },
emptyStateTitle() {
return s__('FeatureFlags|Get started with feature flags');
},
}, },
created() { created() {
this.setFeatureFlagsOptions({ scope: this.scope, page: this.page }); this.setFeatureFlagsOptions({ scope: this.scope, page: this.page });
...@@ -246,7 +242,12 @@ export default { ...@@ -246,7 +242,12 @@ export default {
:error-state="shouldRenderErrorState" :error-state="shouldRenderErrorState"
:error-title="s__(`FeatureFlags|There was an error fetching the feature flags.`)" :error-title="s__(`FeatureFlags|There was an error fetching the feature flags.`)"
:empty-state="shouldShowEmptyState" :empty-state="shouldShowEmptyState"
:empty-title="emptyStateTitle" :empty-title="s__('FeatureFlags|Get started with feature flags')"
:empty-description="
s__(
'FeatureFlags|Feature flags allow you to configure your code into different flavors by dynamically toggling certain functionality.',
)
"
data-testid="feature-flags-tab" data-testid="feature-flags-tab"
@dismissAlert="clearAlert" @dismissAlert="clearAlert"
@changeTab="onFeatureFlagsTab" @changeTab="onFeatureFlagsTab"
...@@ -266,7 +267,12 @@ export default { ...@@ -266,7 +267,12 @@ export default {
:error-state="shouldRenderErrorState" :error-state="shouldRenderErrorState"
:error-title="s__(`FeatureFlags|There was an error fetching the user lists.`)" :error-title="s__(`FeatureFlags|There was an error fetching the user lists.`)"
:empty-state="shouldShowEmptyState" :empty-state="shouldShowEmptyState"
:empty-title="emptyStateTitle" :empty-title="s__('FeatureFlags|Get started with user lists')"
:empty-description="
s__(
'FeatureFlags|User lists allow you to define a set of users to use with Feature Flags.',
)
"
data-testid="user-lists-tab" data-testid="user-lists-tab"
@dismissAlert="clearAlert" @dismissAlert="clearAlert"
@changeTab="onUserListsTab" @changeTab="onUserListsTab"
......
...@@ -41,6 +41,10 @@ export default { ...@@ -41,6 +41,10 @@ export default {
required: true, required: true,
type: String, type: String,
}, },
emptyDescription: {
required: true,
type: String,
},
}, },
inject: ['errorStateSvgPath', 'featureFlagsHelpPagePath'], inject: ['errorStateSvgPath', 'featureFlagsHelpPagePath'],
computed: { computed: {
...@@ -92,11 +96,7 @@ export default { ...@@ -92,11 +96,7 @@ export default {
data-testid="empty-state" data-testid="empty-state"
> >
<template #description> <template #description>
{{ {{ emptyDescription }}
s__(
'FeatureFlags|Feature flags allow you to configure your code into different flavors by dynamically toggling certain functionality.',
)
}}
<gl-link :href="featureFlagsHelpPagePath" target="_blank"> <gl-link :href="featureFlagsHelpPagePath" target="_blank">
{{ s__('FeatureFlags|More information') }} {{ s__('FeatureFlags|More information') }}
</gl-link> </gl-link>
......
---
title: Updates the copy on empty users list tabs
merge_request: 49642
author:
type: changed
...@@ -11852,6 +11852,9 @@ msgstr "" ...@@ -11852,6 +11852,9 @@ msgstr ""
msgid "FeatureFlags|Get started with feature flags" msgid "FeatureFlags|Get started with feature flags"
msgstr "" msgstr ""
msgid "FeatureFlags|Get started with user lists"
msgstr ""
msgid "FeatureFlags|GitLab is moving to a new way of managing feature flags, and in 13.4, this feature flag will become read-only. Please create a new feature flag." msgid "FeatureFlags|GitLab is moving to a new way of managing feature flags, and in 13.4, this feature flag will become read-only. Please create a new feature flag."
msgstr "" msgstr ""
...@@ -11966,6 +11969,9 @@ msgstr "" ...@@ -11966,6 +11969,9 @@ msgstr ""
msgid "FeatureFlags|User Lists" msgid "FeatureFlags|User Lists"
msgstr "" msgstr ""
msgid "FeatureFlags|User lists allow you to define a set of users to use with Feature Flags."
msgstr ""
msgid "FeatureFlag|Percentage" msgid "FeatureFlag|Percentage"
msgstr "" msgstr ""
......
...@@ -12,6 +12,7 @@ const DEFAULT_PROPS = { ...@@ -12,6 +12,7 @@ const DEFAULT_PROPS = {
errorTitle: 'test title', errorTitle: 'test title',
emptyState: true, emptyState: true,
emptyTitle: 'test empty', emptyTitle: 'test empty',
emptyDescription: 'empty description',
}; };
const DEFAULT_PROVIDE = { const DEFAULT_PROVIDE = {
...@@ -115,9 +116,7 @@ describe('feature_flags/components/feature_flags_tab.vue', () => { ...@@ -115,9 +116,7 @@ describe('feature_flags/components/feature_flags_tab.vue', () => {
it('should show an empty state if it is empty', () => { it('should show an empty state if it is empty', () => {
expect(emptyState.text()).toContain(DEFAULT_PROPS.emptyTitle); expect(emptyState.text()).toContain(DEFAULT_PROPS.emptyTitle);
expect(emptyState.text()).toContain( expect(emptyState.text()).toContain(DEFAULT_PROPS.emptyDescription);
'Feature flags allow you to configure your code into different flavors by dynamically toggling certain functionality.',
);
expect(emptyState.props('svgPath')).toBe(DEFAULT_PROVIDE.errorStateSvgPath); expect(emptyState.props('svgPath')).toBe(DEFAULT_PROVIDE.errorStateSvgPath);
expect(emptyStateLink.attributes('href')).toBe(DEFAULT_PROVIDE.featureFlagsHelpPagePath); expect(emptyStateLink.attributes('href')).toBe(DEFAULT_PROVIDE.featureFlagsHelpPagePath);
expect(emptyStateLink.text()).toBe('More information'); expect(emptyStateLink.text()).toBe('More information');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment