-
-
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
Allow modifying toolbar's viewportTopOffset in runtime #9672
Comments
I'm OK with making
I agree that the name is not perfect (tells you what but not why). It should be renamed to Still, keep in mind that Proposal
|
@mlewand @mateuszzagorski There are some tips regarding the direction from Olek so you can consider giving it a try :) |
I would also like to see this implemented. I have an app with a different header size on mobile and desktop but this is a problem because ckeditor does not allow changing viewportTopOffset at runtime. |
…et-in-runtime Feature: Introduced `editor.ui.viewportOffset` that allows modifying the viewport's offset in runtime. This value is used by the editor to e.g. position its sticky toolbar and contextual balloons. Additionally, the `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object. Closes #9672. BREAKING CHANGE: The `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object.
…rTopOffset-in-runtime Feature: Introduced `editor.ui.viewportOffset` that allows modifying the viewport's offset in runtime. This value is used by the editor to e.g. position its sticky toolbar and contextual balloons. Additionally, the `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object. Closes ckeditor#9672. BREAKING CHANGE: The `config.toolbar.viewportTopOffset` property was moved to `config.ui.viewportOffset` and it now accepts an object.
📝 Provide a description of the improvement
Currently,
config.toolbar.viewportTopOffset
can only be set when creating the editor.The value then ends up in
editor.ui.view.stickyPanel.viewportTopOffset
that's readonly.Could we make this property writable? Or, maybe even better, add a method/getter in the
editor.ui.view
or somewhere deeper?The problem I see is that the (in the runtime)
viewportTopOffset
is not a configuration ofeditor.ui.view.toolbar
buteditor.ui.view.stickyPanel
which is rather poorly named (seems to have nothing to do with the toolbar). Even if we'll make it writable, discoverability will be relatively poor.That might be an argument for adding a method to control this property somewhere up the chain (e.g. in
editor.ui.view
) but I dont' want to overcomplicate this so I have mixed feelings.cc @oleq
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: