feat(richtext,lab): promote RichTextEditor from lab into @astryxdesign/richtext - #4678
Open
potatowagon wants to merge 1 commit into
Open
feat(richtext,lab): promote RichTextEditor from lab into @astryxdesign/richtext#4678potatowagon wants to merge 1 commit into
potatowagon wants to merge 1 commit into
Conversation
potatowagon
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
August 3, 2026 10:08
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…n/richtext
Move the Lexical-based rich text editor and viewer out of @astryxdesign/lab
into its own canary-only package, @astryxdesign/richtext, so it can be
canaried independently (e.g. into EPS/Nest) without dragging the rest of lab
along. Mirrors the @astryxdesign/charts promotion model (private + canaryOnly,
flat src/ layout, storybook-hosted examples).
What moved (git-tracked renames, history preserved):
- packages/lab/src/RichTextEditor/{RichTextEditor,RichTextView,
RichTextEditorToolbar,editorTheme,editorNodes,markdownSerializers,
*.doc.mjs,*.test.tsx} -> packages/richtext/src/
- The local barrel becomes packages/richtext/src/index.ts (package entry).
Package wiring (matches lab/charts):
- richtext package.json: adds Lexical optional peer/dev deps (incl. headless +
html), @astryxdesign/cli devDep for .doc.mjs authoring types, build:css step,
./richtext.css export, and typecheck:docs script.
- scripts/build-css.mjs: register a `richtext` StyleX target (73 rules -> 3.6KB).
- packages/richtext/tsconfig.docs.json: added (mirrors charts) for .doc.mjs
typecheck.
- lab: drop RichTextEditor exports from the barrel and remove the now-unused
Lexical peer/dev/meta deps (nothing else in lab uses Lexical).
Examples / testing:
- apps/storybook: add @astryxdesign/richtext dep; RichTextEditor.stories.tsx
now imports from @astryxdesign/richtext. Storybook is where richtext examples
are exercised (same as charts). Verified `storybook build` succeeds.
- vitest.config.ts: add packages/richtext to the `ui` project (jsdom + StyleX
transform) and exclude it from the `node` project. All 50 tests pass.
Verified: richtext build (esm + dts + css + dev-jsx + fully-specified checks),
lab build, richtext + lab lint, package typecheck, docs typecheck, storybook
typecheck + build, and the 50-test suite — all green.
Breaking (lab canary consumers): import RichText* from @astryxdesign/richtext.
Changeset added (minor bump for richtext + lab).
Closes: RFC #3899 promotion step
potatowagon
force-pushed
the
navi/feat/promote-richtext
branch
from
August 4, 2026 03:15
a2d9a98 to
4d0ac9e
Compare
This file contains hidden or 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
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.
Summary
Promotes the Lexical-based RichTextEditor out of
@astryxdesign/labinto its own canary-only package,@astryxdesign/richtext, so it can be canaried into EPS/Nest (fbsource) independently — without dragging the rest oflabalong.This mirrors how
@astryxdesign/chartswas promoted:private: true+astryx.canaryOnly(published only under the@canarydist-tag, never stablelatest), a flatsrc/layout, and storybook-hosted examples for testing.Where do the stories/examples show up?
In storybook (
apps/storybook) — same placechartsandlabexamples live.chartsdeliberately does not surface in the docsite component registry (that registry only scanscore/lab-style per-component subdirectories); it relies on storybook.richtextfollows the same model:apps/storybooknow depends on@astryxdesign/richtext.stories/RichTextEditor.stories.tsximports from@astryxdesign/richtext(was@astryxdesign/lab).pnpm --filter @astryxdesign/storybook buildsucceeds (4034 modules, exit 0).What moved
Git-tracked renames (history preserved) from
packages/lab/src/RichTextEditor/→packages/richtext/src/:RichTextEditor.tsx,RichTextView.tsx,RichTextEditorToolbar.tsx,editorTheme.ts,editorNodes.ts,markdownSerializers.ts,RichTextEditor.doc.mjs,RichTextEditor.test.tsx, and the local barrel →packages/richtext/src/index.ts.The source only imported from
@astryxdesign/core/*+@lexical/*+ local files — no lab-internal cross-refs — so the move is mechanical. Doc-comment / SYNC-path references were updated to the new home.Package wiring (matches lab/charts)
packages/richtext/package.json: adds Lexical optional peer/dev deps (incl.@lexical/headless+@lexical/html, both used by the editor/serializers),@astryxdesign/clidevDep (for.doc.mjsauthoring types), abuild:cssstep, a./richtext.cssexport, and atypecheck:docsscript.scripts/build-css.mjs: registers arichtextStyleX target (73 rules → 3.6 KBrichtext.css), same core-token alias as lab/charts.packages/richtext/tsconfig.docs.json: added (mirrors charts).packages/lab: drops theRichTextEditorexports from its barrel and removes the now-unused Lexical peer/dev/meta deps (nothing else in lab uses Lexical).vitest.config.ts: addspackages/richtextto theuiproject (jsdom + StyleX transform) and excludes it from thenodeproject.Verification (all green)
richtextbuild — esm + d.ts + css +check-no-dev-jsx+check-fully-specifiedlabbuild (without RichTextEditor)richtext+lablintrichtextpackage typecheck + docs typecheckRichTextEditor.test.tsx)Breaking change (lab canary consumers)
Changeset included (minor bump for
richtext+lab).Next step (canary → EPS/Nest)
Once this lands,
@astryxdesign/richtext@canarycan be pulled into EPS Nest independently of the rest of lab, which is the whole point of the split.Refs RFC #3899.
Rebased onto latest main (incorporates #4670 + #4671)
This branch was rebased onto
mainafter #4670 (link support) and #4671 (RichTextView reactivity) merged intopackages/lab. Those changes are now promoted into@astryxdesign/richtextas part of the move — no functionality is lost in the split:RichTextEditorToolbarlink button + Cmd/Ctrl+K,RichTextEditorAutoLinkPlugin.tsx+linkUtils.ts(both git-renamed intopackages/richtext/src/, history preserved), and the +379 link tests. New AutoLink/linkUtils exports added topackages/richtext/src/index.ts.SyncValuePluginre-appliesvalueon change, plus its tests.packages/lab/...→packages/richtext/....packages/labbarrel updated to point consumers at@astryxdesign/richtext(no RichTextEditor exports remain in lab).