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

[CARE-1802] Refactor - Extensions model #501

Closed
wants to merge 65 commits into from

Conversation

e1himself
Copy link
Contributor

No description provided.

@e1himself e1himself self-assigned this Sep 11, 2023
@e1himself e1himself force-pushed the refactor/care-1802-extensions-model branch 2 times, most recently from 6e296de to e71b889 Compare September 18, 2023 11:19
…hmentExtension`

Additionally, keep the event tracking outside of it -- in the `getEnabledExtensions()` wiring function.
Also, there it doesn't seem to have any sense in having `attachment-edit-clicked` event, thus I've dropped it.
Additionally, event tracking callbacks are passed from outside,
to reduce coupling of the extension to the editor wiring logic.
Also, introduce additional tracked events:
- `gallery-edited`
- `gallery-shuffled`

Additionally, gallery event tracking calls are now passed from outside
to reduce code coupling.
For consistency with other extensions
…xtensions

- One for images and one for file attachments

- Also, the decision about enabling specific file type pasting handler is now outsourced to the external code.
  It enables files pasting when attachments extension is enabled. Same for images.
To reduce code coupling to the `EditorEvents` module
Not using the deprecated LoaderExtension
This completely drops ImageCandidate elements from the data model
It's superseded by the Placeholders feature
…nuExtension`

� Conflicts:
�	packages/slate-editor/src/modules/editor/Editor.tsx
�	packages/slate-editor/src/modules/editor/Extensions.tsx
…icient UI component

Related to 8d2a5e3

� Conflicts:
�	packages/slate-editor/src/extensions/snippet/SnippetsExtension.tsx
�	packages/slate-editor/src/modules/editor/Extensions.tsx
� Conflicts:
�	packages/slate-editor/src/modules/editor/Editor.tsx
…verrides to the ExtensionsEditor definition
… hook

Without relying on `withOverrides()`

� Conflicts:
�	packages/slate-editor/src/extensions/paste-slate-content/lib/withSlatePasting.ts
�	packages/slate-editor/src/modules/editor/Extensions.tsx
…an Extension

� Conflicts:
�	packages/slate-editor/src/modules/editor/createEditor.ts
�	packages/slate-editor/src/modules/editor/plugins/index.ts
�	packages/slate-editor/src/modules/editor/plugins/withDeserializeHtml/withDeserializeHtml.ts
…extension hook

Instead of relying on the hard-to-maintain `withOverrides` extension feature

� Conflicts:
�	packages/slate-editor/src/extensions/loader/index.ts
�	packages/slate-editor/src/extensions/loader/transforms/index.ts
�	packages/slate-editor/src/extensions/loader/transforms/insertUploadingFile.ts
�	packages/slate-editor/src/extensions/paste-files/PasteFilesExtension.ts
�	packages/slate-editor/src/extensions/paste-files/lib/index.ts
�	packages/slate-editor/src/extensions/paste-images/PasteImagesExtension.ts
�	packages/slate-editor/src/extensions/paste-images/lib/index.ts
Consolidate file attachments management inside `FileAttachmentExtension` module

� Conflicts:
�	packages/slate-editor/src/extensions/paste-files/lib/createDataTransferHandler.ts
�	packages/slate-editor/src/extensions/placeholders/PlaceholdersManager.ts
�	packages/slate-editor/src/extensions/placeholders/elements/AttachmentPlaceholderElement.tsx
�	packages/slate-editor/src/extensions/placeholders/index.ts
�	packages/slate-editor/src/modules/events/types.ts
@e1himself e1himself force-pushed the refactor/care-1802-extensions-model branch from a6fa3f7 to dfef2fa Compare September 19, 2023 23:37
@e1himself e1himself closed this Sep 21, 2023
@e1himself
Copy link
Contributor Author

Closed in favour of #504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant