Commit e3b83f06 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '32685-remove-epics-tree-feature-flag' into 'master'

Make Epics Tree default by removing feature flag check

Closes #32685

See merge request gitlab-org/gitlab!19812
parents 48bce637 5eb65af4
---
title: Show Tree UI containing child Epics and Issues within an Epic
merge_request: 19812
author:
type: added
...@@ -21,8 +21,6 @@ export default { ...@@ -21,8 +21,6 @@ export default {
...mapState([ ...mapState([
'endpoint', 'endpoint',
'updateEndpoint', 'updateEndpoint',
'epicLinksEndpoint',
'issueLinksEndpoint',
'groupPath', 'groupPath',
'markdownPreviewPath', 'markdownPreviewPath',
'markdownDocsPath', 'markdownDocsPath',
...@@ -37,9 +35,6 @@ export default { ...@@ -37,9 +35,6 @@ export default {
'sidebarCollapsed', 'sidebarCollapsed',
]), ]),
...mapGetters(['isUserSignedIn']), ...mapGetters(['isUserSignedIn']),
isEpicTreeEnabled() {
return gon.features && gon.features.epicTrees;
},
isVueIssuableEpicSidebarEnabled() { isVueIssuableEpicSidebarEnabled() {
return gon.features && gon.features.vueIssuableEpicSidebar; return gon.features && gon.features.vueIssuableEpicSidebar;
}, },
...@@ -69,33 +64,11 @@ export default { ...@@ -69,33 +64,11 @@ export default {
:initial-description-text="initialDescriptionText" :initial-description-text="initialDescriptionText"
:show-inline-edit-button="true" :show-inline-edit-button="true"
:enable-autocomplete="true" :enable-autocomplete="true"
project-namespace="" project-namespace
issuable-ref="" issuable-ref
issuable-type="epic" issuable-type="epic"
/> />
</div> </div>
<related-items
v-if="!isEpicTreeEnabled"
:endpoint="epicLinksEndpoint"
:can-admin="canAdmin"
:can-reorder="canAdmin"
:allow-auto-complete="false"
:path-id-separator="$options.PathIdSeparator.Epic"
:title="__('Epics')"
issuable-type="epic"
css-class="js-related-epics-block"
/>
<related-items
v-if="!isEpicTreeEnabled"
:endpoint="issueLinksEndpoint"
:can-admin="canAdmin"
:can-reorder="canAdmin"
:allow-auto-complete="false"
:title="__('Issues')"
issuable-type="issue"
css-class="js-related-issues-block"
path-id-separator="#"
/>
<issuable-sidebar <issuable-sidebar
v-if="isVueIssuableEpicSidebarEnabled" v-if="isVueIssuableEpicSidebarEnabled"
:signed-in="isUserSignedIn" :signed-in="isUserSignedIn"
......
...@@ -9,41 +9,22 @@ export default class EpicTabs { ...@@ -9,41 +9,22 @@ export default class EpicTabs {
this.epicTabs = this.wrapper.querySelector('.js-epic-tabs-container'); this.epicTabs = this.wrapper.querySelector('.js-epic-tabs-container');
this.discussionFilterContainer = this.epicTabs.querySelector('.js-discussion-filter-container'); this.discussionFilterContainer = this.epicTabs.querySelector('.js-discussion-filter-container');
if (this.epicTreesEnabled) {
initRelatedItemsTree(); initRelatedItemsTree();
}
this.treeTabLoaded = this.epicTreesEnabled;
this.roadmapTabLoaded = false; this.roadmapTabLoaded = false;
this.bindEvents(); this.bindEvents();
} }
bindEvents() { bindEvents() {
const $treeTab = $('#tree-tab', this.epicTabs);
const $roadmapTab = $('#roadmap-tab', this.epicTabs); const $roadmapTab = $('#roadmap-tab', this.epicTabs);
$treeTab.on('show.bs.tab', this.onTreeShow.bind(this));
$treeTab.on('hide.bs.tab', this.onTreeHide.bind(this));
$roadmapTab.on('show.bs.tab', this.onRoadmapShow.bind(this)); $roadmapTab.on('show.bs.tab', this.onRoadmapShow.bind(this));
$roadmapTab.on('hide.bs.tab', this.onRoadmapHide.bind(this)); $roadmapTab.on('hide.bs.tab', this.onRoadmapHide.bind(this));
} }
onTreeShow() {
if (!this.epicTreesEnabled) this.discussionFilterContainer.classList.add('hidden');
if (!this.treeTabLoaded) {
initRelatedItemsTree();
this.treeTabLoaded = true;
}
}
onTreeHide() {
if (!this.epicTreesEnabled) this.discussionFilterContainer.classList.remove('hidden');
}
onRoadmapShow() { onRoadmapShow() {
this.wrapper.classList.remove('container-limited'); this.wrapper.classList.remove('container-limited');
if (!this.epicTreesEnabled) this.discussionFilterContainer.classList.add('hidden');
if (!this.roadmapTabLoaded) { if (!this.roadmapTabLoaded) {
initRoadmap(); initRoadmap();
this.roadmapTabLoaded = true; this.roadmapTabLoaded = true;
...@@ -52,6 +33,5 @@ export default class EpicTabs { ...@@ -52,6 +33,5 @@ export default class EpicTabs {
onRoadmapHide() { onRoadmapHide() {
this.wrapper.classList.add('container-limited'); this.wrapper.classList.add('container-limited');
if (!this.epicTreesEnabled) this.discussionFilterContainer.classList.remove('hidden');
} }
} }
...@@ -3,8 +3,6 @@ export default () => ({ ...@@ -3,8 +3,6 @@ export default () => ({
endpoint: '', endpoint: '',
updateEndpoint: '', updateEndpoint: '',
epicLinksEndpoint: '',
issueLinksEndpoint: '',
groupPath: '', groupPath: '',
markdownPreviewPath: '', markdownPreviewPath: '',
labelsPath: '', labelsPath: '',
......
...@@ -16,7 +16,6 @@ class Groups::EpicsController < Groups::ApplicationController ...@@ -16,7 +16,6 @@ class Groups::EpicsController < Groups::ApplicationController
before_action :verify_group_bulk_edit_enabled!, only: [:bulk_update] before_action :verify_group_bulk_edit_enabled!, only: [:bulk_update]
before_action do before_action do
push_frontend_feature_flag(:epic_trees, @group)
push_frontend_feature_flag(:roadmap_graphql, @group) push_frontend_feature_flag(:roadmap_graphql, @group)
push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group) push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group)
push_frontend_feature_flag(:epic_new_issue, @group) push_frontend_feature_flag(:epic_new_issue, @group)
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
#epic-app-root{ data: epic_show_app_data(@epic) } #epic-app-root{ data: epic_show_app_data(@epic) }
- if Feature.enabled?(:epic_trees, @group) .epic-tabs-holder
.epic-tabs-holder
.epic-tabs-container.js-epic-tabs-container .epic-tabs-container.js-epic-tabs-container
%ul.epic-tabs.nav-tabs.nav.nav-links.scrolling-tabs %ul.epic-tabs.nav-tabs.nav.nav-links.scrolling-tabs
%li.tree-tab %li.tree-tab
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
%a#roadmap-tab{ href: '#roadmap', data: { toggle: 'tab' } } %a#roadmap-tab{ href: '#roadmap', data: { toggle: 'tab' } }
= _('Roadmap') = _('Roadmap')
.tab-content.epic-tabs-content.js-epic-tabs-content .tab-content.epic-tabs-content.js-epic-tabs-content
#tree.tab-pane.show.active #tree.tab-pane.show.active
.row .row
%section.col-md-12 %section.col-md-12
...@@ -50,54 +49,14 @@ ...@@ -50,54 +49,14 @@
sorted_by: roadmap_sort_order, sorted_by: roadmap_sort_order,
inner_height: '600', inner_height: '600',
child_epics: 'true' } } child_epics: 'true' } }
%hr.epic-discussion-separator.mt-1.mb-0 %hr.epic-discussion-separator.mt-1.mb-0
.d-flex.justify-content-between.content-block.content-block-small.emoji-list-container.js-noteable-awards .d-flex.justify-content-between.content-block.content-block-small.emoji-list-container.js-noteable-awards
= render 'award_emoji/awards_block', awardable: @epic, inline: true = render 'award_emoji/awards_block', awardable: @epic, inline: true
.d-flex.flex-wrap.align-items-center.justify-content-lg-end .d-flex.flex-wrap.align-items-center.justify-content-lg-end
#js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@epic), #js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@epic),
notes_filters: UserPreference.notes_filters.to_json } } notes_filters: UserPreference.notes_filters.to_json } }
.row .row
%section.col-md-12
%script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe
.issuable-discussion
= render 'discussion'
- else # Everything below will go away once we remove this feature flag
.content-block.content-block-small.emoji-list-container.js-noteable-awards
= render 'award_emoji/awards_block', awardable: @epic, inline: true
.epic-tabs-holder
.epic-tabs-container.js-epic-tabs-container
%ul.epic-tabs.nav-tabs.nav.nav-links.scrolling-tabs
%li.notes-tab.qa-notes-tab
%a#discussion-tab.active{ href: '#discussion', data: { toggle: 'tab' } }
= _('Discussion')
%span.badge.badge-pill= @epic.notes.user.count
%li.roadmap-tab
%a#roadmap-tab{ href: '#roadmap', data: { toggle: 'tab' } }
= _('Roadmap')
.d-flex.flex-wrap.align-items-center.justify-content-lg-end
#js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@epic),
notes_filters: UserPreference.notes_filters.to_json } }
.tab-content.epic-tabs-content.js-epic-tabs-content
#discussion.tab-pane.show.active
.row
%section.col-md-12 %section.col-md-12
%script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe %script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe
.issuable-discussion .issuable-discussion
= render 'discussion' = render 'discussion'
#roadmap.tab-pane
.row
%section.col-md-12
#js-roadmap{ data: { epics_path: group_epics_path(@group, parent_id: @epic.id, format: :json),
group_id: @group.id,
iid: @epic.iid,
full_path: @group.full_path,
empty_state_illustration: image_path('illustrations/epics/roadmap.svg'),
has_filters_applied: 'false',
new_epic_endpoint: group_epics_path(@group),
preset_type: roadmap_layout,
epics_state: 'all',
sorted_by: roadmap_sort_order,
inner_height: '600',
child_epics: 'true' } }
...@@ -50,28 +50,5 @@ describe('EpicBodyComponent', () => { ...@@ -50,28 +50,5 @@ describe('EpicBodyComponent', () => {
expect(vm.$el.querySelector('.title-container')).not.toBeNull(); expect(vm.$el.querySelector('.title-container')).not.toBeNull();
expect(vm.$el.querySelector('.description')).not.toBeNull(); expect(vm.$el.querySelector('.description')).not.toBeNull();
}); });
it('renders related epics list elements', () => {
const relatedEpicsEl = vm.$el.querySelector('.js-related-epics-block');
expect(relatedEpicsEl).not.toBeNull();
expect(relatedEpicsEl.querySelector('.card-title').innerText.trim()).toContain('Epics');
expect(relatedEpicsEl.querySelector('.js-related-issues-header-issue-count')).not.toBeNull();
expect(relatedEpicsEl.querySelector('button.js-issue-count-badge-add-button')).not.toBeNull();
expect(relatedEpicsEl.querySelector('.related-items-list')).toBeNull();
});
it('renders related issues list elements', () => {
const relatedIssuesEl = vm.$el.querySelector('.js-related-issues-block');
expect(relatedIssuesEl).not.toBeNull();
expect(relatedIssuesEl.querySelector('.card-title').innerText.trim()).toContain('Issues');
expect(relatedIssuesEl.querySelector('.js-related-issues-header-issue-count')).not.toBeNull();
expect(
relatedIssuesEl.querySelector('button.js-issue-count-badge-add-button'),
).not.toBeNull();
expect(relatedIssuesEl.querySelector('.related-items-list')).toBeNull();
});
}); });
}); });
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