Skip to content

Commit afea99b

Browse files
committed
Merge remote-tracking branch 'origin/dev' into fabiha-branch
2 parents b02c05c + 84e9a0e commit afea99b

File tree

5 files changed

+195
-34
lines changed

5 files changed

+195
-34
lines changed

azure-pipelines.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
2+
variables:
3+
JUPYTER_TEST_BROWSER: firefox
4+
MOZ_HEADLESS: 1
5+
6+
pool:
7+
vmImage: 'ubuntu-latest'
8+
9+
steps:
10+
- task: UsePythonVersion@0
11+
inputs:
12+
versionSpec: '3.6'
13+
addToPath: true
14+
architecture: 'x64'
15+
16+
- script: |
17+
pip install --upgrade pip
18+
pip install --upgrade setuptools wheel nose coverage codecov
19+
nvm install 6.9.2
20+
nvm use 6.9.2
21+
node --version
22+
npm --version
23+
npm upgrade -g npm
24+
npm install
25+
git clone git://github.com/n1k0/casperjs.git
26+
cd casperjs
27+
sudo ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
28+
cd ..
29+
echo 'casperjs and phantomjs installed'
30+
sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1 libdbus-glib-1-2
31+
sudo apt-get install firefox
32+
echo 'FIREFOX INSTALLED'
33+
wget https://github.com/laurentj/slimerjs/releases/download/1.0.0/slimerjs-1.0.0.tar.bz2
34+
tar -xvjf slimerjs-1.0.0.tar.bz2
35+
sudo mv slimerjs-1.0.0 /usr/local/share
36+
sudo ln -sf /usr/local/share/slimerjs-1.0.0/slimerjs /usr/local/bin
37+
export SLIMERJSLAUNCHER=/usr/bin/firefox
38+
pip install -r docs/doc-requirements.txt
39+
pip install --upgrade pytest
40+
pip install --upgrade selenium pytest
41+
wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz
42+
mkdir geckodriver
43+
tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver
44+
cd geckodriver
45+
sudo cp geckodriver /usr/local/bin
46+
cd ..
47+
# export PATH=$PATH:$PWD/geckodriver
48+
npm install sqlite3
49+
pip install "attrs>=17.4.0"
50+
displayName: 'Before Install'
51+
continueOnError: false
52+
53+
- script: |
54+
pip install --pre .[test] $EXTRA_PIP
55+
pip freeze
56+
wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb
57+
sudo dpkg -i pandoc-1.19.1-1-amd64.deb
58+
displayName: 'Install'
59+
continueOnError: false
60+
61+
- script: |
62+
jupyter kernelspec list
63+
symlinks=$(find . -type l| grep -v './node_modules/' | grep -v './git-hooks')
64+
if [[ $(echo $symlinks) ]]; then
65+
echo "Repository contains symlinks which won't work on windows:"
66+
echo $symlinks
67+
echo ""
68+
false
69+
else
70+
true
71+
fi
72+
python -m notebook.jstest base
73+
displayName: 'Run base Tests'
74+
continueOnError: false
75+
76+
- script: |
77+
python -m notebook.jstest notebook
78+
displayName: 'Run notebook Tests'
79+
continueOnError: false
80+
81+
# - script: |
82+
# python -m notebook.jstest services
83+
# displayName: 'Run services Tests'
84+
# continueOnError: false
85+
86+
- script: |
87+
nosetests -v --exclude-dir notebook/tests/selenium --with-coverage --cover-package=notebook notebook
88+
displayName: 'Run coverage Tests'
89+
continueOnError: false
90+
91+
# - script: |
92+
# py.test -sv notebook/tests/selenium
93+
# displayName: 'Run selenium Tests'
94+
# continueOnError: false
95+
96+
- script: |
97+
make -C docs/ html
98+
pytest --nbval --current-env docs
99+
displayName: 'Run documentation Tests'
100+
continueOnError: false

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"marked": "~0.5",
1717
"MathJax": "^2.7.4",
1818
"moment": "~2.19.3",
19-
"preact": "https://unpkg.com/preact@^7.2.0/dist/preact.min.js",
20-
"preact-compat": "https://unpkg.com/preact-compat@^3.14.3/dist/preact-compat.min.js",
21-
"proptypes": "https://unpkg.com/proptypes@^0.14.4/index.js",
19+
"preact": "https://unpkg.com/preact@~7.2.0/dist/preact.min.js",
20+
"preact-compat": "https://unpkg.com/preact-compat@~3.14.3/dist/preact-compat.min.js",
21+
"proptypes": "https://unpkg.com/proptypes@~0.14.4/index.js",
2222
"requirejs": "~2.2",
2323
"requirejs-text": "~2.0.15",
2424
"requirejs-plugins": "~1.0.3",

notebook/static/tree/less/tree.less

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ ul.breadcrumb {
6767
.dynamic-buttons {
6868
padding-top: @dashboard_tb_pad - 1px;
6969
display: inline-block;
70+
width: 400px;
71+
7072
}
7173

7274
.list_toolbar [class*="span"] {
@@ -412,3 +414,48 @@ ul#new-menu {
412414
display: inline-block;
413415
padding-top: @dashboard_tb_pad;
414416
}
417+
418+
//TO show tooltips via keyboard for"Duplicate","View","Rename", "Download", "Shutdown", "Edit","Move", "Delete" buttons.
419+
420+
.visually-hidden {
421+
clip-path: inset(100%);
422+
clip: rect(1px, 1px, 1px, 1px);
423+
height: 1px;
424+
overflow: hidden;
425+
position: absolute;
426+
white-space: nowrap;
427+
width: 1px;
428+
}
429+
430+
button:focus + [role="tooltip"] {
431+
visibility: visible;
432+
opacity: 1;
433+
}
434+
435+
.button-and-tooltip {
436+
position: relative;
437+
display: inline-block;
438+
}
439+
440+
[role="tooltip"] {
441+
/* Position the tooltip */
442+
position: absolute;
443+
top:70%;
444+
display:inline;
445+
//--------------
446+
visibility: hidden;
447+
width: 100px;
448+
background-color: #F0EFEF;
449+
color: #080808;
450+
text-align: center;
451+
padding: 3px;
452+
outline-color: grey;
453+
outline-offset: -2px;
454+
outline-style: auto;
455+
outline-width:1px;
456+
z-index: 1;
457+
opacity: 0;
458+
transition: opacity .6s;
459+
margin: 3px;
460+
font-size:10px;
461+
}

notebook/templates/tree.html

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,24 @@
4141
{% trans %}Select items to perform actions on them.{% endtrans %}
4242
</div>
4343
<div class="dynamic-buttons">
44-
<button title="{% trans %}Duplicate selected{% endtrans %}" aria-label="{% trans %}Duplicate{% endtrans %}" class="duplicate-button btn btn-default btn-xs">{% trans %}Duplicate{% endtrans %}</button>
45-
<button title="{% trans %}Rename selected{% endtrans %}" aria-label="{% trans %}Rename{% endtrans %}" class="rename-button btn btn-default btn-xs">{% trans %}Rename{% endtrans %}</button>
46-
<button title="{% trans %}Move selected{% endtrans %}" aria-label="{% trans %}Move{% endtrans %}" class="move-button btn btn-default btn-xs">{% trans %}Move{% endtrans %}</button>
47-
<button title="{% trans %}Download selected{% endtrans %}" aria-label="{% trans %}Download{% endtrans %}" class="download-button btn btn-default btn-xs">{% trans %}Download{% endtrans %}</button>
48-
<button title="{% trans %}Shutdown selected notebook(s){% endtrans %}" aria-label="{% trans %}Shutdown{% endtrans %}" class="shutdown-button btn btn-default btn-xs btn-warning">{% trans %}Shutdown{% endtrans %}</button>
49-
<button title="{% trans %}View selected{% endtrans %}" aria-label="{% trans %}View{% endtrans %}" class="view-button btn btn-default btn-xs">{% trans %}View{% endtrans %}</button>
50-
<button title="{% trans %}Edit selected{% endtrans %}" aria-label="{% trans %}Edit{% endtrans %}" class="edit-button btn btn-default btn-xs">{% trans %}Edit{% endtrans %}</button>
51-
<button title="{% trans %}Delete selected{% endtrans %}" aria-label="{% trans %}Delete selected{% endtrans %}" class="delete-button btn btn-default btn-xs btn-danger"><i class="fa fa-trash"></i></button>
44+
<button title="{% trans %}Duplicate selected{% endtrans %}" aria-label="{% trans %}Duplicate{% endtrans %}" class="duplicate-button btn btn-default btn-xs" aria-describedby="tooltip1">{% trans %}Duplicate{% endtrans %} </button>
45+
<div role="tooltip" id="tooltip1" >{% trans %}Duplicate selected{% endtrans %}</div>
46+
<button title="{% trans %}Rename selected{% endtrans %}" aria-label="{% trans %}Rename{% endtrans %}" class="rename-button btn btn-default btn-xs" aria-describedby="tooltip2">{% trans %} Rename{% endtrans %}</button>
47+
<div role="tooltip" id="tooltip2" >{% trans %}Rename selected{% endtrans %}</div>
48+
<button title="{% trans %}Move selected{% endtrans %}" aria-label="{% trans %}Move{% endtrans %}" class="move-button btn btn-default btn-xs" aria-describedby="tooltip3">{% trans %}Move{% endtrans %}</button>
49+
<div role="tooltip" id="tooltip3" >{% trans %}Move selected{% endtrans %}</div>
50+
<button title="{% trans %}Download selected{% endtrans %}" aria-label="{% trans %}Download{% endtrans %}" class="download-button btn btn-default btn-xs" aria-describedby="tooltip4">{% trans %}Download{% endtrans %}</button>
51+
<div role="tooltip" id="tooltip4" >{% trans %}Download selected{% endtrans %}</div>
52+
<button title="{% trans %}Shutdown selected notebook(s){% endtrans %}" aria-label="{% trans %}Shutdown{% endtrans %}" class="shutdown-button btn btn-default btn-xs btn-warning" aria-describedby="tooltip5">{% trans %}Shutdown{% endtrans %}</button>
53+
<div role="tooltip" id="tooltip5" >{% trans %}Shutdown selected notebook(s){% endtrans %}</div>
54+
<button title="{% trans %}View selected{% endtrans %}" aria-label="{% trans %}View{% endtrans %}" class="view-button btn btn-default btn-xs" aria-describedby="tooltip6">{% trans %}View{% endtrans %}</button>
55+
<div role="tooltip" id="tooltip6" >{% trans %}View selected{% endtrans %}</div>
56+
<button title="{% trans %}Edit selected{% endtrans %}" aria-label="{% trans %}Edit{% endtrans %}" class="edit-button btn btn-default btn-xs" aria-describedby="tooltip7">{% trans %}Edit{% endtrans %}</button>
57+
<div role="tooltip" id="tooltip7" >{% trans %}Edit selected{% endtrans %}</div>
58+
<button title="{% trans %}Delete selected{% endtrans %}" aria-label="{% trans %}Delete selected{% endtrans %}" class="delete-button btn btn-default btn-xs btn-danger" aria-describedby="tooltip8">
59+
<i class="fa fa-trash"></i>
60+
</button>
61+
<div role="tooltip" id="tooltip8" >{% trans %}Delete selected{% endtrans %}</div>
5262
</div>
5363
</div>
5464
<div class="col-sm-4 no-padding tree-buttons">
@@ -100,7 +110,7 @@
100110
<div id="notebook_list_header" class="row list_header">
101111
<div class="btn-group dropdown" id="tree-selector">
102112
<button title="{% trans %}Select All / None{% endtrans %}" aria-label="{% trans %}Select All / None{% endtrans %}" type="button" class="btn btn-default btn-xs" id="button-select-all" role="checkbox">
103-
<input type="checkbox" class="pull-left tree-selector" id="select-all"><span id="counter-select-all">&nbsp;</span></input>
113+
<input type="checkbox" class="pull-left tree-selector" id="select-all" tabindex="-1"><span id="counter-select-all">&nbsp;</span></input>
104114
</button>
105115
<button title="{% trans %}Select Folders/All Notebooks/Running/Files {% endtrans %}" class="btn btn-default btn-xs dropdown-toggle" type="button" id="tree-selector-btn" data-toggle="dropdown" aria-expanded="true">
106116
<span class="caret"></span>
@@ -121,24 +131,27 @@
121131
{% endfor %}
122132
</ul>
123133
</div>
124-
<div id="file_size" class="pull-right sort_button">
125-
<span class="btn btn-xs btn-default sort-action" id="file-size">
126-
{% trans %}File size{% endtrans %}
127-
<i class="fa"></i>
128-
</span>
129-
</div>
130-
<div id="last_modified" class="pull-right sort_button">
131-
<span class="btn btn-xs btn-default sort-action" id="last-modified">
132-
{% trans %}Last Modified{% endtrans %}
133-
<i class="fa"></i>
134-
</span>
135-
</div>
136-
<div id="sort_name" class="pull-right sort_button">
137-
<span class="btn btn-xs btn-default sort-action" id="sort-name">
138-
{% trans %}Name{% endtrans %}
139-
<i class="fa fa-arrow-down"></i>
140-
</span>
134+
<div id="sort_buttons" class="pull-right">
135+
<div id="sort_name" class="sort_button">
136+
<button type="button" class="btn btn-xs btn-default sort-action" id="sort-name" aria-label="{% trans %}Sort by name{% endtrans %}">
137+
{% trans %}Name{% endtrans %}
138+
<i class="fa fa-arrow-down"></i>
139+
</button>
140+
</div>
141+
<div id="last_modified" class="sort_button">
142+
<button type="button" class="btn btn-xs btn-default sort-action" id="last-modified" aria-label="{% trans %}Sort by last modified{% endtrans %}">
143+
{% trans %}Last Modified{% endtrans %}
144+
<i class="fa"></i>
145+
</button>
146+
</div>
147+
<div id="file_size" class="sort_button">
148+
<button type="button" class="btn btn-xs btn-default sort-action" id="file-size" aria-label="{% trans %}Sort by file size{% endtrans %}">
149+
{% trans %}File size{% endtrans %}
150+
<i class="fa"></i>
151+
</button>
152+
</div>
141153
</div>
154+
142155
</div>
143156
</div>
144157
</div>
@@ -204,7 +217,10 @@
204217

205218
{% block script %}
206219
{{super()}}
207-
220+
<script type="text/javascript">
221+
('#element').tooltip('enable')
222+
</script>
208223

209224
<script src="{{ static_url("tree/js/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
225+
210226
{% endblock %}

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"scripts": {
1212
"bower": "bower install",
13-
"build": "python3 setup.py js css",
13+
"build": "python setup.py js css",
1414
"build:watch": "set -e; while true; do npm run build; sleep 3; done"
1515
},
1616
"devDependencies": {
@@ -19,7 +19,5 @@
1919
"requirejs": "^2.1.17",
2020
"po2json": "^0.4.5"
2121
},
22-
"dependencies": {
23-
"requests": "^0.2.2"
24-
}
22+
"dependencies": {}
2523
}

0 commit comments

Comments
 (0)