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
feat(richtext-lexical)!: finalize ClientFeature interface #6191
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paulpopus
approved these changes
May 3, 2024
packages/richtext-lexical/src/field/features/horizontalrule/feature.client.tsx
Outdated
Show resolved
Hide resolved
packages/richtext-lexical/src/field/features/indent/feature.client.tsx
Outdated
Show resolved
Hide resolved
packages/richtext-lexical/src/field/features/lists/orderedlist/feature.client.tsx
Outdated
Show resolved
Hide resolved
packages/richtext-lexical/src/field/features/paragraph/feature.client.tsx
Outdated
Show resolved
Hide resolved
paulpopus
pushed a commit
that referenced
this pull request
May 6, 2024
**BREAKING:** If you have own, custom lexical features, there will be a bunch of breaking API changes for you. The saved JSON data is not affected. - `floatingSelectToolbar` has been changed to `toolbarInline` - `slashMenu.dynamicOptions `and `slashMenu.options` have been changed to `slashMenu.groups` and `slashMenu.dynamicGroups` - `toolbarFixed.sections` is now `toolbarFixed.groups` - Slash menu group `options` and toolbar group `entries` have both been renamed to `items` - Toolbar group item `onClick` has been renamed to `onSelect` to match slash menu properties - slashMenu item `onSelect` is no longer auto-wrapped inside an `editor.update`. If you perform editor updates in them, you have to wrap it inside an `editor.update` callback yourself. Within our own features this extra control has removed a good amount of unnecessary, nested `editor.update` calls, which is good - Slash menu items are no longer initialized using the `new` keyword, as they are now types and no longer classes. You can convert them to an object and add the `key` property as an object property instead of an argument to the previous SlashMenuItem constructor - CSS classnames for slash menu and toolbars, as well as their items, have changed - `CheckListFeature` is now exported as and has been renamed to `ChecklistFeature` For guidance on migration, check out how we migrated our own features in this PR's diff: https://github.com/payloadcms/payload/pull/6191/files
JessChowdhury
pushed a commit
that referenced
this pull request
May 13, 2024
**BREAKING:** If you have own, custom lexical features, there will be a bunch of breaking API changes for you. The saved JSON data is not affected. - `floatingSelectToolbar` has been changed to `toolbarInline` - `slashMenu.dynamicOptions `and `slashMenu.options` have been changed to `slashMenu.groups` and `slashMenu.dynamicGroups` - `toolbarFixed.sections` is now `toolbarFixed.groups` - Slash menu group `options` and toolbar group `entries` have both been renamed to `items` - Toolbar group item `onClick` has been renamed to `onSelect` to match slash menu properties - slashMenu item `onSelect` is no longer auto-wrapped inside an `editor.update`. If you perform editor updates in them, you have to wrap it inside an `editor.update` callback yourself. Within our own features this extra control has removed a good amount of unnecessary, nested `editor.update` calls, which is good - Slash menu items are no longer initialized using the `new` keyword, as they are now types and no longer classes. You can convert them to an object and add the `key` property as an object property instead of an argument to the previous SlashMenuItem constructor - CSS classnames for slash menu and toolbars, as well as their items, have changed - `CheckListFeature` is now exported as and has been renamed to `ChecklistFeature` For guidance on migration, check out how we migrated our own features in this PR's diff: https://github.com/payloadcms/payload/pull/6191/files
JessChowdhury
pushed a commit
that referenced
this pull request
May 14, 2024
**BREAKING:** If you have own, custom lexical features, there will be a bunch of breaking API changes for you. The saved JSON data is not affected. - `floatingSelectToolbar` has been changed to `toolbarInline` - `slashMenu.dynamicOptions `and `slashMenu.options` have been changed to `slashMenu.groups` and `slashMenu.dynamicGroups` - `toolbarFixed.sections` is now `toolbarFixed.groups` - Slash menu group `options` and toolbar group `entries` have both been renamed to `items` - Toolbar group item `onClick` has been renamed to `onSelect` to match slash menu properties - slashMenu item `onSelect` is no longer auto-wrapped inside an `editor.update`. If you perform editor updates in them, you have to wrap it inside an `editor.update` callback yourself. Within our own features this extra control has removed a good amount of unnecessary, nested `editor.update` calls, which is good - Slash menu items are no longer initialized using the `new` keyword, as they are now types and no longer classes. You can convert them to an object and add the `key` property as an object property instead of an argument to the previous SlashMenuItem constructor - CSS classnames for slash menu and toolbars, as well as their items, have changed - `CheckListFeature` is now exported as and has been renamed to `ChecklistFeature` For guidance on migration, check out how we migrated our own features in this PR's diff: https://github.com/payloadcms/payload/pull/6191/files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Various changes to the ClientFeature interface, as well as adding a new toolbarFixed property (not implemented yet).
BREAKING:
If you have own, custom lexical features, there will be a bunch of breaking API changes for you. The saved JSON data is not affected.
floatingSelectToolbar
has been changed totoolbarInline
slashMenu.dynamicOptions
andslashMenu.options
have been changed toslashMenu.groups
andslashMenu.dynamicGroups
toolbarFixed.sections
is nowtoolbarFixed.groups
Slash menu group
options
and toolbar groupentries
have both been renamed toitems
Toolbar group item
onClick
has been renamed toonSelect
to match slash menu propertiesslashMenu item
onSelect
is no longer auto-wrapped inside aneditor.update
. If you perform editor updates in them, you have to wrap it inside aneditor.update
callback yourself. Within our own features this extra control has removed a good amount of unnecessary, nestededitor.update
calls, which is goodSlash menu items are no longer initialized using the
new
keyword, as they are now types and no longer classes. You can convert them to an object and add thekey
property as an object property instead of an argument to the previous SlashMenuItem constructorCSS classnames for slash menu and toolbars have changed
CheckListFeature
is now exported as and has been renamed toChecklistFeature
For guidance on migration, check out how we migrated our own features in this PR's diff: https://github.com/payloadcms/payload/pull/6191/files
Type of change
Checklist: