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
d17a7f0d
Commit
d17a7f0d
authored
Oct 11, 2019
by
Remi Rampin
Committed by
Kushal Pandya
Oct 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notebook rendering: handle metadata.scrolled
parent
51aa3148
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletion
+22
-1
app/assets/javascripts/notebook/cells/code.vue
app/assets/javascripts/notebook/cells/code.vue
+1
-0
app/assets/javascripts/notebook/cells/code/index.vue
app/assets/javascripts/notebook/cells/code/index.vue
+11
-1
app/assets/javascripts/notebook/cells/output/index.vue
app/assets/javascripts/notebook/cells/output/index.vue
+5
-0
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+5
-0
No files found.
app/assets/javascripts/notebook/cells/code.vue
View file @
d17a7f0d
...
...
@@ -49,6 +49,7 @@ export default {
v-if=
"hasOutput"
:count=
"cell.execution_count"
:outputs=
"outputs"
:metadata=
"cell.metadata"
:code-css-class=
"codeCssClass"
/>
</div>
...
...
app/assets/javascripts/notebook/cells/code/index.vue
View file @
d17a7f0d
...
...
@@ -26,6 +26,10 @@ export default {
type
:
String
,
required
:
true
,
},
metadata
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
computed
:
{
code
()
{
...
...
@@ -36,6 +40,12 @@ export default {
return
type
.
charAt
(
0
).
toUpperCase
()
+
type
.
slice
(
1
);
},
cellCssClass
()
{
return
{
[
this
.
codeCssClass
]:
true
,
'
jupyter-notebook-scrolled
'
:
this
.
metadata
.
scrolled
,
};
},
},
mounted
()
{
Prism
.
highlightElement
(
this
.
$refs
.
code
);
...
...
@@ -46,6 +56,6 @@ export default {
<
template
>
<div
:class=
"type"
>
<prompt
:type=
"promptType"
:count=
"count"
/>
<pre
ref=
"code"
:class=
"c
ode
CssClass"
class=
"language-python"
v-text=
"code"
></pre>
<pre
ref=
"code"
:class=
"c
ell
CssClass"
class=
"language-python"
v-text=
"code"
></pre>
</div>
</
template
>
app/assets/javascripts/notebook/cells/output/index.vue
View file @
d17a7f0d
...
...
@@ -19,6 +19,10 @@ export default {
type
:
Array
,
required
:
true
,
},
metadata
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
methods
:
{
outputType
(
output
)
{
...
...
@@ -78,6 +82,7 @@ export default {
:count=
"count"
:index=
"index"
:raw-code=
"rawCode(output)"
:metadata=
"metadata"
:code-css-class=
"codeCssClass"
/>
</div>
...
...
app/assets/stylesheets/framework/files.scss
View file @
d17a7f0d
...
...
@@ -479,3 +479,8 @@ span.idiff {
padding
:
$gl-padding
;
}
}
.jupyter-notebook-scrolled
{
overflow-y
:
auto
;
max-height
:
20rem
;
}
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