4 ms·
This feels half baked and confusing. More than half docs page are blank: - https://lexical.dev/docs/concepts/commands https://lexical.dev/docs/concepts/comman
by alephnan 5y ago
This feels half baked and confusing.
More than half docs page are blank:
- https://lexical.dev/docs/concepts/commands https://lexical.dev/docs/concepts/commands
- https://lexical.dev/docs/getting-started/quick-start https://lexical.dev/docs/getting-started/quick-start
- https://lexical.dev/docs/concepts/extending-nodes https://lexical.dev/docs/concepts/extending-nodes
- https://lexical.dev/docs/concepts/editor-state https://lexical.dev/docs/concepts/editor-state
- https://lexical.dev/docs/api/lexical https://lexical.dev/docs/api/lexical
- https://lexical.dev/docs/api/lexical-selection https://lexical.dev/docs/api/lexical-selection
- https://lexical.dev/docs/api/lexical-text https://lexical.dev/docs/api/lexical-text
- https://lexical.dev/docs/api/lexical-offset https://lexical.dev/docs/api/lexical-offset
> An extensible text editor library
> Lexical is an extensible JavaScript web text-editor framework
The terminology is also confusing. In some places its called a library. In other places it's called a framework. Then other commenters mentioned that the demo gives the impression that it is a full package editor, but is just pegging onto CodeMirror. That's clarified here?
> It doesn't directly concern itself with UI components
> core of Lexical is ... a DOM reconciler that takes a set of editor states, diffs the changes, and updates the DOM according to their state.
> Lexical is designed for everyone. It follows best practices established in WCAG
These are weird and conflated set of buzzwords. Why should something that isn't concerned with UI components be concerned with accessibility best practices?
I'm building my own text editor and I thought VSCode was impressive enough. See this well written article about their text buffer reimplementation: https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r.... Then I realized Ace.js has some even crazy magic implementation that can handle millions of LoC files without lag. Can Lexical handle 100k+ LoC? Normally I'd benchmark myself, but in this case I don't see other compelling reasons too. The author mentioned the 22kB bundle size is less than Draft.js by Facebook, but Slate.js is 10kB and much more mature.
Some features that could make Lexical have "powerful features" as claimed: UNDO/REDO manager (without storing the entire state on the stack, which is just not scalable on memory), possibly implementing the Command pattern, then make easy consumption of collaborative editing such as with Operational Transform.
- acywatson 5y agoThank for the feedback - we're definitely still working on the docs. > These are weird and conflated set of buzzwords. Why should something that isn't concerned with UI components be concerned with accessibility best practices? Are they? Support for speech-to-text technologies and IME/composition input, for example, are independent of UI components. > but Slate.js is 10kB and much more mature. Is it? https://bundlephobia.com/package/slate@0.77.0 https://bundlephobia.com/package/slate@0.77.0
- alephnan 5y ago> Support for speech-to-text technologies So Lexical doesn't care about how the DOM is rendered? Or is speech-to-text derived independent of the DOM? > but Slate.js is 10kB and much more mature. The maturity bit, yes. For the bundle size, Slate.js is still better. It's the same bundle size for something that's batteries included.
- acywatson 5y ago> So Lexical doesn't care about how the DOM is rendered? Or is speech-to-text derived independent of the DOM? I do now see your general point about the conflation there - the reality is Lexical also provides separate packages that implement a lot of common rich-text functionality. Within these, we do try to adhere to accessibility best practices. At the same time, the core library's accessibility claims are more based on support for various input methods, which I don't see as necessarily directly related to "UI components". > For the bundle size, Slate.js is still better. It's the same bundle size for something that's batteries included. Maturity is mostly a matter of time. I'm not sure what you mean by "batteries included"? AFAICT you need to install plugins on top of the core library with Slate to get a working text editor.
- alephnan 5y ago> I'm not sure what you mean by "batteries included"? A rendering layer. With Lexical, you'd have to add in the React layer, which wasn't already included in the bundle size comparison.