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
cb2fe659
Commit
cb2fe659
authored
Nov 12, 2019
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port scroll to bottom methods to new component
parent
5747d40e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
app/assets/javascripts/jobs/components/log/log.vue
app/assets/javascripts/jobs/components/log/log.vue
+25
-1
changelogs/unreleased/35534-broken-scroll-to-bottom.yml
changelogs/unreleased/35534-broken-scroll-to-bottom.yml
+5
-0
No files found.
app/assets/javascripts/jobs/components/log/log.vue
View file @
cb2fe659
...
@@ -11,11 +11,35 @@ export default {
...
@@ -11,11 +11,35 @@ export default {
computed
:
{
computed
:
{
...
mapState
([
'
traceEndpoint
'
,
'
trace
'
,
'
isTraceComplete
'
]),
...
mapState
([
'
traceEndpoint
'
,
'
trace
'
,
'
isTraceComplete
'
]),
},
},
updated
()
{
this
.
$nextTick
(()
=>
{
this
.
handleScrollDown
();
});
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
handleScrollDown
();
});
},
methods
:
{
methods
:
{
...
mapActions
([
'
toggleCollapsibleLine
'
]),
...
mapActions
([
'
toggleCollapsibleLine
'
,
'
scrollBottom
'
]),
handleOnClickCollapsibleLine
(
section
)
{
handleOnClickCollapsibleLine
(
section
)
{
this
.
toggleCollapsibleLine
(
section
);
this
.
toggleCollapsibleLine
(
section
);
},
},
/**
* The job log is sent in HTML, which means we need to use `v-html` to render it
* Using the updated hook with $nextTick is not enough to wait for the DOM to be updated
* in this case because it runs before `v-html` has finished running, since there's no
* Vue binding.
* In order to scroll the page down after `v-html` has finished, we need to use setTimeout
*/
handleScrollDown
()
{
if
(
this
.
isScrolledToBottomBeforeReceivingTrace
)
{
setTimeout
(()
=>
{
this
.
scrollBottom
();
},
0
);
}
},
},
},
};
};
</
script
>
</
script
>
...
...
changelogs/unreleased/35534-broken-scroll-to-bottom.yml
0 → 100644
View file @
cb2fe659
---
title
:
Fix scroll to bottom with new job log
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