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

Exports missing from new installation method #17644

Open
bendemboski opened this issue Dec 13, 2024 · 1 comment
Open

Exports missing from new installation method #17644

bendemboski opened this issue Dec 13, 2024 · 1 comment
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@bendemboski
Copy link
Contributor

I have audited all of our CKEditor imports and come up with a list of symbols that are not available via the new installation method, but that we still need. This is all on CKEditor 44.0.0. I'm happy to break this out into separate issues as appropriate, I just figured I'd file a single issue to start with so we aren't flooded with a bunch of tiny single-symbol issues right out of the gate.

These are in no particular order.

StyleValue (type)

Our use case

We do some custom processing of tables in the clipboard paste pipeline to clean up some styling so that when tables are pasted from word, they don't come in with a bunch of styling features that we don't support. As part of this, we pass the return value of getNormalizedStyle() to a utility function, and that function needs to type its argument as StyleValue

Justification

getNormalizedStyle() is public, so its return type should be

ImageInlineEditing

Our use case

We implement our own toolbar UI, so we want ImageInlineEditing in our build, but not ImageInlineUI

Justification

ImageBlockEditing is exported, so it seems ImageInlineEditing should be as well

TextTransformationDescription (type)

Our use case

We implement a management UI where the user can customize the text transformations supplied to the editor, so we have methods that accept/return arrays of TextTransformationDescriptions

Justification

It's part of the TypingConfig interface via the TextTransformationConfig interface, both of which are exported, so it's already public, just not exported as its own symbol

PositionStickiness (type)

Our use case

We have some infrastructure to walk through and modify model content, and part of that is a sort of "Position factory" that needs to be passed a PositionStickiness value

Justification

The whole Position API is public, so this should be exported as part of that

ListWalker

Our use case

We have a bunch of custom code that allows us to block-indent entire lists (see #16742), and part of that implementation uses a ListWalker to collect list items

Justification

It's a super handy tool for customizing list behaviors

ListCommandAfterExecuteEvent (type)

Our use case

We have a bunch of custom code that allows us to block-indent entire lists (see #16742), and part of that implementation listens on the list plugin's afterExecute events

Justification

I'm not sure -- the type is marked as @internal, and we only need this because of #16742, so if that were addressed we wouldn't need it.

UpcastHelpers (type)

Our use case

We have a plugin that implements upcast strategies (kinda similar to the downcast strategies implemented by the ListEditing plugin), and part of its API needs to accept the type of argument that can be passed to UpcastHelpers['attributeToAttribute']. Since that data structure isn't typed, we define it as Parameters<UpcastHelpers['attributeToAttribute']>[0].

Justification

The whole upcasting/downcasting API is public, so it seems like the UpcastHelpers and DowncastHelpers symbols should be as well. Better yet (for our use case) the type of the attributeToAttribute argument could be defined and exported as a named type.

EditableUIView

Our use case

We implement our own toolbar UI, so to remove the runtime overhead of the toolbar, balloon panels, etc., we implement our own Editor, EditorUI, and EditorUIView that is very similar to the InlineEditor, but with all the toolbar UI stripped out, as well as a few other things. To implement an EditorUIView, we need to be able to construct an EditableUIView instance, so need access to that symbol.

Justification

EditorUIView is public, presumably to support custom editor implementations, but its editable field is abstract, so it's not possible to subclass EditorUIView without having access to the EditableUIView class.

Sidebar

Our use case

We have some dynamically rendered UI where we need to call setContainer to give the sidebar its element because it's not rendered in time to pass via the editor config

Justification

The class is not marked as internal, so seems like part of the public API

CommentsEditing

NOTE: This is already exported, but as a type-only export. We need it as a JavaScript export.

Our use case

We don't use the CommentsOnly or CommentsArchive plugins, so we don't want to use the Comments glue plugin, and therefore need access to the CommentsEditing plugin

Justification

Pretty much all *Editing plugins are exported, and this one's type is exported, so why not the class itself?

TrackChangesUI

Our use case

Same as CommentsEditing, and because of #17643 we can't use the TrackChanges glue plugin, so we need to use TrackChangesEditing and TrackChangesUI

Justification

Pretty much all *UI plugins are exported, so why not this one?

AddSuggestionInput (type) & UpdateSuggestionInput (type)

Our use case

We implement a TrackChangesAdapter, so we need this type for the signatures of the addSuggestion and updateSuggestion methods

Justification

These are needed to implement a typed TrackChangesAdapter


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@bendemboski bendemboski added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 13, 2024
@Witoso
Copy link
Member

Witoso commented Dec 16, 2024

Thank you for this, this will help us tons. (linking to #17289)

@Witoso Witoso added squad:core Issue to be handled by the Core team. domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants