-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
ViewportTopOffset and BalloonPanelView integration #10239
Conversation
@ckeditor/qa-team Could you verify if this solution for #9892 is safe, please? Essentially, it touches all kinds of balloons/popups/toolbars across the editor so there's a chance something went wrong. Also, for more information, you can ping @dawidurbanski. |
I'm testing this branch and it works great in our manual tests ( On page cke5-toolbar-on-long-table.mp4cke5-toolbar-on-short-table.mp4Table toolbars are hidden behind the header and never jumps to the bottom of the table. |
I'm on it. Docs have to be reconfigured to use the new |
@LukaszGudel I updated You can re-check it in the current shape though. |
Also @oleq @Reinmar this PR aims to do couple things at once. One of them is to change This makes sense because most of them has nothing to do with the toolbar. So now the question becomes whether we keep both of these options. One for the toolbar and another one for the rest of balloons. Or do we make all balloons and toolbars to use the new Case can be made for all of them. The fact is that probably in most of cases (if not all of them), the toolbar offset will be matched with all the other UI elements positions offsets. In case of making it all under I was thinking of some nice option for plugins to be able to specify deprecated config properties. Something like this (pseudo code): editor.config.addDeprecationNotice( 'toolbar.vieportTopOffset', 'ui.viewportOffset.top' ); And now if someone uses the editor like so: ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ ... ],
toolbar: {
items: [ ... ],
viewportTopOffset: 100
}
} ) Will get a console warning similar to this one:
The deprecation check could be injected in the |
Less is usually better. So one option would be my choice. However, the question to answer is whether it's a realistic and frequent enough use case to have to configure the toolbar independently from the rest of the UI. My intuition says - no. Hence, still single config. But maybe @oleq has some use cases in his mind. As for what to do when someone defined two properties if we'll agree that only one makes sense: To answer that we need to think about the migration path for integrators. That's the main scenario, to me, in which people will have both defined by mistake. And then, we should indeed log a warning. Does warning people when they use the old property (but not the new one yet) make sense? I think so too. It depends on whether the old property will work the same way the new one will. If so, warning 90% of the integrators that they need to change their config has a limited sense (limited > zero). If, however, the new property has a broader effect, then warning makes more sense for sure.
That's not going to work because no one will use |
Oh, yeah. Indeed. Of course we need to hook this up when setting the property in _setToTarget.
I mean, if we plan to remove some property in the future, it obviously has a crucial effect. Or shall we keep supporting the old |
@dawidurbanski I've checked the docs after your fixes and it works all right in the
The table/image toolbar would cover all of the alignment buttons and it would be hard to see which one aligns to the left/right/center. What's more, this image/table toolbar in this case covers the button's labels and it's impossible to read them on hover. I feel like UX in this case could be improved. |
Well yes. But maybe not. It depends on how are we going to treat the old For now it's undecided yet, so I just updated all snippets in a single
I think we just settled on some lesser evil here with @oleq. The idea here is that it's better than it is currently (so it sticks at least), and we added some offset so even if sticky all buttons in the toolbar are at least clickable. We know it's not ideal, but that's what we came up with at this moment. |
Summary of what has been done and what still needs to be done in this ticketDone:
In progress:
Todo:
|
Closed in favour of #10373 |
Suggested merge commit message (convention)
Type: WIP. Closes #9892.
Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.