mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 17:22:18 +03:00
f41b7d7e71
A React wrapper for blocksuite editor from title/meta/doc/edgless fragments. This PR only **clones** the `AffineEditorContainer`'s existing behavior and make it easier for extension in affine later. fix TOV-315 ### Some core issues: A customized version of `createComponent` from `@lit/react`. The [existing and solutions in the community](https://github.com/lit/lit/issues/4435) does not work well in our case. Alternatively in this PR the approach we have is to create web component instances in React lifecycle and then append them to DOM. However this make it hard to wrap the exported Lit component's using React and therefore we will have an additional wrapper tag for the wrapped web component. To mitigate the migration issue on using React instead of Lit listed on last day, we now use [a proxy to mimic the wrapped React component](https://github.com/toeverything/AFFiNE/pull/5606/files#diff-5b7f0ae7b52a08739d50e78e9ec803c26ff3d3e5437581c692add0de12d3ede5R142-R183) into an `AffineEditorContainer` instance. |
||
---|---|---|
.. | ||
affine-cloud | ||
affine-desktop | ||
affine-desktop-cloud | ||
affine-legacy | ||
affine-local | ||
affine-migration | ||
fixtures | ||
kit | ||
storybook |