Repository navigation
feat(richtext,lab): promote RichTextEditor from lab into @astryxdesign/richtext - #4678
Merged
Merged
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.
|
potatowagon
force-pushed
the
navi/feat/promote-richtext
branch
from
August 4, 2026 03:15
a2d9a98 to
4d0ac9e
Compare
imdreamrunner
previously requested changes
Aug 6, 2026
imdreamrunner
self-requested a review
August 6, 2026 22:14
cixzhang
approved these changes
Aug 14, 2026
potatowagon
force-pushed
the
navi/feat/promote-richtext
branch
from
August 14, 2026 05:40
4d0ac9e to
d2735be
Compare
potatowagon
dismissed
imdreamrunner’s stale review
August 14, 2026 06:00
imdreamrunner's comment was accidentally posted by an agent: (Sorry this is accidentally posted by agent)
…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 14, 2026 06:04
d2735be to
be767cd
Compare
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
AKnassa
added a commit
to AKnassa/astryx
that referenced
this pull request
Aug 16, 2026
Resolves the PR meta#5025 conflict. Upstream promoted RichTextEditor out of packages/lab into the new @astryxdesign/richtext package (meta#4678), which is what GitHub reported as conflicting; git rename detection carried the --color-text-red counter change to packages/richtext/src/RichTextEditor.tsx along with its test. No hand edits were needed - the only lines the merge dropped were unrelated prettier reflow.
Merged
sangwook-dev
added a commit
to sangwook-dev/astryx
that referenced
this pull request
Sep 19, 2026
meta#4380 pinned bare lexical imports issued from @astryxdesign modules to lexical's built ESM: lab's RichTextEditor imported lexical, and withAstryx's `source` condition sent it to lexical's raw TS. meta#4678 moved the editor into @astryxdesign/richtext, which the sandbox does not depend on, and left the alias behind. Nothing the sandbox compiles imports lexical, @lexical/* or richtext, and the build output contains no lexical code with or without the alias. Remove it, along with the lexical devDependency the earlier commit declared for it.
3 tasks done
This branch was successfully deployed
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)
No changeset: both
@astryxdesign/richtextand@astryxdesign/labareprivate(canary-only, never published tolatest), so this move touches no releasable package. Perscripts/check-changesets.mjs, private packages cannot appear in a changeset — so none is included.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).Rebased onto latest main (incorporates #4818 visual polish)
Rebased onto
mainafter #4818 ("[lab] Visual polish for RichTextEditor and toolbar") merged. #4818 edited the same RichTextEditor files this PR moves out ofpackages/lab, so its polish is now promoted into@astryxdesign/richtext— nothing is lost in the split:toolbarslot, IconButton/Selector/ToggleButton/Divider/Dialog/TextInput toolbar, configurable editable-surface min-height,editorTheme.tstweaks) carried over intopackages/richtext/src/(files git-renamed, history preserved).@input/@output/@position) and.doc.mjsdescriptions reconciled: kept [lab] Visual polish for RichTextEditor and toolbar #4818's accurate feature/visual wording, updated package refs@astryxdesign/lab→@astryxdesign/richtext.pnpm-lock.yamlreconciled against currentmain: Lexical dev deps movedpackages/lab→packages/richtext,@astryxdesign/richtextlinked into the storybook importer, and@astryxdesign/corepicks up main's current0.4.0(no stale version pins).CI follow-ups (this rebase)
Two fixes on top of the #4818 rebase to green CI:
apps/storybook/tsconfig.json: added@astryxdesign/richtextpath mappings (mirroring the existing@astryxdesign/labones). The story import was updated to@astryxdesign/richtextbut the tsconfigpathsweren't, so storybook typecheck failed withTS2307: Cannot find module '@astryxdesign/richtext'(and cascading implicit-anyon storyargs)..changeset/promote-richtext-to-own-package.md: it bumped twoprivatepackages, whichcheck:changesetsrejects ("private/ignored and cannot be released"). Private/canary-only packages carry no changeset in this repo.