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
52d22870
Commit
52d22870
authored
Jun 18, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for TBT metric
parent
716cff62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
app/assets/javascripts/diffs/components/diff_file.vue
app/assets/javascripts/diffs/components/diff_file.vue
+8
-0
app/assets/javascripts/diffs/components/pre_renderer.vue
app/assets/javascripts/diffs/components/pre_renderer.vue
+3
-1
No files found.
app/assets/javascripts/diffs/components/diff_file.vue
View file @
52d22870
...
...
@@ -161,6 +161,8 @@ export default {
watch
:
{
'
file.id
'
:
{
handler
:
function
fileIdHandler
()
{
if
(
this
.
preRender
)
return
;
this
.
manageViewedEffects
();
},
},
...
...
@@ -192,10 +194,14 @@ export default {
},
},
created
()
{
if
(
this
.
preRender
)
return
;
notesEventHub
.
$on
(
`loadCollapsedDiff/
${
this
.
file
.
file_hash
}
`
,
this
.
requestDiff
);
eventHub
.
$on
(
EVT_EXPAND_ALL_FILES
,
this
.
expandAllListener
);
},
mounted
()
{
if
(
this
.
preRender
)
return
;
if
(
this
.
hasDiff
)
{
this
.
postRender
();
}
...
...
@@ -203,6 +209,8 @@ export default {
this
.
manageViewedEffects
();
},
beforeDestroy
()
{
if
(
this
.
preRender
)
return
;
eventHub
.
$off
(
EVT_EXPAND_ALL_FILES
,
this
.
expandAllListener
);
},
methods
:
{
...
...
app/assets/javascripts/diffs/components/pre_renderer.vue
View file @
52d22870
...
...
@@ -25,7 +25,9 @@ export default {
if
(
nextItem
)
{
this
.
startedRender
=
true
;
this
.
nextItem
=
nextItem
;
requestIdleCallback
(()
=>
{
this
.
nextItem
=
nextItem
;
});
}
else
if
(
this
.
startedRender
)
{
this
.
nextItem
=
null
;
...
...
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