feat(solid): [WIP] Add wrapper implementation for SolidJS as @superdoc-dev/solid#3292
feat(solid): [WIP] Add wrapper implementation for SolidJS as @superdoc-dev/solid#3292msviderok wants to merge 15 commits into
@superdoc-dev/solid#3292Conversation
@superdoc-dev/solid@superdoc-dev/solid *[WIP]*
@superdoc-dev/solid *[WIP]*@superdoc-dev/solid
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2cdf130e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| containerId, | ||
| toolbarId, | ||
| () => restProps.role, | ||
| () => restProps.documentMode, |
There was a problem hiding this comment.
Remove documentMode from rebuild dependencies
Including restProps.documentMode in the main createEffect dependency list causes a full destroy/recreate cycle every time mode changes, even though this component already has a separate effect that imperatively calls setDocumentMode. In practice, toggling between viewing/editing will reinitialize SuperDoc (showing loading again and tearing down the current instance), which can drop transient editor state and defeats the intended efficient mode switch behavior.
Useful? React with 👍 / 👎.
…at causes rebuild
…rom react's version of the file
|
hey @msviderok, thank you for putting this together. The constructor-based type extraction is a good direction, and I appreciate that you carried over the SD-2635 prop-stability coverage from the React wrapper instead of treating this as just a thin copy. After discussing the package scope, we're keeping first-party framework support focused on React and Vue, where we have the maintenance bandwidth and the demand signal. The maintenance burden of a new framework wrapper is real, and we don't see that signal for Solid yet, so we're not going to merge That said, this would be very welcome as a community-maintained wrapper under a non-SuperDoc namespace, for example Closing this out as out-of-scope for the monorepo, not as a quality bar - the work is good, the scope is the call. |
|
Technical notes from our pass, in case you want to publish this as a community wrapper:
|
Summary
Adds SolidJS wrapper package
@superdoc-dev/solid.This PR introduces a Solid-native
SuperDocEditorcomponent which is practically identical to@superdoc-dev/reactwith the only differences being the framework-specific lifecycle/state management parts.What Changed
packages/solidas a new workspace packageSuperDocEditorfor SolidJS.mdand config files to matchpackages/reactsuperdocconstructor configSuperDocEditor.test.tsxfrom `packages/react to keep the tests intact in terms of logic/behaviour/visual aspectsscripts/publish-solid.cjsfor publishing@superdoc-dev/solidWhat differs from
packages/reactReacttoSolid.mdfiles to adhere to Solid practicessrc/utils:shallowJsonEqualdue to fine-grained reactivity of Solid negating the need for the rest of React-specific onesshallowJsonEqualTesting
packages/solid/src/SuperDocEditor.test.tsxpnpm --filter @superdoc-dev/solid testNext changes
⚠️ For some reason, `SuperDocEditor.test.tsx` testsuite passes _**but**_ with a post-error. Currently, I'm in progress resolving this issue, related to: [discord conversation](https://discord.com/channels/1299087524056010902/1472961164886671624/1504451997494149241)
Seems to only be happening locally, all good with CI.