Commit 597b26ee authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '325433-fix-extra-margin-about-issue-index-navigation' into 'master'

Remove extra margin above issue navigation tabs

See merge request gitlab-org/gitlab!60824
parents a11ba6a9 069959ac
...@@ -59,9 +59,6 @@ export default { ...@@ -59,9 +59,6 @@ export default {
shouldShowInProgressAlert: isInProgress(project.jiraImportStatus), shouldShowInProgressAlert: isInProgress(project.jiraImportStatus),
}; };
}, },
skip() {
return !this.isJiraConfigured || !this.canEdit;
},
}, },
}, },
computed: { computed: {
...@@ -75,6 +72,9 @@ export default { ...@@ -75,6 +72,9 @@ export default {
labelTarget() { labelTarget() {
return `${this.issuesPath}?label_name[]=${encodeURIComponent(this.jiraImport.label.title)}`; return `${this.issuesPath}?label_name[]=${encodeURIComponent(this.jiraImport.label.title)}`;
}, },
shouldRender() {
return this.jiraImport.shouldShowInProgressAlert || this.jiraImport.shouldShowFinishedAlert;
},
}, },
methods: { methods: {
hideFinishedAlert() { hideFinishedAlert() {
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
</script> </script>
<template> <template>
<div class="gl-my-5"> <div v-if="shouldRender" class="gl-my-5">
<gl-alert v-if="jiraImport.shouldShowInProgressAlert" @dismiss="hideInProgressAlert"> <gl-alert v-if="jiraImport.shouldShowInProgressAlert" @dismiss="hideInProgressAlert">
{{ __('Import in progress. Refresh page to see newly added issues.') }} {{ __('Import in progress. Refresh page to see newly added issues.') }}
</gl-alert> </gl-alert>
......
...@@ -13,6 +13,14 @@ export function mountJiraIssuesListApp() { ...@@ -13,6 +13,14 @@ export function mountJiraIssuesListApp() {
return false; return false;
} }
const { issuesPath, projectPath } = el.dataset;
const canEdit = parseBoolean(el.dataset.canEdit);
const isJiraConfigured = parseBoolean(el.dataset.isJiraConfigured);
if (!isJiraConfigured || !canEdit) {
return false;
}
Vue.use(VueApollo); Vue.use(VueApollo);
const defaultClient = createDefaultClient(); const defaultClient = createDefaultClient();
...@@ -26,10 +34,10 @@ export function mountJiraIssuesListApp() { ...@@ -26,10 +34,10 @@ export function mountJiraIssuesListApp() {
render(createComponent) { render(createComponent) {
return createComponent(JiraIssuesImportStatusRoot, { return createComponent(JiraIssuesImportStatusRoot, {
props: { props: {
canEdit: parseBoolean(el.dataset.canEdit), canEdit,
isJiraConfigured: parseBoolean(el.dataset.isJiraConfigured), isJiraConfigured,
issuesPath: el.dataset.issuesPath, issuesPath,
projectPath: el.dataset.projectPath, projectPath,
}, },
}); });
}, },
......
...@@ -43,10 +43,12 @@ describe('JiraIssuesImportStatus', () => { ...@@ -43,10 +43,12 @@ describe('JiraIssuesImportStatus', () => {
wrapper = null; wrapper = null;
}); });
describe('when Jira import is not in progress', () => { describe('when Jira import is neither in progress nor finished', () => {
it('does not show an alert', () => { beforeEach(() => {
wrapper = mountComponent(); wrapper = mountComponent();
});
it('does not show an alert', () => {
expect(wrapper.find(GlAlert).exists()).toBe(false); expect(wrapper.find(GlAlert).exists()).toBe(false);
}); });
}); });
......
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