-
Notifications
You must be signed in to change notification settings - Fork 83
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(text-editor): replaces draftjs with lexical #7149
base: master
Are you sure you want to change the base?
Conversation
9b021b8
to
a5d0b45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good stuff @damienrobson-sage, I really like the structure/approach you've adopted, I've left some comments but in general they're pretty trivial
src/components/rich-text-editor/plugins/Placeholder/placeholder.component.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work with this. Just a few bugs I spotted when messing around with the new component.
Seems that the Bold and Italic options aren't selectable on initial render.
Screen.Recording.2025-01-13.at.10.58.19.mov
Bold and Italic cannot be used together.
Screen.Recording.2025-01-13.at.10.59.51.mov
If you select the bullet point list before typing, it doesn't apply the formatting to the text.
Screen.Recording.2025-01-13.at.11.02.24.mov
46ff8df
to
5defeb6
Compare
ae48e7e
to
c0c6101
Compare
src/components/text-editor/__internal__/plugins/Toolbar/toolbar.component.tsx
Outdated
Show resolved
Hide resolved
c0c6101
to
a57ec60
Compare
a57ec60
to
d0a0b18
Compare
d0a0b18
to
ded2a65
Compare
ded2a65
to
ea9dc2b
Compare
src/components/text-editor/__snapshots__/text-editor.test.tsx.snap
Outdated
Show resolved
Hide resolved
6b145e2
6b145e2
to
a1bccb5
Compare
Reviewed both UX and A11y based on requested changes and gave Accessibility and "at desk" demo of this and all good. |
8f8e622
a1bccb5
to
8f8e622
Compare
The draftjs package is no longer maintained; a decision has been reached to rewrite the TextEditor component using Lexical BREAKING CHANGE: Whilst the intention is to implement a straight-up replacement and maintain as much functionality as possible, there may be differences that customers need to be made aware of. These will be communicated separately as necessary.
8f8e622
to
bf308f8
Compare
… read out by screen readers
The draftjs package is no longer maintained; a decision has been reached to rewrite the TextEditor component using Lexical
BREAKING CHANGE: Whilst the intention is to implement a straight-up replacement and maintain as much functionality as possible, there may be differences that customers need to be made aware of. These will be communicated separately as necessary.
Proposed behaviour
Rebuild the
TextEditor
component from the ground up using LexicalCurrent behaviour
The
TextEditor
component is built arounddraftjs
, which is no longer maintained.Checklist
d.ts
file added or updated if requiredQA
Testing instructions
Using the provided playground in Storybook's
Test
section will allow you to view and interact with the new editor in several states