Commit da69a8a2 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'nfriend-update-tag-name-placeholder' into 'master'

Update tag name helper text on Edit Release page

See merge request gitlab-org/gitlab!47234
parents a6fd5b62 7173bb68
......@@ -29,7 +29,6 @@ export default {
'markdownDocsPath',
'markdownPreviewPath',
'releasesPagePath',
'updateReleaseApiDocsPath',
'release',
'newMilestonePath',
'manageMilestonesPath',
......
<script>
import { mapState } from 'vuex';
import { uniqueId } from 'lodash';
import { GlFormGroup, GlFormInput, GlLink, GlSprintf } from '@gitlab/ui';
import { GlFormGroup, GlFormInput } from '@gitlab/ui';
import FormFieldContainer from './form_field_container.vue';
export default {
name: 'TagFieldExisting',
components: { GlFormGroup, GlFormInput, GlSprintf, GlLink, FormFieldContainer },
components: { GlFormGroup, GlFormInput, FormFieldContainer },
computed: {
...mapState('detail', ['release', 'updateReleaseApiDocsPath']),
...mapState('detail', ['release']),
inputId() {
return uniqueId('tag-name-input-');
},
......@@ -32,19 +32,7 @@ export default {
</form-field-container>
<template #description>
<div :id="helpId" data-testid="tag-name-help">
<gl-sprintf
:message="
__(
'Changing a Release tag is only supported via Releases API. %{linkStart}More information%{linkEnd}',
)
"
>
<template #link="{ content }">
<gl-link :href="updateReleaseApiDocsPath" target="_blank">
{{ content }}
</gl-link>
</template>
</gl-sprintf>
{{ __("The tag name can't be changed for an existing release.") }}
</div>
</template>
</gl-form-group>
......
......@@ -5,7 +5,6 @@ export default ({
projectPath,
markdownDocsPath,
markdownPreviewPath,
updateReleaseApiDocsPath,
releaseAssetsDocsPath,
manageMilestonesPath,
newMilestonePath,
......@@ -20,7 +19,6 @@ export default ({
projectPath,
markdownDocsPath,
markdownPreviewPath,
updateReleaseApiDocsPath,
releaseAssetsDocsPath,
manageMilestonesPath,
newMilestonePath,
......
......@@ -65,7 +65,6 @@ module ReleasesHelper
project_path: @project.full_path,
markdown_preview_path: preview_markdown_path(@project),
markdown_docs_path: help_page_path('user/markdown'),
update_release_api_docs_path: help_page_path('api/releases/index.md', anchor: 'update-a-release'),
release_assets_docs_path: help_page(anchor: 'release-assets'),
manage_milestones_path: project_milestones_path(@project),
new_milestone_path: new_project_milestone_path(@project)
......
---
title: Update the tag name field helper text on the Edit Release page
merge_request: 47234
author:
type: changed
......@@ -5050,9 +5050,6 @@ msgstr ""
msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}."
msgstr ""
msgid "Changing a Release tag is only supported via Releases API. %{linkStart}More information%{linkEnd}"
msgstr ""
msgid "Changing group URL can have unintended side effects."
msgstr ""
......@@ -27079,6 +27076,9 @@ msgstr ""
msgid "The status of the table below only applies to the default branch and is based on the %{linkStart}latest pipeline%{linkEnd}. Once you've enabled a scan for the default branch, any subsequent feature branch you create will include the scan."
msgstr ""
msgid "The tag name can't be changed for an existing release."
msgstr ""
msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
msgstr ""
......
......@@ -24,7 +24,6 @@ describe('Release edit/new component', () => {
state = {
release,
markdownDocsPath: 'path/to/markdown/docs',
updateReleaseApiDocsPath: 'path/to/update/release/api/docs',
releasesPagePath: 'path/to/releases/page',
projectId: '8',
groupId: '42',
......
......@@ -6,7 +6,6 @@ import createStore from '~/releases/stores';
import createDetailModule from '~/releases/stores/modules/detail';
const TEST_TAG_NAME = 'test-tag-name';
const TEST_DOCS_PATH = '/help/test/docs/path';
const localVue = createLocalVue();
localVue.use(Vuex);
......@@ -24,21 +23,11 @@ describe('releases/components/tag_field_existing', () => {
const findInput = () => wrapper.find(GlFormInput);
const findHelp = () => wrapper.find('[data-testid="tag-name-help"]');
const findHelpLink = () => {
const link = findHelp().find('a');
return {
text: link.text(),
href: link.attributes('href'),
target: link.attributes('target'),
};
};
beforeEach(() => {
store = createStore({
modules: {
detail: createDetailModule({
updateReleaseApiDocsPath: TEST_DOCS_PATH,
tagName: TEST_TAG_NAME,
}),
},
......@@ -68,16 +57,8 @@ describe('releases/components/tag_field_existing', () => {
createComponent(mount);
expect(findHelp().text()).toMatchInterpolatedText(
'Changing a Release tag is only supported via Releases API. More information',
"The tag name can't be changed for an existing release.",
);
const helpLink = findHelpLink();
expect(helpLink).toEqual({
text: 'More information',
href: TEST_DOCS_PATH,
target: '_blank',
});
});
});
});
......@@ -47,7 +47,6 @@ describe('Release detail actions', () => {
releasesPagePath: 'path/to/releases/page',
markdownDocsPath: 'path/to/markdown/docs',
markdownPreviewPath: 'path/to/markdown/preview',
updateReleaseApiDocsPath: 'path/to/api/docs',
}),
...getters,
...rootState,
......
......@@ -18,7 +18,6 @@ describe('Release detail mutations', () => {
releasesPagePath: 'path/to/releases/page',
markdownDocsPath: 'path/to/markdown/docs',
markdownPreviewPath: 'path/to/markdown/preview',
updateReleaseApiDocsPath: 'path/to/api/docs',
});
release = convertObjectPropsToCamelCase(originalRelease);
});
......
......@@ -71,7 +71,6 @@ RSpec.describe ReleasesHelper do
markdown_preview_path
markdown_docs_path
releases_page_path
update_release_api_docs_path
release_assets_docs_path
manage_milestones_path
new_milestone_path)
......@@ -89,7 +88,6 @@ RSpec.describe ReleasesHelper do
releases_page_path
markdown_preview_path
markdown_docs_path
update_release_api_docs_path
release_assets_docs_path
manage_milestones_path
new_milestone_path
......
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