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

t/60: Ensured only the widget toolbar attached to the view element which is deepest in the view tree will show up #64

Merged
merged 5 commits into from
Jan 14, 2019

Conversation

oleq
Copy link
Member

@oleq oleq commented Jan 11, 2019

Suggested merge commit message (convention)

Fix: Ensured only the widget toolbar attached to the view element which is deepest in the view tree will show up. Code and documentation refactoring in the WidgetToolbarRepository. Closes ckeditor/ckeditor5#4595.

BREAKING CHANGE: The visibleWhen() function, a property of an object passed into WidgetToolbarRepository.register(), has been renamed to getRelatedElement() and must return an editing View element the toolbar should be attached to (instead of Boolean).


Additional information

CI: https://github.com/ckeditor/ckeditor5/tree/t/ckeditor5-widget/60

Requires:

@coveralls
Copy link

coveralls commented Jan 11, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 257040e on t/60 into dde537a on master.

@jodator
Copy link
Contributor

jodator commented Jan 11, 2019

Running tests locally:

yarn test -cws --files=widget,table,image,media-embed

I have one test failing:
selection_153

@oleq
Copy link
Member Author

oleq commented Jan 14, 2019

It also fails on master so it's not related to this PR constellation.

Copy link
Contributor

@jodator jodator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small docs fixes might be needed. Everything looks OK to me and works nicely :)

src/widgettoolbarrepository.js Outdated Show resolved Hide resolved
src/widgettoolbarrepository.js Outdated Show resolved Hide resolved
src/widgettoolbarrepository.js Outdated Show resolved Hide resolved
jodator and others added 2 commits January 14, 2019 12:05
Docs: Fixed documentation in `WidgetToolbarRepository`.

Co-Authored-By: oleq <a.nowodzinski@cksource.com>
Docs: Improved documentation in `WidgetToolbarRepository`.

Co-Authored-By: oleq <a.nowodzinski@cksource.com>
@oleq
Copy link
Member Author

oleq commented Jan 14, 2019

2 things that came to my mind:

  1. @Mgsy, can you check out the constellation and see if the UX of the widget toolbars is OK?
  2. s/getRelatedElement/getTargetElement? s/getRelatedElement/getAttachmentTarget?

@Mgsy
Copy link
Member

Mgsy commented Jan 14, 2019

@Mgsy, can you check out the constellation and see if the UX of the widget toolbars is OK?

LGTM 👍

@jodator jodator merged commit 7e11a24 into master Jan 14, 2019
@oleq oleq deleted the t/60 branch January 15, 2019 08:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants