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

Delete unused roadmap code

parent 68f22b98
......@@ -4,7 +4,7 @@ import { mapActions } from 'vuex';
import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
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 EpicItem from './components/epic_item.vue';
......@@ -23,7 +23,6 @@ Vue.use(Translate);
export default () => {
const el = document.getElementById('js-roadmap');
const presetButtonsContainer = document.querySelector('.js-btn-roadmap-presets');
if (!el) {
return false;
......@@ -35,16 +34,6 @@ export default () => {
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('EpicItemContainer', EpicItemContainer);
......
......@@ -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 {
padding-bottom: 0;
}
......
......@@ -31,18 +31,6 @@ module EpicsHelper
opts
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)
short_format = '%b %d'
long_format = '%b %d, %Y'
......
......@@ -44,28 +44,6 @@ RSpec.describe EpicsHelper, type: :helper do
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
let(:epic) { build(:epic, start_date: start_date, end_date: end_date) }
......
......@@ -896,9 +896,6 @@ msgstr ""
msgid "%{start} to %{end}"
msgstr ""
msgid "%{state} epics"
msgstr ""
msgid "%{strongOpen}Warning:%{strongClose} SAML group links can cause GitLab to automatically remove members from groups."
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