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 { ...@@ -29,7 +29,6 @@ export default {
'markdownDocsPath', 'markdownDocsPath',
'markdownPreviewPath', 'markdownPreviewPath',
'releasesPagePath', 'releasesPagePath',
'updateReleaseApiDocsPath',
'release', 'release',
'newMilestonePath', 'newMilestonePath',
'manageMilestonesPath', 'manageMilestonesPath',
......
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { uniqueId } from 'lodash'; 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'; import FormFieldContainer from './form_field_container.vue';
export default { export default {
name: 'TagFieldExisting', name: 'TagFieldExisting',
components: { GlFormGroup, GlFormInput, GlSprintf, GlLink, FormFieldContainer }, components: { GlFormGroup, GlFormInput, FormFieldContainer },
computed: { computed: {
...mapState('detail', ['release', 'updateReleaseApiDocsPath']), ...mapState('detail', ['release']),
inputId() { inputId() {
return uniqueId('tag-name-input-'); return uniqueId('tag-name-input-');
}, },
...@@ -32,19 +32,7 @@ export default { ...@@ -32,19 +32,7 @@ export default {
</form-field-container> </form-field-container>
<template #description> <template #description>
<div :id="helpId" data-testid="tag-name-help"> <div :id="helpId" data-testid="tag-name-help">
<gl-sprintf {{ __("The tag name can't be changed for an existing release.") }}
: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>
</div> </div>
</template> </template>
</gl-form-group> </gl-form-group>
......
...@@ -5,7 +5,6 @@ export default ({ ...@@ -5,7 +5,6 @@ export default ({
projectPath, projectPath,
markdownDocsPath, markdownDocsPath,
markdownPreviewPath, markdownPreviewPath,
updateReleaseApiDocsPath,
releaseAssetsDocsPath, releaseAssetsDocsPath,
manageMilestonesPath, manageMilestonesPath,
newMilestonePath, newMilestonePath,
...@@ -20,7 +19,6 @@ export default ({ ...@@ -20,7 +19,6 @@ export default ({
projectPath, projectPath,
markdownDocsPath, markdownDocsPath,
markdownPreviewPath, markdownPreviewPath,
updateReleaseApiDocsPath,
releaseAssetsDocsPath, releaseAssetsDocsPath,
manageMilestonesPath, manageMilestonesPath,
newMilestonePath, newMilestonePath,
......
...@@ -65,7 +65,6 @@ module ReleasesHelper ...@@ -65,7 +65,6 @@ module ReleasesHelper
project_path: @project.full_path, project_path: @project.full_path,
markdown_preview_path: preview_markdown_path(@project), markdown_preview_path: preview_markdown_path(@project),
markdown_docs_path: help_page_path('user/markdown'), 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'), release_assets_docs_path: help_page(anchor: 'release-assets'),
manage_milestones_path: project_milestones_path(@project), manage_milestones_path: project_milestones_path(@project),
new_milestone_path: new_project_milestone_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 "" ...@@ -5050,9 +5050,6 @@ msgstr ""
msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}." msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}."
msgstr "" 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." msgid "Changing group URL can have unintended side effects."
msgstr "" msgstr ""
...@@ -27079,6 +27076,9 @@ 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." 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 "" 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." 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 "" msgstr ""
......
...@@ -24,7 +24,6 @@ describe('Release edit/new component', () => { ...@@ -24,7 +24,6 @@ describe('Release edit/new component', () => {
state = { state = {
release, release,
markdownDocsPath: 'path/to/markdown/docs', markdownDocsPath: 'path/to/markdown/docs',
updateReleaseApiDocsPath: 'path/to/update/release/api/docs',
releasesPagePath: 'path/to/releases/page', releasesPagePath: 'path/to/releases/page',
projectId: '8', projectId: '8',
groupId: '42', groupId: '42',
......
...@@ -6,7 +6,6 @@ import createStore from '~/releases/stores'; ...@@ -6,7 +6,6 @@ import createStore from '~/releases/stores';
import createDetailModule from '~/releases/stores/modules/detail'; import createDetailModule from '~/releases/stores/modules/detail';
const TEST_TAG_NAME = 'test-tag-name'; const TEST_TAG_NAME = 'test-tag-name';
const TEST_DOCS_PATH = '/help/test/docs/path';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
...@@ -24,21 +23,11 @@ describe('releases/components/tag_field_existing', () => { ...@@ -24,21 +23,11 @@ describe('releases/components/tag_field_existing', () => {
const findInput = () => wrapper.find(GlFormInput); const findInput = () => wrapper.find(GlFormInput);
const findHelp = () => wrapper.find('[data-testid="tag-name-help"]'); 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(() => { beforeEach(() => {
store = createStore({ store = createStore({
modules: { modules: {
detail: createDetailModule({ detail: createDetailModule({
updateReleaseApiDocsPath: TEST_DOCS_PATH,
tagName: TEST_TAG_NAME, tagName: TEST_TAG_NAME,
}), }),
}, },
...@@ -68,16 +57,8 @@ describe('releases/components/tag_field_existing', () => { ...@@ -68,16 +57,8 @@ describe('releases/components/tag_field_existing', () => {
createComponent(mount); createComponent(mount);
expect(findHelp().text()).toMatchInterpolatedText( 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', () => { ...@@ -47,7 +47,6 @@ describe('Release detail actions', () => {
releasesPagePath: 'path/to/releases/page', releasesPagePath: 'path/to/releases/page',
markdownDocsPath: 'path/to/markdown/docs', markdownDocsPath: 'path/to/markdown/docs',
markdownPreviewPath: 'path/to/markdown/preview', markdownPreviewPath: 'path/to/markdown/preview',
updateReleaseApiDocsPath: 'path/to/api/docs',
}), }),
...getters, ...getters,
...rootState, ...rootState,
......
...@@ -18,7 +18,6 @@ describe('Release detail mutations', () => { ...@@ -18,7 +18,6 @@ describe('Release detail mutations', () => {
releasesPagePath: 'path/to/releases/page', releasesPagePath: 'path/to/releases/page',
markdownDocsPath: 'path/to/markdown/docs', markdownDocsPath: 'path/to/markdown/docs',
markdownPreviewPath: 'path/to/markdown/preview', markdownPreviewPath: 'path/to/markdown/preview',
updateReleaseApiDocsPath: 'path/to/api/docs',
}); });
release = convertObjectPropsToCamelCase(originalRelease); release = convertObjectPropsToCamelCase(originalRelease);
}); });
......
...@@ -71,7 +71,6 @@ RSpec.describe ReleasesHelper do ...@@ -71,7 +71,6 @@ RSpec.describe ReleasesHelper do
markdown_preview_path markdown_preview_path
markdown_docs_path markdown_docs_path
releases_page_path releases_page_path
update_release_api_docs_path
release_assets_docs_path release_assets_docs_path
manage_milestones_path manage_milestones_path
new_milestone_path) new_milestone_path)
...@@ -89,7 +88,6 @@ RSpec.describe ReleasesHelper do ...@@ -89,7 +88,6 @@ RSpec.describe ReleasesHelper do
releases_page_path releases_page_path
markdown_preview_path markdown_preview_path
markdown_docs_path markdown_docs_path
update_release_api_docs_path
release_assets_docs_path release_assets_docs_path
manage_milestones_path manage_milestones_path
new_milestone_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