Skip to content
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

Widget upload feature for Easy Image #1483

Merged
merged 78 commits into from
Jan 29, 2018
Merged
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a6c06eb
First mocks to get the new upload working. So far it's messy PoC conc…
mlewand Jan 16, 2018
ad18f2f
Another round of this fabolous (and dirty) PoC to bring reusable widg…
mlewand Jan 17, 2018
0ead4ec
An attempt to integrate our custom EI progress bar with the upload wi…
mlewand Jan 17, 2018
ac5c5cd
Added a ProgressBar type, so far it's going to be placed in Easy Imag…
mlewand Jan 17, 2018
d0e30ec
Generic loader integration for ProgressBar type. Added unit tests cov…
mlewand Jan 17, 2018
bcd0ba8
Added ProgressBar#remove and a basic manual test.
mlewand Jan 18, 2018
e314594
Tests: implemented a different type of progress indicator in manual t…
mlewand Jan 18, 2018
ee02ae0
Fixed the event subscribed for upload progress. Experimental integrat…
mlewand Jan 18, 2018
fe8cb0b
Tests: added a manual test for custom progress indicators used in wid…
mlewand Jan 19, 2018
1017dea
Time to say farewell to our good old Easy Image custom upload widget.
mlewand Jan 19, 2018
ac319db
Refactoring: renamed bindToLoader to bindLoader method.
mlewand Jan 19, 2018
3845489
Tests: fixed an issue where the circle progress indicator would start…
mlewand Jan 19, 2018
624da0c
Tests: make sure that circle bar thickness is fully configurable usin…
mlewand Jan 19, 2018
9f8e160
Refactoring: removed code leftovers.
mlewand Jan 19, 2018
675c83d
Upload Widget Feature now supports dropping multiple files at once.
mlewand Jan 19, 2018
8192548
Added support for pasting images straight from the clipboard.
mlewand Jan 19, 2018
3427cfc
Moved Easy Image specific upload logic to the EI plugin.
mlewand Jan 20, 2018
180db78
Fixed the toolbar positioning for initial Easy Image widget render.
mlewand Jan 20, 2018
23941ca
Added an error message when error occured during the upload.
mlewand Jan 20, 2018
745c94c
Removed redundant image width setting.
mlewand Jan 20, 2018
c219678
Removed a todo note about the toolbar repositioning. It's already cov…
mlewand Jan 20, 2018
3d8a021
Added a base ProgressReporter type, refactored code to use it properl…
mlewand Jan 20, 2018
1c2da9d
Explicitly marked widget name in it's definition object.
mlewand Jan 20, 2018
f4faf57
Added basic tests for Upload Widget Feature.
mlewand Jan 20, 2018
44754f9
Added more unit tests for Upload Widget Feature.
mlewand Jan 20, 2018
ecc2b20
Tests: minor code style adjustments in upload feature suite.
mlewand Jan 20, 2018
16fd417
Docs: added API docs for uploadFailed event.
mlewand Jan 20, 2018
e5db4a6
Moved widget upload feature progress logic back to imagebase. Improve…
mlewand Jan 20, 2018
32ac54a
Tests: added an integration test for switching editor mode during Eas…
mlewand Jan 20, 2018
1102405
Fixed a case where it would be possible to trigger Upload Widget Feat…
mlewand Jan 20, 2018
14416e0
Fixed an issue where failed upload would remove widget partially. Als…
mlewand Jan 20, 2018
e727314
Tests: added a manual test for Upload Widget Feature.
mlewand Jan 21, 2018
0d9f6ff
Tests: extracted common assertion.
mlewand Jan 21, 2018
f1bf37d
Major API change in ProgressReporter types: removed static createForE…
mlewand Jan 21, 2018
c44aba1
Docs: added an API listing for ProgressBar constructor.
mlewand Jan 21, 2018
f19227b
Renamed last remaining "progress indicator" into "progress reporter" …
mlewand Jan 21, 2018
457bcf5
Tests: fixed failing manual test.
mlewand Jan 21, 2018
ceadd43
Tests: added manual test for progress bar being displayed with right-…
mlewand Jan 21, 2018
d2bb63c
Tests: ignore unsupported environments in upload widget feature / pro…
mlewand Jan 21, 2018
1c7aedf
Added missing helper, extracted common assertion.
mlewand Jan 21, 2018
b3fbe9e
Added a fancier fadeout effect for circle loader.
mlewand Jan 22, 2018
3c02c12
Tests: moved demo progress reporter subclasses to imagebase plugin.
mlewand Jan 22, 2018
6b1ac27
Docs: removed last todo notes.
mlewand Jan 22, 2018
16b2e21
Easy image no longer depends on the Image Upload plugin.
mlewand Jan 22, 2018
e1b444a
Tests: corrected manual test for IE11.
mlewand Jan 22, 2018
a283d05
Tests: notification after the upload is no longer displayed.
mlewand Jan 23, 2018
5a14df4
Tests: added unit tests for pasting form IE11 / Firefox.
mlewand Jan 23, 2018
2ba4624
Now base64 encoded images will be automatically converted into Easy I…
mlewand Jan 23, 2018
7e69987
Added handling for pasting mixed content - base64 images + other HTML.
mlewand Jan 23, 2018
72a77e4
Removed redundant widget remove. The widget is removed by core upload…
mlewand Jan 23, 2018
a38d275
Tests: added unit test for copying and pasting (duplicate) the widget…
mlewand Jan 23, 2018
8186422
Work in progress: added handling for copy/cut and pasting widget with…
mlewand Jan 24, 2018
6cc88bb
Updated all of the upload* events signatures in the upload widget fea…
mlewand Jan 24, 2018
645632c
Make sure that the editor does not explode when copying a widget whic…
mlewand Jan 24, 2018
e075ab8
Upload id should be cleared when not needed.
mlewand Jan 24, 2018
37a26d1
Refactoring: upload image widget listeners should be cleared up when …
mlewand Jan 24, 2018
385bbd6
Refactored easy image plugin to utilize upload feature to upload file…
mlewand Jan 24, 2018
20d2cd7
Removed an API change in ​widget#finalizeCreation that is no longer n…
mlewand Jan 24, 2018
8ad7486
Docs: rephased method description.
mlewand Jan 24, 2018
59751c9
Tests: removed a todo marker.
mlewand Jan 24, 2018
41ef371
Docs: rephrased comment.
mlewand Jan 24, 2018
0119fb2
Minor code enhancements, added a new, simple manual test for widget u…
mlewand Jan 24, 2018
0420547
Added lang meta entry.
mlewand Jan 24, 2018
d8685f0
Docs: more API docs for the Widget Upload Feature.
mlewand Jan 24, 2018
27185cf
Docs: API docs polishing.
mlewand Jan 24, 2018
649a874
Changed the order of _spawnLoader method.
mlewand Jan 24, 2018
4c59ec8
Refactoring: _loadWidget is no longer used - removing.
mlewand Jan 24, 2018
41921b3
Refactoring: renamed uploadBegan to uploadStarted event.
mlewand Jan 24, 2018
e0a5079
Tests: lowered fake file loader response timings, so that the test su…
mlewand Jan 24, 2018
c06386e
Docs: improved API docs in widget upload feature.
mlewand Jan 25, 2018
2b453d9
Fixed typos.
f1ames Jan 25, 2018
077156b
Tests: Corrected API docs for Upload Widget Feature test helpers.
mlewand Jan 26, 2018
548f411
Fixed uploadId not being assigned if uploadStarted was cancelled and …
mlewand Jan 26, 2018
40853b7
Fixed error message when uploading Easy Image widget fails.
mlewand Jan 26, 2018
38aff7f
Docs: API docs for Image Base plugin corrected.
mlewand Jan 26, 2018
a6dd0c7
Tests: added a manual test for Easy Image and Paste from Word integra…
mlewand Jan 26, 2018
b454268
Tests: adjusted test assert to message change.
f1ames Jan 29, 2018
83d2e32
Docs scope adjustments.
f1ames Jan 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests: make sure that circle bar thickness is fully configurable usin…
…g CIRCLE_THICKNESS const. Also removed stray CSS code.
mlewand committed Jan 22, 2018
commit 624da0c28e4e7b86cce8c3e1ae5b364a46d891d3
30 changes: 10 additions & 20 deletions tests/plugins/easyimage/manual/_assets/progress.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
/* Overlapping progress indicator */
/* common */

.cke_progress_overlap {
.cke_progress_overlap, .cke_progress_circle {
position: absolute;
top: 0px;
height: 100%;
background: rgba( 255, 255, 255, 0.8);
}

/* Overlapping progress indicator */

.cke_progress_overlap {
height: 100%;
transition: height 0.1s;
}

/* Circle prgoress indicator */

.cke_progress_circle {
position: absolute;
top: 0px;
bottom: 0px;
background: rgba( 255, 255, 255, 0.8);
text-align: center;
}

.cke_progress_circle>.cke_circle {
height: 20px;
width: 20px;
margin: 0px auto;
background: red;
position: absolute;
top: 0px;
left: 0px;
clip: rect( 5px, 5px, 5px, 5px);
}

/* Circle prgoress indicator */

.cke_progress_circle svg circle {
transition: stroke-dashoffset 0.1s linear;
stroke: #EEE;
stroke-width: 10px;
}

.cke_progress_circle .bar {
9 changes: 7 additions & 2 deletions tests/plugins/easyimage/manual/_helpers/tools.js
Original file line number Diff line number Diff line change
@@ -108,8 +108,12 @@ var easyImageTools = {
offset = CIRCLE_THICKNESS + CIRCLE_PROGRESS_SIZE,
htmlTemplate = new CKEDITOR.template( '<div class="cont" data-pct="0">' +
' <svg id="svg" width="{svgSize}" height="{svgSize}" viewPort="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">' +
' <circle r="{CIRCLE_PROGRESS_SIZE}" cx="{offset}" cy="{offset}" fill="transparent" stroke-dasharray="{DASH_ARRAY}" stroke-dashoffset="0"></circle>' +
' <circle r="{CIRCLE_PROGRESS_SIZE}" cx="{offset}" cy="{offset}" fill="transparent" stroke-dasharray="{DASH_ARRAY}" stroke-dashoffset="{DASH_ARRAY}" class="bar"></circle>' +
' <circle r="{CIRCLE_PROGRESS_SIZE}" cx="{offset}" cy="{offset}" fill="transparent"' +
' stroke-dasharray="{DASH_ARRAY}" stroke-dashoffset="0"' +
' style="stroke-width: {CIRCLE_THICKNESS}px"></circle>' +
' <circle r="{CIRCLE_PROGRESS_SIZE}" cx="{offset}" cy="{offset}" fill="transparent"' +
' stroke-dasharray="{DASH_ARRAY}" stroke-dashoffset="{DASH_ARRAY}"' +
' style="stroke-width: {CIRCLE_THICKNESS}px" class="bar"></circle>' +
' </svg>' +
'</div>' );

@@ -121,6 +125,7 @@ var easyImageTools = {
htmlTemplate.output( {
svgSize: svgSize,
CIRCLE_PROGRESS_SIZE: CIRCLE_PROGRESS_SIZE,
CIRCLE_THICKNESS: CIRCLE_THICKNESS,
DASH_ARRAY: DASH_ARRAY,
offset: offset
} )