{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/288","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5-ui","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/288/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/288/events","html_url":"https://github.com/ckeditor/ckeditor5-ui/pull/288","id":249654242,"number":288,"title":"T/260: Make limiter element more configurable","user":{"login":"oleq","id":1099479,"avatar_url":"https://avatars1.githubusercontent.com/u/1099479?v=4","gravatar_id":"","url":"https://api.github.com/users/oleq","html_url":"https://github.com/oleq","followers_url":"https://api.github.com/users/oleq/followers","following_url":"https://api.github.com/users/oleq/following{/other_user}","gists_url":"https://api.github.com/users/oleq/gists{/gist_id}","starred_url":"https://api.github.com/users/oleq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleq/subscriptions","organizations_url":"https://api.github.com/users/oleq/orgs","repos_url":"https://api.github.com/users/oleq/repos","events_url":"https://api.github.com/users/oleq/events{/privacy}","received_events_url":"https://api.github.com/users/oleq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-08-11T14:33:12Z","updated_at":"2017-08-18T09:24:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/pulls/288","html_url":"https://github.com/ckeditor/ckeditor5-ui/pull/288","diff_url":"https://github.com/ckeditor/ckeditor5-ui/pull/288.diff","patch_url":"https://github.com/ckeditor/ckeditor5-ui/pull/288.patch"},"body":"### Suggested merge commit message ([convention](https://github.com/ckeditor/ckeditor5-design/wiki/Git-commit-message-convention))\r\n\r\nFeature: Allowed `BalloonPanelView` position limiter defined as a function. Made `ContextualToolbar` position limiter configurable via `config.ui.balloonLimiter`. Closes #260.\r\n\r\n---\r\n\r\n### Additional information\r\n\r\nThe whole solution is based on the assumption that it's up to the editor(ui) creator to define the rightful limiter for all floating panels. So far, in all our creators, all the balloons we use (link, image, contextual toolbar) use the same positioning limiter, so I guess it's the right assumption to start with. It does not hard code anything in the `BalloonPanelView` or `ContextualBalloon`, so developers can still do whatever they want with their balloons.\r\n\r\n#### Requires the following branches\r\n\r\nBranch constellation/CI in https://github.com/ckeditor/ckeditor5/compare/t/ckeditor5-ui/260.\r\n\r\n* https://github.com/ckeditor/ckeditor5-utils/tree/t/ckeditor5-ui/260 – brings the support for the functional limiter in `getOptimalPosition` utility.\r\n* https://github.com/ckeditor/ckeditor5-image/tree/t/ckeditor5-ui/260 - makes the image UI respect the `config.ui.balloonLimiter` config.\r\n* https://github.com/ckeditor/ckeditor5-link/tree/t/ckeditor5-ui/260 - makes the link UI respect the `config.ui.balloonLimiter` config.\r\n* https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar/tree/t/ckeditor5-ui/260 - defines the `config.ui.balloonLimiter` config.\r\n* https://github.com/ckeditor/ckeditor5-editor-classic/tree/t/ckeditor5-ui/260 - defines the `config.ui.balloonLimiter` config.\r\n* https://github.com/ckeditor/ckeditor5-editor-inline/tree/t/ckeditor5-ui/260 - defines the `config.ui.balloonLimiter` config.\r\n* https://github.com/ckeditor/ckeditor5-core/tree/t/ckeditor5-ui/260 - documents the `config.ui`.\r\n\r\n#### Issues\r\n\r\n* How to configure the `config.ui.balloonLimiter`?  The `ui` namespace could land in https://github.com/ckeditor/ckeditor5-core/blob/master/src/editor/editorconfig.jsdoc. Should `*EditorUI` classes document the `balloonLimiter`?\r\n* I wonder if we ever gonna face a situation that within an editor type (creator) X and Y features will need to use different position limiters? If so, this solution is broken. I was against `config.link.balloonLimiter`, `config.image.balloonLimiter` etc. for the sake of the simplicity, though.\r\n* I totally hate the `selectionRootObtainer` helper. \r\n   * It does not deserve to become an `editor.editing.view` method.\r\n   * OTOH repeating it in each `*EditorUI` makes no sense.\r\n   * I got no idea where to put it anyway. There's too much engine in it to keep it in the `ckeditor5-ui`. OTOH, it does not fit in core, etc.\r\n   * Maybe we can get rid of it somehow?"},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/comments/323305276","html_url":"https://github.com/ckeditor/ckeditor5-ui/pull/288#issuecomment-323305276","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-ui/issues/288","id":323305276,"user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars2.githubusercontent.com/u/156149?v=4","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T09:24:52Z","updated_at":"2017-08-18T09:24:52Z","body":"We discussed where to expose the option to control this and we decided to put it as a `ContextualBalloon` plugin's property. Concrete editor UI implementations or editor integrations will be able to override it. Let's not expose it prematurely in the config as it indeed is pretty hardcore."}}
{"actor":{"display_login":"Reinmar"}}