Commit a8d2dfb4 authored by Phil Hughes's avatar Phil Hughes

Added new award picker to epics

Changes the awards block on epics to be the Vue version
with this we also get the new awarder picker.

https://gitlab.com/gitlab-org/gitlab/-/issues/328235
parent 4366b711
...@@ -8,8 +8,16 @@ import '~/notes/index'; ...@@ -8,8 +8,16 @@ import '~/notes/index';
initEpicApp(); initEpicApp();
requestIdleCallback(() => { requestIdleCallback(() => {
const awardEmojiEl = document.getElementById('js-vue-awards-block');
new EpicTabs(); // eslint-disable-line no-new new EpicTabs(); // eslint-disable-line no-new
new ShortcutsEpic(); // eslint-disable-line no-new new ShortcutsEpic(); // eslint-disable-line no-new
loadAwardsHandler(); if (awardEmojiEl) {
import('~/emoji/awards_app')
.then((m) => m.default(awardEmojiEl))
.catch(() => {});
} else {
loadAwardsHandler();
}
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
}); });
...@@ -19,6 +19,7 @@ class Groups::EpicsController < Groups::ApplicationController ...@@ -19,6 +19,7 @@ class Groups::EpicsController < Groups::ApplicationController
before_action do before_action do
push_frontend_feature_flag(:vue_epics_list, @group, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:vue_epics_list, @group, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:improved_emoji_picker, @group, type: :development, default_enabled: :yaml)
end end
feature_category :epics feature_category :epics
......
...@@ -57,4 +57,10 @@ module EpicsHelper ...@@ -57,4 +57,10 @@ module EpicsHelper
s_("GroupRoadmap|No start date – %{dateWord}") % { dateWord: epic.end_date.strftime(long_format) } s_("GroupRoadmap|No start date – %{dateWord}") % { dateWord: epic.end_date.strftime(long_format) }
end end
end end
def award_emoji_epics_api_path(epic)
if Feature.enabled?(:improved_emoji_picker, epic.group, default_enabled: :yaml)
api_v4_groups_epics_award_emoji_path(id: epic.group.id, epic_iid: epic.iid)
end
end
end end
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
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, api_awards_path: award_emoji_epics_api_path(@epic)
.d-flex.flex-wrap.align-items-center.justify-content-lg-end .d-flex.flex-wrap.align-items-center.justify-content-lg-end
#js-vue-sort-issue-discussions #js-vue-sort-issue-discussions
#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),
......
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