Commit 04393efc authored by Coung Ngo's avatar Coung Ngo

Delete unused roadmap code

parent 68f22b98
...@@ -4,7 +4,7 @@ import { mapActions } from 'vuex'; ...@@ -4,7 +4,7 @@ import { mapActions } from 'vuex';
import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import createDefaultClient from '~/lib/graphql'; import createDefaultClient from '~/lib/graphql';
import { visitUrl, mergeUrlParams, queryToObject } from '~/lib/utils/url_utility'; import { queryToObject } from '~/lib/utils/url_utility';
import Translate from '~/vue_shared/translate'; import Translate from '~/vue_shared/translate';
import EpicItem from './components/epic_item.vue'; import EpicItem from './components/epic_item.vue';
...@@ -23,7 +23,6 @@ Vue.use(Translate); ...@@ -23,7 +23,6 @@ Vue.use(Translate);
export default () => { export default () => {
const el = document.getElementById('js-roadmap'); const el = document.getElementById('js-roadmap');
const presetButtonsContainer = document.querySelector('.js-btn-roadmap-presets');
if (!el) { if (!el) {
return false; return false;
...@@ -35,16 +34,6 @@ export default () => { ...@@ -35,16 +34,6 @@ export default () => {
defaultClient, defaultClient,
}); });
// This event handler is to be removed in 11.1 once
// we allow user to save selected preset in db
if (presetButtonsContainer) {
presetButtonsContainer.addEventListener('click', (e) => {
const presetType = e.target.querySelector('input[name="presetType"]').value;
visitUrl(mergeUrlParams({ layout: presetType }, window.location.href));
});
}
Vue.component('EpicItem', EpicItem); Vue.component('EpicItem', EpicItem);
Vue.component('EpicItemContainer', EpicItemContainer); Vue.component('EpicItemContainer', EpicItemContainer);
......
...@@ -97,14 +97,6 @@ html.group-epics-roadmap-html { ...@@ -97,14 +97,6 @@ html.group-epics-roadmap-html {
} }
} }
.epics-roadmap-filters {
.epics-details-filters {
.btn-roadmap-preset {
padding: 7px $gl-btn-padding;
}
}
}
.group-epics-roadmap-wrapper { .group-epics-roadmap-wrapper {
padding-bottom: 0; padding-bottom: 0;
} }
......
...@@ -31,18 +31,6 @@ module EpicsHelper ...@@ -31,18 +31,6 @@ module EpicsHelper
opts opts
end end
def epic_state_dropdown_link(state, selected_state)
link_to epic_state_title(state), page_filter_path(state: state), class: state == selected_state ? 'is-active' : ''
end
def epic_state_title(state)
titles = {
"opened" => "Open"
}
_("%{state} epics") % { state: (titles[state.to_s] || state.to_s.humanize) }
end
def epic_timeframe(epic) def epic_timeframe(epic)
short_format = '%b %d' short_format = '%b %d'
long_format = '%b %d, %Y' long_format = '%b %d, %Y'
......
...@@ -44,28 +44,6 @@ RSpec.describe EpicsHelper, type: :helper do ...@@ -44,28 +44,6 @@ RSpec.describe EpicsHelper, type: :helper do
end end
end end
describe '#epic_state_dropdown_link' do
it 'returns the active link when selected state is same as the link' do
expect(helper.epic_state_dropdown_link(:opened, :opened))
.to eq('<a class="is-active" href="?state=opened">Open epics</a>')
end
it 'returns the non-active link when selected state is different from the link' do
expect(helper.epic_state_dropdown_link(:opened, :closed))
.to eq('<a class="" href="?state=opened">Open epics</a>')
end
end
describe '#epic_state_title' do
it 'returns "Open" when the state is opened' do
expect(epic_state_title(:opened)).to eq('Open epics')
end
it 'returns humanized string when the state is other than opened' do
expect(epic_state_title(:some_other_state)).to eq('Some other state epics')
end
end
describe '#epic_timeframe' do describe '#epic_timeframe' do
let(:epic) { build(:epic, start_date: start_date, end_date: end_date) } let(:epic) { build(:epic, start_date: start_date, end_date: end_date) }
......
...@@ -896,9 +896,6 @@ msgstr "" ...@@ -896,9 +896,6 @@ msgstr ""
msgid "%{start} to %{end}" msgid "%{start} to %{end}"
msgstr "" msgstr ""
msgid "%{state} epics"
msgstr ""
msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups." msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups."
msgstr "" msgstr ""
......
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