Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into i/4614
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Feb 25, 2020
2 parents 3835f24 + 886df83 commit 34f4d3b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
Changelog
=========

## [17.0.0](https://github.com/ckeditor/ckeditor5-widget/compare/v16.0.0...v17.0.0) (2020-02-19)

### MINOR BREAKING CHANGES

* Resizer options object now also takes an editor instance.

### Features

* Introduced API to temporarily disable the `WidgetToolbarRepository` plugin (prevent the toolbar from showing up). Closes [ckeditor/ckeditor5#5964](https://github.com/ckeditor/ckeditor5/issues/5964). ([b9cf062](https://github.com/ckeditor/ckeditor5-widget/commit/b9cf062))

### Bug fixes

* Fixed image resize behavior upon short clicking a handle without dragging. Image will no longer became full width, nor will it briefly flash an unexpected size. Closes [ckeditor/ckeditor5#5189](https://github.com/ckeditor/ckeditor5/issues/5189). Closes [ckeditor/ckeditor5#5195](https://github.com/ckeditor/ckeditor5/issues/5195). ([d6a5c93](https://github.com/ckeditor/ckeditor5-widget/commit/d6a5c93))

### Other changes

* Align code to changes in `Plugin` API. ([81bb636](https://github.com/ckeditor/ckeditor5-widget/commit/81bb636))
* Updated translations. ([75b8c83](https://github.com/ckeditor/ckeditor5-widget/commit/75b8c83))


## [16.0.0](https://github.com/ckeditor/ckeditor5-widget/compare/v15.0.0...v16.0.0) (2019-12-04)

### Other changes

* Updated translations. ([b3bf5f0](https://github.com/ckeditor/ckeditor5-widget/commit/b3bf5f0))
* Updated translations. ([b3bf5f0](https://github.com/ckeditor/ckeditor5-widget/commit/b3bf5f0))


## [15.0.0](https://github.com/ckeditor/ckeditor5-widget/compare/v11.1.0...v15.0.0) (2019-10-23)
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ckeditor/ckeditor5-widget",
"version": "16.0.0",
"version": "17.0.0",
"description": "Widget API for CKEditor 5.",
"keywords": [
"ckeditor",
Expand All @@ -9,25 +9,25 @@
"ckeditor5-lib"
],
"dependencies": {
"@ckeditor/ckeditor5-core": "^16.0.0",
"@ckeditor/ckeditor5-engine": "^16.0.0",
"@ckeditor/ckeditor5-ui": "^16.0.0",
"@ckeditor/ckeditor5-utils": "^16.0.0",
"@ckeditor/ckeditor5-core": "^17.0.0",
"@ckeditor/ckeditor5-engine": "^17.0.0",
"@ckeditor/ckeditor5-ui": "^17.0.0",
"@ckeditor/ckeditor5-utils": "^17.0.0",
"lodash-es": "^4.17.10"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^16.0.0",
"@ckeditor/ckeditor5-block-quote": "^16.0.0",
"@ckeditor/ckeditor5-clipboard": "^16.0.0",
"@ckeditor/ckeditor5-editor-balloon": "^16.0.0",
"@ckeditor/ckeditor5-editor-classic": "^16.0.0",
"@ckeditor/ckeditor5-enter": "^16.0.0",
"@ckeditor/ckeditor5-essentials": "^16.0.0",
"@ckeditor/ckeditor5-heading": "^16.0.0",
"@ckeditor/ckeditor5-paragraph": "^16.0.0",
"@ckeditor/ckeditor5-table": "^16.0.0",
"@ckeditor/ckeditor5-typing": "^16.0.0",
"@ckeditor/ckeditor5-undo": "^16.0.0",
"@ckeditor/ckeditor5-basic-styles": "^17.0.0",
"@ckeditor/ckeditor5-block-quote": "^17.0.0",
"@ckeditor/ckeditor5-clipboard": "^17.0.0",
"@ckeditor/ckeditor5-editor-balloon": "^17.0.0",
"@ckeditor/ckeditor5-editor-classic": "^17.0.0",
"@ckeditor/ckeditor5-enter": "^17.0.0",
"@ckeditor/ckeditor5-essentials": "^17.0.0",
"@ckeditor/ckeditor5-heading": "^17.0.0",
"@ckeditor/ckeditor5-paragraph": "^17.0.0",
"@ckeditor/ckeditor5-table": "^17.0.0",
"@ckeditor/ckeditor5-typing": "^17.0.0",
"@ckeditor/ckeditor5-undo": "^17.0.0",
"eslint": "^5.5.0",
"eslint-config-ckeditor5": "^2.0.0",
"husky": "^1.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/widgettoolbarrepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default class WidgetToolbarRepository extends Plugin {
this._toolbarDefinitions.set( toolbarId, {
view: toolbarView,
getRelatedElement,
balloonClassName,
balloonClassName
} );
}

Expand Down Expand Up @@ -216,7 +216,7 @@ export default class WidgetToolbarRepository extends Plugin {
this._balloon.add( {
view: toolbarDefinition.view,
position: getBalloonPositionData( this.editor, relatedElement ),
balloonClassName: toolbarDefinition.balloonClassName,
balloonClassName: toolbarDefinition.balloonClassName
} );

// Update toolbar position each time stack with toolbar view is switched to visible.
Expand Down
6 changes: 3 additions & 3 deletions tests/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe( 'Widget', () => {
const keydownHandler = sinon.spy();
const domEventDataMock = {
keyCode: keyCodes.arrowright,
preventDefault: sinon.spy(),
preventDefault: sinon.spy()
};
setModelData( model, '<paragraph>foo</paragraph>[<widget></widget>]' );
viewDocument.on( 'keydown', keydownHandler );
Expand All @@ -387,7 +387,7 @@ describe( 'Widget', () => {
const keydownHandler = sinon.spy();
const domEventDataMock = {
keyCode: keyCodes.arrowleft,
preventDefault: sinon.spy(),
preventDefault: sinon.spy()
};
setModelData( model, '[<widget></widget>]<paragraph>foo</paragraph>' );
viewDocument.on( 'keydown', keydownHandler );
Expand Down Expand Up @@ -850,7 +850,7 @@ describe( 'Widget', () => {
setModelData( model, input );
const scrollStub = sinon.stub( view, 'scrollToTheSelection' );
const domEventDataMock = {
keyCode: direction == 'backward' ? keyCodes.backspace : keyCodes.delete,
keyCode: direction == 'backward' ? keyCodes.backspace : keyCodes.delete
};

viewDocument.fire( 'keydown', new DomEventData(
Expand Down
4 changes: 2 additions & 2 deletions tests/widgettoolbarrepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe( 'WidgetToolbarRepository', () => {
it( 'should create a widget toolbar and add it to the collection', () => {
widgetToolbarRepository.register( 'fake', {
items: editor.config.get( 'fake.toolbar' ),
getRelatedElement: () => null,
getRelatedElement: () => null
} );

expect( widgetToolbarRepository._toolbarDefinitions.size ).to.equal( 1 );
Expand Down Expand Up @@ -510,7 +510,7 @@ describe( 'WidgetToolbarRepository - integration with the BalloonToolbar', () =>
it( 'balloon toolbar should be hidden when the widget is selected', () => {
widgetToolbarRepository.register( 'fake', {
items: editor.config.get( 'fake.toolbar' ),
getRelatedElement: getSelectedFakeWidget,
getRelatedElement: getSelectedFakeWidget
} );

const fakeWidgetToolbarView = widgetToolbarRepository._toolbarDefinitions.get( 'fake' ).view;
Expand Down

0 comments on commit 34f4d3b

Please sign in to comment.