Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4799db3b
Commit
4799db3b
authored
Jun 22, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes mermaid graphs not rendering when switching diff tabs
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/220889
parent
d0981554
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
app/assets/javascripts/behaviors/markdown/render_mermaid.js
app/assets/javascripts/behaviors/markdown/render_mermaid.js
+1
-1
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-0
changelogs/unreleased/ph-220889-fixMermaidNotRendering.yml
changelogs/unreleased/ph-220889-fixMermaidNotRendering.yml
+5
-0
No files found.
app/assets/javascripts/behaviors/markdown/render_mermaid.js
View file @
4799db3b
...
...
@@ -174,7 +174,7 @@ export default function renderMermaid($els) {
if
(
!
$els
.
length
)
return
;
const
visibleMermaids
=
$els
.
filter
(
function
filter
()
{
return
$
(
this
).
closest
(
'
details
'
).
length
===
0
;
return
$
(
this
).
closest
(
'
details
'
).
length
===
0
&&
$
(
this
).
is
(
'
:visible
'
)
;
});
renderMermaids
(
visibleMermaids
);
...
...
app/assets/javascripts/merge_request_tabs.js
View file @
4799db3b
...
...
@@ -226,6 +226,8 @@ export default class MergeRequestTabs {
this
.
resetViewContainer
();
this
.
destroyPipelinesView
();
}
$
(
'
.detail-page-description
'
).
renderGFM
();
}
else
if
(
action
===
this
.
currentAction
)
{
// ContentTop is used to handle anything at the top of the page before the main content
const
mainContentContainer
=
document
.
querySelector
(
'
.content-wrapper
'
);
...
...
changelogs/unreleased/ph-220889-fixMermaidNotRendering.yml
0 → 100644
View file @
4799db3b
---
title
:
Fixed mermaid not rendering when switching diff tabs
merge_request
:
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment