Skip to content
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

Toolbar creator should support item priorities #5311

Closed
Reinmar opened this issue Feb 2, 2017 · 2 comments
Closed

Toolbar creator should support item priorities #5311

Reinmar opened this issue Feb 2, 2017 · 2 comments
Labels
package:ui resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Reinmar
Copy link
Member

Reinmar commented Feb 2, 2017

Explained in https://github.com/ckeditor/ckeditor5-ui/issues/154#issuecomment-276922081.

Currently, the image plugins (ImageStyle and ImageAlternativeText) add their buttons to the config.image.defaultToolbar array. So if ImageStyle is loaded first, its buttons will be before the ImageAlternativeText button.

It'd be good to decouple this – the order in which plugins are loaded should have no effect on the order of buttons in the toolbar. Hence, we need to prioritise them. After all plugins are loaded, the configuration should look like this:

config.image.defaultToolbar = [
  { name: 'imageAlternativeText', order: 10 },
  { name: 'imageStyleFull', order: 0 },
  { name: 'imageStyleSide', order: 0 }
];

This should render the image alt text button after image style buttons.

Note: I proposed order instead of priority to avoid all those unclarities whether higher priority number means displaying earlier or later.

@Reinmar
Copy link
Member Author

Reinmar commented Feb 2, 2017

PS. This means that there will need to be a tool which converts toolbar configuration to toolbar items. We're doing this manually now for every toolbar AFAIK.

@Reinmar
Copy link
Member Author

Reinmar commented Feb 24, 2017

OK, we're not going to work on this. We decided to preconfigure the toolbars only in builds. The features will not be able to deal with this for now.

See more in #408.

@Reinmar Reinmar closed this as completed Feb 24, 2017
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

2 participants