Commit 83485302 authored by David Barr's avatar David Barr

Remove release_asset_link_type feature flag

It was enabled by default in GitLab 13.1 in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33998
and no issues were seen.
parent 7d951d8d
...@@ -10,7 +10,6 @@ import { ...@@ -10,7 +10,6 @@ import {
GlFormInput, GlFormInput,
GlFormSelect, GlFormSelect,
} from '@gitlab/ui'; } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { DEFAULT_ASSET_LINK_TYPE, ASSET_LINK_TYPE } from '../constants'; import { DEFAULT_ASSET_LINK_TYPE, ASSET_LINK_TYPE } from '../constants';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
...@@ -26,7 +25,6 @@ export default { ...@@ -26,7 +25,6 @@ export default {
GlFormSelect, GlFormSelect,
}, },
directives: { GlTooltip: GlTooltipDirective }, directives: { GlTooltip: GlTooltipDirective },
mixins: [glFeatureFlagsMixin()],
computed: { computed: {
...mapState('detail', ['release', 'releaseAssetsDocsPath']), ...mapState('detail', ['release', 'releaseAssetsDocsPath']),
...mapGetters('detail', ['validationErrors']), ...mapGetters('detail', ['validationErrors']),
...@@ -195,7 +193,6 @@ export default { ...@@ -195,7 +193,6 @@ export default {
</gl-form-group> </gl-form-group>
<gl-form-group <gl-form-group
v-if="glFeatures.releaseAssetLinkType"
class="link-type-field col-auto px-sm-2" class="link-type-field col-auto px-sm-2"
:label="__('Type')" :label="__('Type')"
:label-for="`asset-type-${index}`" :label-for="`asset-type-${index}`"
......
<script> <script>
import { GlTooltipDirective, GlLink, GlButton, GlCollapse, GlIcon, GlBadge } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton, GlCollapse, GlIcon, GlBadge } from '@gitlab/ui';
import { difference, get } from 'lodash'; import { difference, get } from 'lodash';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { ASSET_LINK_TYPE } from '../constants'; import { ASSET_LINK_TYPE } from '../constants';
import { __, s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
...@@ -17,7 +16,6 @@ export default { ...@@ -17,7 +16,6 @@ export default {
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
mixins: [glFeatureFlagsMixin()],
props: { props: {
assets: { assets: {
type: Object, type: Object,
...@@ -30,9 +28,6 @@ export default { ...@@ -30,9 +28,6 @@ export default {
}; };
}, },
computed: { computed: {
hasAssets() {
return Boolean(this.assets.count);
},
imageLinks() { imageLinks() {
return this.linksForType(ASSET_LINK_TYPE.IMAGE); return this.linksForType(ASSET_LINK_TYPE.IMAGE);
}, },
...@@ -95,7 +90,6 @@ export default { ...@@ -95,7 +90,6 @@ export default {
<template> <template>
<div class="card-text gl-mt-3"> <div class="card-text gl-mt-3">
<template v-if="glFeatures.releaseAssetLinkType">
<gl-button <gl-button
data-testid="accordion-button" data-testid="accordion-button"
variant="link" variant="link"
...@@ -124,10 +118,7 @@ export default { ...@@ -124,10 +118,7 @@ export default {
:href="link.directAssetUrl || link.url" :href="link.directAssetUrl || link.url"
class="gl-display-flex gl-align-items-center gl-line-height-24" class="gl-display-flex gl-align-items-center gl-line-height-24"
> >
<gl-icon <gl-icon :name="section.iconName" class="gl-mr-2 gl-flex-shrink-0 gl-flex-grow-0" />
:name="section.iconName"
class="gl-mr-2 gl-flex-shrink-0 gl-flex-grow-0"
/>
{{ link.name }} {{ link.name }}
<gl-icon <gl-icon
v-if="link.external" v-if="link.external"
...@@ -144,45 +135,5 @@ export default { ...@@ -144,45 +135,5 @@ export default {
</template> </template>
</div> </div>
</gl-collapse> </gl-collapse>
</template>
<template v-else>
<b>
{{ __('Assets') }}
<span class="js-assets-count badge badge-pill">{{ assets.count }}</span>
</b>
<ul v-if="assets.links.length" class="pl-0 mb-0 gl-mt-3 list-unstyled js-assets-list">
<li v-for="link in assets.links" :key="link.name" class="gl-mb-3">
<gl-link v-gl-tooltip.bottom :title="__('Download asset')" :href="link.directAssetUrl">
<gl-icon name="package" class="align-middle gl-mr-2 align-text-bottom" />
{{ link.name }}
<span v-if="link.external" data-testid="external-link-indicator">{{
__('(external source)')
}}</span>
</gl-link>
</li>
</ul>
<div v-if="hasAssets" class="dropdown">
<button
type="button"
class="btn btn-link"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<gl-icon name="doc-code" class="align-top gl-mr-2" />
{{ __('Source code') }}
<gl-icon name="chevron-down" />
</button>
<div class="js-sources-dropdown dropdown-menu">
<li v-for="asset in assets.sources" :key="asset.url">
<gl-link :href="asset.url">{{ __('Download') }} {{ asset.format }}</gl-link>
</li>
</div>
</div>
</template>
</div> </div>
</template> </template>
...@@ -10,7 +10,6 @@ class Projects::ReleasesController < Projects::ApplicationController ...@@ -10,7 +10,6 @@ class Projects::ReleasesController < Projects::ApplicationController
push_frontend_feature_flag(:release_evidence_collection, project, default_enabled: true) push_frontend_feature_flag(:release_evidence_collection, project, default_enabled: true)
push_frontend_feature_flag(:release_show_page, project, default_enabled: true) push_frontend_feature_flag(:release_show_page, project, default_enabled: true)
push_frontend_feature_flag(:release_asset_link_editing, project, default_enabled: true) push_frontend_feature_flag(:release_asset_link_editing, project, default_enabled: true)
push_frontend_feature_flag(:release_asset_link_type, project, default_enabled: true)
push_frontend_feature_flag(:graphql_release_data, project, default_enabled: true) push_frontend_feature_flag(:graphql_release_data, project, default_enabled: true)
push_frontend_feature_flag(:graphql_milestone_stats, project, default_enabled: true) push_frontend_feature_flag(:graphql_milestone_stats, project, default_enabled: true)
push_frontend_feature_flag(:graphql_releases_page, project, default_enabled: true) push_frontend_feature_flag(:graphql_releases_page, project, default_enabled: true)
......
---
name: release_asset_link_type
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33643
rollout_issue_url:
group: group::release management
type: development
default_enabled: true
...@@ -953,9 +953,6 @@ msgstr "" ...@@ -953,9 +953,6 @@ msgstr ""
msgid "(deleted)" msgid "(deleted)"
msgstr "" msgstr ""
msgid "(external source)"
msgstr ""
msgid "(line: %{startLine})" msgid "(line: %{startLine})"
msgstr "" msgstr ""
...@@ -9242,9 +9239,6 @@ msgstr "" ...@@ -9242,9 +9239,6 @@ msgstr ""
msgid "Download as CSV" msgid "Download as CSV"
msgstr "" msgstr ""
msgid "Download asset"
msgstr ""
msgid "Download codes" msgid "Download codes"
msgstr "" msgstr ""
...@@ -24348,9 +24342,6 @@ msgstr "" ...@@ -24348,9 +24342,6 @@ msgstr ""
msgid "Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}" msgid "Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}"
msgstr "" msgstr ""
msgid "Source code"
msgstr ""
msgid "Source code (%{fileExtension})" msgid "Source code (%{fileExtension})"
msgstr "" msgstr ""
......
...@@ -27,7 +27,6 @@ RSpec.describe 'User views releases', :js do ...@@ -27,7 +27,6 @@ RSpec.describe 'User views releases', :js do
expect(page).not_to have_content('Upcoming Release') expect(page).not_to have_content('Upcoming Release')
end end
shared_examples 'asset link tests' do
context 'when there is a link as an asset' do context 'when there is a link as an asset' do
let!(:release_link) { create(:release_link, release: release, url: url ) } let!(:release_link) { create(:release_link, release: release, url: url ) }
let(:url) { "#{project.web_url}/-/jobs/1/artifacts/download" } let(:url) { "#{project.web_url}/-/jobs/1/artifacts/download" }
...@@ -68,23 +67,6 @@ RSpec.describe 'User views releases', :js do ...@@ -68,23 +67,6 @@ RSpec.describe 'User views releases', :js do
end end
end end
end end
end
context 'when the release_asset_link_type feature flag is enabled' do
before do
stub_feature_flags(release_asset_link_type: true)
end
it_behaves_like 'asset link tests'
end
context 'when the release_asset_link_type feature flag is disabled' do
before do
stub_feature_flags(release_asset_link_type: false)
end
it_behaves_like 'asset link tests'
end
context 'with an upcoming release' do context 'with an upcoming release' do
let(:tomorrow) { Time.zone.now + 1.day } let(:tomorrow) { Time.zone.now + 1.day }
......
...@@ -56,11 +56,6 @@ describe('Release edit component', () => { ...@@ -56,11 +56,6 @@ describe('Release edit component', () => {
wrapper = mount(AssetLinksForm, { wrapper = mount(AssetLinksForm, {
localVue, localVue,
store, store,
provide: {
glFeatures: {
releaseAssetLinkType: true,
},
},
}); });
}; };
......
...@@ -22,9 +22,6 @@ describe('Release block assets', () => { ...@@ -22,9 +22,6 @@ describe('Release block assets', () => {
const createComponent = (propsData = defaultProps) => { const createComponent = (propsData = defaultProps) => {
wrapper = mount(ReleaseBlockAssets, { wrapper = mount(ReleaseBlockAssets, {
provide: {
glFeatures: { releaseAssetLinkType: true },
},
propsData, propsData,
}); });
}; };
......
...@@ -71,50 +71,10 @@ describe('Release block', () => { ...@@ -71,50 +71,10 @@ describe('Release block', () => {
expect(wrapper.text()).toContain(timeagoMixin.methods.timeFormatted(release.releasedAt)); expect(wrapper.text()).toContain(timeagoMixin.methods.timeFormatted(release.releasedAt));
}); });
it('renders number of assets provided', () => {
expect(wrapper.find('.js-assets-count').text()).toContain(release.assets.count);
});
it('renders dropdown with the sources', () => {
expect(wrapper.findAll('.js-sources-dropdown li').length).toEqual(
release.assets.sources.length,
);
expect(wrapper.find('.js-sources-dropdown li a').attributes().href).toEqual(
release.assets.sources[0].url,
);
expect(wrapper.find('.js-sources-dropdown li a').text()).toContain(
release.assets.sources[0].format,
);
});
it('renders list with the links provided', () => {
expect(wrapper.findAll('.js-assets-list li').length).toEqual(release.assets.links.length);
expect(wrapper.find('.js-assets-list li a').attributes().href).toEqual(
release.assets.links[0].directAssetUrl,
);
expect(wrapper.find('.js-assets-list li a').text()).toContain(release.assets.links[0].name);
});
it('renders author avatar', () => { it('renders author avatar', () => {
expect(wrapper.find('.user-avatar-link').exists()).toBe(true); expect(wrapper.find('.user-avatar-link').exists()).toBe(true);
}); });
describe('external label', () => {
it('renders external label when link is external', () => {
expect(wrapper.find('.js-assets-list li a').text()).toContain('external source');
});
it('does not render external label when link is not external', () => {
expect(wrapper.find('.js-assets-list li:nth-child(3) a').text()).not.toContain(
'external source',
);
});
});
it('renders the footer', () => { it('renders the footer', () => {
expect(wrapper.find(ReleaseBlockFooter).exists()).toBe(true); expect(wrapper.find(ReleaseBlockFooter).exists()).toBe(true);
}); });
......
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