diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 18:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 18:09:10 +0300 |
commit | 6997e3f3d0a714bc67df268989fb089c943330cc (patch) | |
tree | 3749fb3865297df1689624b071d5d80e7783471b /app/assets/javascripts/issues | |
parent | 7ad82cd5d78a4d2c53512cbd1c2584be753f3646 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issues')
-rw-r--r-- | app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue b/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue index ea0e15adfed..cf750176fce 100644 --- a/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue +++ b/app/assets/javascripts/issues/show/components/incidents/incident_tabs.vue @@ -65,17 +65,26 @@ export default { Tracking.event(category, action); }, handleTabChange(tabIndex) { + /** + * TODO: Implement a solution that does not violate Vue principles in using + * DOM manipulation directly (#361618) + */ const parent = document.querySelector('.js-issue-details'); if (parent !== null) { const itemsToHide = parent.querySelectorAll('.js-issue-widgets'); const lineSeparator = parent.querySelector('.js-detail-page-description'); + const editButton = document.querySelector('.js-issuable-edit'); + const isSummaryTab = tabIndex === 0; - lineSeparator.classList.toggle('gl-border-b-0', tabIndex > 0); + lineSeparator.classList.toggle('gl-border-b-0', !isSummaryTab); itemsToHide.forEach(function hide(item) { - item.classList.toggle('gl-display-none', tabIndex > 0); + item.classList.toggle('gl-display-none', !isSummaryTab); }); + + editButton.classList.toggle('gl-display-none', !isSummaryTab); + editButton.classList.toggle('gl-sm-display-inline-flex!', isSummaryTab); } }, }, |