-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix SCT-2914 / PUBLIC-1493 - movement of unselected cells #2076
base: develop
Are you sure you want to change the base?
Changes from 7 commits
1b35148
6aad8e9
632318d
a4a9a83
5ae04bc
f10799f
9b60725
2c7e7fa
f6e3d09
b63e27c
9539643
da58646
25ef6fe
2ce09ea
09e0a65
234228e
4170676
22454ca
574ef34
c26d813
c96a1fc
efbd2bd
7ec78de
b46252a
44a05cf
6c3dbc1
74c3772
32cf292
5fe036f
6d3cac4
5f5e644
4b31bcc
dff4d92
ea4d6d9
11c8619
f4d2f55
02b67d0
a7dc8e1
1749f9a
3e63351
f678d6d
b81e4a4
a6ddfa6
68536e5
d5febdd
0d7876c
820f334
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ define([ | |
) { | ||
'use strict'; | ||
|
||
var t = html.tag, | ||
const t = html.tag, | ||
div = t('div'), | ||
a = t('a'), | ||
button = t('button'), | ||
|
@@ -50,11 +50,13 @@ define([ | |
readOnly = Jupyter.narrative.readonly; | ||
|
||
function doMoveCellUp() { | ||
Jupyter.notebook.move_cell_up(); | ||
const cellIndex = Jupyter.notebook.find_cell_index(cell); | ||
Jupyter.notebook.move_cell_up(cellIndex); | ||
} | ||
|
||
function doMoveCellDown() { | ||
Jupyter.notebook.move_cell_down(); | ||
const cellIndex = Jupyter.notebook.find_cell_index(cell); | ||
Jupyter.notebook.move_cell_down(cellIndex); | ||
} | ||
|
||
function doDeleteCell() { | ||
|
@@ -199,10 +201,8 @@ define([ | |
} | ||
|
||
function renderOptions(cell, events) { | ||
var toggleMinMax = utils.getCellMeta(cell, 'kbase.cellState.toggleMinMax', 'maximized'), | ||
toggleIcon = (toggleMinMax === 'maximized' ? 'minus' : 'plus'), | ||
dropdownId = html.genId(), | ||
menuItems = []; | ||
const dropdownId = html.genId(); | ||
const menuItems = []; | ||
|
||
if (cell.cell_type === 'code') { | ||
menuItems.push({ | ||
|
@@ -403,12 +403,12 @@ define([ | |
])), | ||
|
||
(function () { | ||
var toggleMinMax = utils.getCellMeta(cell, 'kbase.cellState.toggleMinMax', 'maximized'), | ||
const toggleMinMax = utils.getCellMeta(cell, 'kbase.cellState.toggleMinMax', 'maximized'), | ||
toggleIcon = (toggleMinMax === 'maximized' ? 'minus' : 'plus'), | ||
color = (toggleMinMax === 'maximized' ? '#000' : 'rgba(255,137,0,1)'); | ||
classModifier = (toggleMinMax === 'maximized' ? '-maximized' : '-minimized'); | ||
return button({ | ||
type: 'button', | ||
class: 'btn btn-default btn-xs', | ||
class: `btn btn-default btn-xs kb-btn-expander ${classModifier}`, | ||
dataToggle: 'tooltip', | ||
dataPlacement: 'left', | ||
title: true, | ||
|
@@ -418,10 +418,7 @@ define([ | |
id: events.addEvent({type: 'click', handler: doToggleMinMaxCell}) | ||
}, [ | ||
span({ | ||
class: 'fa fa-' + toggleIcon + '-square-o fa-lg', | ||
style: { | ||
color: color | ||
} | ||
class: 'fa fa-' + toggleIcon + '-square-o fa-lg' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was already in place, not changed by the PR. The change was to remove the explicit color style. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment was just about using a template string. ATM we don't have any policies either way so it's up to you. 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, right, well, I have tried to restrain myself from just changing code to be better. I do try to restrain myself to only changing code if That said, I do sometimes just make code improvements if they bug me enough and I'm in a generous mood. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (c) - 😁 Template strings can be implemented globally by |
||
}) | ||
]); | ||
}()) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍